From 2ad65e315dfffa56dfcdd5045591dcfbd4d6d8da Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Thu, 23 Feb 2012 06:26:16 +0000 Subject: [PATCH] Now that network interfaces advertise if they support linkstate notifications we do not need to perform a media ioctl every 15 seconds. --- sys/net/bridgestp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index 12a7949b420..445d643d8c5 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); }