wilc1000: Bring MAC address setting in line with typical Linux behavior
authorDavid Mosberger-Tang <davidm@egauge.net>
Wed, 3 Mar 2021 19:50:07 +0000 (19:50 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 17 Apr 2021 17:51:06 +0000 (20:51 +0300)
commita381b78a1598dde34a6e40dae2842024308a6ef2
tree124ee6c3c92e09adda8a417b8c01de7df67e2ffb
parentc872e7ae056f16e27311fb30d637032cc3b1cb46
wilc1000: Bring MAC address setting in line with typical Linux behavior

Linux network drivers normally disallow changing the MAC address when
the interface is up.  This driver has been different in that it allows
to change the MAC address *only* when it's up.  This patch brings
wilc1000 behavior more in line with other network drivers.  We could
have replaced wilc_set_mac_addr() with eth_mac_addr() but that would
break existing documentation on how to change the MAC address.
Likewise, return -EADDRNOTAVAIL (not -EINVAL) when the specified MAC
address is invalid or unavailable.

Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210303194846.1823596-1-davidm@egauge.net
drivers/net/wireless/microchip/wilc1000/netdev.c