diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-09-30 16:13:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-01 22:03:50 -0400 |
commit | 775dd692bd34f9201ed2aa775a0edcba4f973f3e (patch) | |
tree | 65c977fb1c697077c0fa4e2506e1847d3899133b /net/bridge/br_stp_if.c | |
parent | a0efb80ce3abacfd22a4284c3730924fc2f1f077 (diff) | |
download | linux-stable-775dd692bd34f9201ed2aa775a0edcba4f973f3e.tar.gz linux-stable-775dd692bd34f9201ed2aa775a0edcba4f973f3e.tar.bz2 linux-stable-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_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 189ba1e7d851..41146872c1b4 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -37,7 +37,7 @@ void br_init_port(struct net_bridge_port *p) { p->port_id = br_make_port_id(p->priority, p->port_no); br_become_designated_port(p); - p->state = BR_STATE_BLOCKING; + br_set_state(p, BR_STATE_BLOCKING); p->topology_change_ack = 0; p->config_pending = 0; } @@ -100,7 +100,7 @@ void br_stp_disable_port(struct net_bridge_port *p) wasroot = br_is_root_bridge(br); br_become_designated_port(p); - p->state = BR_STATE_DISABLED; + br_set_state(p, BR_STATE_DISABLED); p->topology_change_ack = 0; p->config_pending = 0; |