OSDN Git Service

net: dsa: rzn1-a5psw: add support for .port_bridge_flags
authorClément Léger <clement.leger@bootlin.com>
Thu, 10 Aug 2023 09:36:50 +0000 (11:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Aug 2023 10:58:36 +0000 (11:58 +0100)
commit0d37f839836b4f61493ff3ff0397abd19f540494
tree2cc667ca847e7a2108a6c9698e649fb18757fd8c
parent6cf30fdd7b06515db9188ace84d2497f390f4c37
net: dsa: rzn1-a5psw: add support for .port_bridge_flags

When running vlan test (bridge_vlan_aware/unaware.sh), there were some
failure due to the lack .port_bridge_flag function to disable port
flooding. Implement this operation for BR_LEARNING, BR_FLOOD,
BR_MCAST_FLOOD and BR_BCAST_FLOOD.

Since .port_bridge_flags affects the bits disabling learning for a port,
ensure that any other modification on the same register done by
a5psw_port_stp_state_set is in sync by using the port learning state to
enable/disable learning on the port.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/rzn1_a5psw.c