aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Oltean <[email protected]>2021-02-16 13:41:18 +0200
committerDavid S. Miller <[email protected]>2021-02-16 14:02:46 -0800
commit4c44fc5e94005ab325911de44d7935446781307a (patch)
tree9906855df2cb70122c9e7f2f6da29043d823e803
parent786621d200235c44e1d043b954f96212ac4dd272 (diff)
net: dsa: sja1105: fix configuration of source address learning
Due to a mistake, the driver always sets the address learning flag to the previously stored value, and not to the currently configured one. The bug is visible only in standalone ports mode, because when the port is bridged, the issue is masked by .port_stp_state_set which overwrites the address learning state to the proper value. Fixes: 4d9423549501 ("net: dsa: sja1105: offload bridge port flags to device") Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/dsa/sja1105/sja1105_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index 85a39d599ff3..bf7d59f52738 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -3287,7 +3287,7 @@ static int sja1105_port_set_learning(struct sja1105_private *priv, int port,
mac = priv->static_config.tables[BLK_IDX_MAC_CONFIG].entries;
- mac[port].dyn_learn = !!(priv->learn_ena & BIT(port));
+ mac[port].dyn_learn = enabled;
rc = sja1105_dynamic_config_write(priv, BLK_IDX_MAC_CONFIG, port,
&mac[port], true);