diff options
author | thompsa <thompsa@FreeBSD.org> | 2012-02-23 06:26:16 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2012-02-23 06:26:16 +0000 |
commit | 80037c4e254c4dd5e5ef356ec0bc0240e4c74963 (patch) | |
tree | 291d42076f049d9f2e61ddc4ce9efca780be1e1a /sys/net | |
parent | 8e838363e7ef0575ba64d244b96c54ec61581a73 (diff) | |
download | FreeBSD-src-80037c4e254c4dd5e5ef356ec0bc0240e4c74963.zip FreeBSD-src-80037c4e254c4dd5e5ef356ec0bc0240e4c74963.tar.gz |
Now that network interfaces advertise if they support linkstate notifications
we do not need to perform a media ioctl every 15 seconds.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/bridgestp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index 12a7949..445d643 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -1861,10 +1861,12 @@ bstp_tick(void *arg) CURVNET_SET(bs->bs_vnet); - /* slow timer to catch missed link events */ + /* poll link events on interfaces that do not support linkstate */ if (bstp_timer_expired(&bs->bs_link_timer)) { - LIST_FOREACH(bp, &bs->bs_bplist, bp_next) - bstp_ifupdstatus(bs, bp); + LIST_FOREACH(bp, &bs->bs_bplist, bp_next) { + if (!(bp->bp_ifp->if_capabilities & IFCAP_LINKSTATE)) + bstp_ifupdstatus(bs, bp); + } bstp_timer_start(&bs->bs_link_timer, BSTP_LINK_TIMER); } |