Skip to content

Commit 1635520

Browse files
pfink-christdavem330
authored andcommitted
net: usb: ax88179_178a: write mac to hardware in get_mac_addr
When the MAC address is supplied via device tree or a random MAC is generated it has to be written to the asix chip in order to receive any data. Previously in 9fb137a ("net: usb: ax88179_178a: allow optionally getting mac address from device tree") this line was omitted because it seemed to work perfectly fine without it. But it was simply not detected because the chip keeps the mac stored even beyond a reset and it was tested on a hardware with an integrated UPS where the asix chip was permanently powered on even throughout power cycles. Fixes: 9fb137a ("net: usb: ax88179_178a: allow optionally getting mac address from device tree") Signed-off-by: Peter Fink <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 28e72b2 commit 1635520

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/usb/ax88179_178a.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,9 @@ static void ax88179_get_mac_addr(struct usbnet *dev)
12351235
netdev_info(dev->net, "invalid MAC address, using random\n");
12361236
eth_hw_addr_random(dev->net);
12371237
}
1238+
1239+
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_NODE_ID, ETH_ALEN, ETH_ALEN,
1240+
dev->net->dev_addr);
12381241
}
12391242

12401243
static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)

0 commit comments

Comments
 (0)