diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-09-30 19:13:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-01 22:03:50 -0400 |
commit | 775dd692bd34f9201ed2aa775a0edcba4f973f3e (patch) | |
tree | 65c977fb1c697077c0fa4e2506e1847d3899133b /net/bridge/br_stp_timer.c | |
parent | a0efb80ce3abacfd22a4284c3730924fc2f1f077 (diff) |
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.c | 4 |
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) | |||
87 | (unsigned int) p->port_no, p->dev->name); | 87 | (unsigned int) p->port_no, p->dev->name); |
88 | spin_lock(&br->lock); | 88 | spin_lock(&br->lock); |
89 | if (p->state == BR_STATE_LISTENING) { | 89 | if (p->state == BR_STATE_LISTENING) { |
90 | p->state = BR_STATE_LEARNING; | 90 | br_set_state(p, BR_STATE_LEARNING); |
91 | mod_timer(&p->forward_delay_timer, | 91 | mod_timer(&p->forward_delay_timer, |
92 | jiffies + br->forward_delay); | 92 | jiffies + br->forward_delay); |
93 | } else if (p->state == BR_STATE_LEARNING) { | 93 | } else if (p->state == BR_STATE_LEARNING) { |
94 | p->state = BR_STATE_FORWARDING; | 94 | br_set_state(p, BR_STATE_FORWARDING); |
95 | if (br_is_designated_for_some_port(br)) | 95 | if (br_is_designated_for_some_port(br)) |
96 | br_topology_change_detection(br); | 96 | br_topology_change_detection(br); |
97 | netif_carrier_on(br->dev); | 97 | netif_carrier_on(br->dev); |