]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Sat, 6 Feb 2021 21:47:33 +0000 (22:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Feb 2021 00:20:57 +0000 (16:20 -0800)
commitb6076cc8c1c87852bc003c08b5da0cfe6c190ca3
tree008b5d113b1f3eee52aa5e78f809956dfd2f871e
parent74a736c2ec28b3d7076dda0d234e58b499d46dcb
bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state

The function br_mrp_port_switchdev_set_state was called both with MRP
port state and STP port state, which is an issue because they don't
match exactly.

Therefore, update the function to be used only with STP port state and
use the id SWITCHDEV_ATTR_ID_PORT_STP_STATE.

The choice of using STP over MRP is that the drivers already implement
SWITCHDEV_ATTR_ID_PORT_STP_STATE and already in SW we update the port
STP state.

Fixes: 3bb98758960608 ("bridge: mrp: Connect MRP API with the switchdev API")
Fixes: 7f15633558c1f2 ("bridge: switchdev: mrp: Implement MRP API for switchdev")
Fixes: 4d7917e59f25fd ("bridge: mrp: Add MRP interface.")
Reported-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mrp.c
net/bridge/br_mrp_switchdev.c
net/bridge/br_private_mrp.h