aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_stp_timer.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-09-30 16:13:19 -0700
committerDavid S. Miller <davem@davemloft.net>2014-10-01 22:03:50 -0400
commit775dd692bd34f9201ed2aa775a0edcba4f973f3e (patch)
tree65c977fb1c697077c0fa4e2506e1847d3899133b /net/bridge/br_stp_timer.c
parentnet_sched: avoid calling tcf_unbind_filter() in call_rcu callback (diff)
downloadlinux-dev-775dd692bd34f9201ed2aa775a0edcba4f973f3e.tar.xz
linux-dev-775dd692bd34f9201ed2aa775a0edcba4f973f3e.zip
net: bridge: add a br_set_state helper function
In preparation for being able to propagate port states to e.g: notifiers or other kernel parts, do not manipulate the port state directly, but instead use a helper function which will allow us to do a bit more than just setting the state. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_timer.c')
-rw-r--r--net/bridge/br_stp_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c
index 558c46d19e05..4fcaa67750fd 100644
--- a/net/bridge/br_stp_timer.c
+++ b/net/bridge/br_stp_timer.c
@@ -87,11 +87,11 @@ static void br_forward_delay_timer_expired(unsigned long arg)
(unsigned int) p->port_no, p->dev->name);
spin_lock(&br->lock);
if (p->state == BR_STATE_LISTENING) {
- p->state = BR_STATE_LEARNING;
+ br_set_state(p, BR_STATE_LEARNING);
mod_timer(&p->forward_delay_timer,
jiffies + br->forward_delay);
} else if (p->state == BR_STATE_LEARNING) {
- p->state = BR_STATE_FORWARDING;
+ br_set_state(p, BR_STATE_FORWARDING);
if (br_is_designated_for_some_port(br))
br_topology_change_detection(br);
netif_carrier_on(br->dev);