summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgil Hjelmeland <privat@egil-hjelmeland.no>2017-11-08 13:44:36 +0300
committerDavid S. Miller <davem@davemloft.net>2017-11-13 03:59:07 +0300
commit30482e4e2885bc71d058241d5aa1691480c8f938 (patch)
treeca1fb3bdd674b623dffe1a6d5e7add91ae197437
parentfdae5f37a88caed9d2105f5a1ff609322f9e5416 (diff)
downloadlinux-30482e4e2885bc71d058241d5aa1691480c8f938.tar.xz
net: dsa: lan9303: Fix lan9303_alr_del_port()
Fix embarrassing bug in lan9303_alr_del_port(): Instead of zeroing entr->mac_addr, I destroyed the next cache entry. Affected .port_fdb_del and .port_mdb_del. Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/lan9303-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 6d7dee67d822..a2610085e7ba 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -719,7 +719,7 @@ static int lan9303_alr_del_port(struct lan9303 *chip, const u8 *mac, int port)
entr->port_map &= ~BIT(port);
if (entr->port_map == 0) /* zero means its free again */
- eth_zero_addr(&entr->port_map);
+ eth_zero_addr(entr->mac_addr);
lan9303_alr_set_entry(chip, mac, entr->port_map, entr->stp_override);
return 0;