net: dsa: be mostly no-op in dsa_slave_set_mac_address when down
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 8 Mar 2022 09:15:13 +0000 (11:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2022 11:12:09 +0000 (11:12 +0000)
commite2d0576f0c009acdba63e1d763276743ff3788cc
tree4ac0a877228cca3b7b4ddf57eae1b0e47de1a200
parentc69f40ac60060e09ca8f8c2ac7e6057f8a4c9f28
net: dsa: be mostly no-op in dsa_slave_set_mac_address when down

Since the slave unicast address is synced to hardware and to the DSA
master during dsa_slave_open(), this means that a call to
dsa_slave_set_mac_address() while the slave interface is down will
result to a call to dsa_port_standalone_host_fdb_del() and to
dev_uc_del() for the MAC address while there was no previous
dsa_port_standalone_host_fdb_add() or dev_uc_add().

This is a partial revert of the blamed commit below, which was too
aggressive.

Fixes: 35aae5ab9121 ("net: dsa: remove workarounds for changing master promisc/allmulti only while up")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c