diff mbox series

[3/3] net: usb: ax88179_178a: Allow live update of devices' mac address

Message ID ME3P282MB2827F9C56A588D9794DC0750D15F9@ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM (mailing list archive)
State Superseded
Headers show
Series [1/3] net: usb: ax88179_178a: Enable FLAG_MULTI_PACKET to improve tx stability | expand

Commit Message

Yen Chun-Chao Oct. 7, 2022, 2:20 p.m. UTC
Problem Description:
Live update of devices' mac address is currently blocked by this driver, as
it requires the evaluation of netif_running() given the corresponding
device being false. While appearing a harmless check, it can be disruptive
in some networking configurations, such as "Link Aggregation" operated in
active-backup mode with fail_over_mac=follow, where the mac address of a
device will be updated dynamically even when it is already up and running.

Solution:
Remove the check of netif_running() in ax88179_set_mac_addr(), so that the
update procedure can proceed irrespective of the boolean status returned by
netif_running().

Verification:
Only tested with this device:
0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet

Signed-off-by: Chun-Chao Yen <nothingstopsme@hotmail.com>
---
 drivers/net/usb/ax88179_178a.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 96ede3a131d4..84016e0567d4 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -958,8 +958,6 @@  static int ax88179_set_mac_addr(struct net_device *net, void *p)
 	struct sockaddr *addr = p;
 	int ret;
 
-	if (netif_running(net))
-		return -EBUSY;
 	if (!is_valid_ether_addr(addr->sa_data))
 		return -EADDRNOTAVAIL;