Commit d32439c0 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[BRIDGE]: port timer initialization

Initialize the STP timers for a port when it is created,
rather than when it is enabled. This will prevent future race conditions
where timer gets started before port is enabled.
Signed-off-by: default avatarStephen Hemminger <shemmigner@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e86b890
...@@ -277,8 +277,9 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, ...@@ -277,8 +277,9 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
br_init_port(p); br_init_port(p);
p->state = BR_STATE_DISABLED; p->state = BR_STATE_DISABLED;
INIT_WORK(&p->carrier_check, port_carrier_check, dev); INIT_WORK(&p->carrier_check, port_carrier_check, dev);
kobject_init(&p->kobj); br_stp_port_timer_init(p);
kobject_init(&p->kobj);
kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
p->kobj.ktype = &brport_ktype; p->kobj.ktype = &brport_ktype;
p->kobj.parent = &(dev->class_dev.kobj); p->kobj.parent = &(dev->class_dev.kobj);
......
...@@ -39,8 +39,6 @@ void br_init_port(struct net_bridge_port *p) ...@@ -39,8 +39,6 @@ void br_init_port(struct net_bridge_port *p)
p->state = BR_STATE_BLOCKING; p->state = BR_STATE_BLOCKING;
p->topology_change_ack = 0; p->topology_change_ack = 0;
p->config_pending = 0; p->config_pending = 0;
br_stp_port_timer_init(p);
} }
/* called under bridge lock */ /* called under bridge lock */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment