]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:34 +0000 (10:29 +0200)
commit196878ebf569785c469912ca820a192e698f99e3
tree2cc9d7205a2b2acfa00646fe42b672fd248a2269
parenta98fe32c03191ab12a47f3c8a3dec9019d547d11
wilc1000: Bring MAC address setting in line with typical Linux behavior

[ Upstream commit a381b78a1598dde34a6e40dae2842024308a6ef2 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/microchip/wilc1000/netdev.c