summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_mrp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-02-10 22:30:12 +0100
committerDavid S. Miller <davem@davemloft.net>2021-02-10 22:30:12 +0100
commitdc9d87581d464e7b7d38853d6904b70b6c920d99 (patch)
tree15aa27fefb867814899c0a0c194adf327675ba10 /net/bridge/br_mrp.c
parentMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/n... (diff)
parentMerge tag 'pm-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafa... (diff)
downloadlinux-dc9d87581d464e7b7d38853d6904b70b6c920d99.tar.xz
linux-dc9d87581d464e7b7d38853d6904b70b6c920d99.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/bridge/br_mrp.c')
-rw-r--r--net/bridge/br_mrp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c
index fc0a98874bfc..01c67ed727a9 100644
--- a/net/bridge/br_mrp.c
+++ b/net/bridge/br_mrp.c
@@ -557,19 +557,22 @@ int br_mrp_del(struct net_bridge *br, struct br_mrp_instance *instance)
int br_mrp_set_port_state(struct net_bridge_port *p,
enum br_mrp_port_state_type state)
{
+ u32 port_state;
+
if (!p || !(p->flags & BR_MRP_AWARE))
return -EINVAL;
spin_lock_bh(&p->br->lock);
if (state == BR_MRP_PORT_STATE_FORWARDING)
- p->state = BR_STATE_FORWARDING;
+ port_state = BR_STATE_FORWARDING;
else
- p->state = BR_STATE_BLOCKING;
+ port_state = BR_STATE_BLOCKING;
+ p->state = port_state;
spin_unlock_bh(&p->br->lock);
- br_mrp_port_switchdev_set_state(p, state);
+ br_mrp_port_switchdev_set_state(p, port_state);
return 0;
}