net: bridge: Add checks for enabling the STP.

It is not possible to have the MRP and STP running at the same time on the
bridge, therefore add check when enabling the STP to check if MRP is already
enabled. In that case return error.

Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
Horatiu Vultur
2020-04-26 15:22:08 +02:00
提交者 David S. Miller
父節點 6536993371
當前提交 419dba8a49
共有 6 個檔案被更改,包括 23 行新增8 行删除

查看文件

@@ -36,6 +36,12 @@ void br_set_state(struct net_bridge_port *p, unsigned int state)
};
int err;
/* Don't change the state of the ports if they are driven by a different
* protocol.
*/
if (p->flags & BR_MRP_AWARE)
return;
p->state = state;
err = switchdev_port_attr_set(p->dev, &attr);
if (err && err != -EOPNOTSUPP)