X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fbridge%2Fbr_stp.c;h=e38034aa56f5a2f6d1476f38cf3e931a18513fe0;hb=d8c05008b0e464c94967ed2f20d1d661fca6790e;hp=f9ff4d57b0d7fc60cbbd5e5718f2e67c0b247121;hpb=93bbad8fe13a25dcf7f3bc628a71d1a7642ae61b;p=linux-2.6-omap-h63xx.git diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index f9ff4d57b0d..e38034aa56f 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -13,7 +13,6 @@ * 2 of the License, or (at your option) any later version. */ #include -#include #include "br_private.h" #include "br_private_stp.h" @@ -179,7 +178,8 @@ void br_transmit_config(struct net_bridge_port *p) br_send_config_bpdu(p, &bpdu); p->topology_change_ack = 0; p->config_pending = 0; - mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME); + mod_timer(&p->hold_timer, + round_jiffies(jiffies + BR_HOLD_TIME)); } } @@ -370,11 +370,11 @@ static void br_make_blocking(struct net_bridge_port *p) static void br_make_forwarding(struct net_bridge_port *p) { if (p->state == BR_STATE_BLOCKING) { - if (p->br->stp_enabled) { + if (p->br->stp_enabled == BR_KERNEL_STP) p->state = BR_STATE_LISTENING; - } else { + else p->state = BR_STATE_LEARNING; - } + br_log_state(p); mod_timer(&p->forward_delay_timer, jiffies + p->br->forward_delay); } } @@ -384,6 +384,10 @@ void br_port_state_selection(struct net_bridge *br) { struct net_bridge_port *p; + /* Don't change port states if userspace is handling STP */ + if (br->stp_enabled == BR_USER_STP) + return; + list_for_each_entry(p, &br->port_list, list) { if (p->state != BR_STATE_DISABLED) { if (p->port_no == br->root_port) {