X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fbridge%2Fbr_stp.c;h=ebb0861e9bd573959eb2a4c1bdb7ef00cbcc3454;hb=61322b30139b79ec77170723a3a80043dcc94e87;hp=f9ff4d57b0d7fc60cbbd5e5718f2e67c0b247121;hpb=81450b73dde07f473a4a7208b209b4c8b7251d90;p=mv-sheeva.git diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index f9ff4d57b0d..ebb0861e9bd 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -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) {