Now that network interfaces advertise if they support linkstate notifications

we do not need to perform a media ioctl every 15 seconds.
This commit is contained in:
Andrew Thompson 2012-02-23 06:26:16 +00:00
parent bc6a83448b
commit 2ad65e315d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232030

View File

@ -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);
}