diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-21 15:12:06 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-22 19:16:01 +0200 |
commit | 2674e7ea22ba0e22a2d1603bd51e0b8f6442a267 (patch) | |
tree | c9bd14aa06aae52d8a85ec0d74ee2a2def438500 /drivers/net/usb/ch9200.c | |
parent | net: qmi_wwan: use dev_addr_mod() (diff) | |
download | linux-2674e7ea22ba0e22a2d1603bd51e0b8f6442a267.tar.xz linux-2674e7ea22ba0e22a2d1603bd51e0b8f6442a267.zip |
net: usb: don't write directly to netdev->dev_addr
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.
Manually fix all net/usb drivers without separate maintainers.
v2: catc does DMA to the buffer, leave the conversion to Oliver
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/usb/ch9200.c')
-rw-r--r-- | drivers/net/usb/ch9200.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c index d7f3b70d5477..f69d9b902da0 100644 --- a/drivers/net/usb/ch9200.c +++ b/drivers/net/usb/ch9200.c @@ -336,6 +336,7 @@ static int ch9200_bind(struct usbnet *dev, struct usb_interface *intf) { int retval = 0; unsigned char data[2]; + u8 addr[ETH_ALEN]; retval = usbnet_get_endpoints(dev, intf); if (retval) @@ -383,7 +384,8 @@ static int ch9200_bind(struct usbnet *dev, struct usb_interface *intf) retval = control_write(dev, REQUEST_WRITE, 0, MAC_REG_CTRL, data, 0x02, CONTROL_TIMEOUT_MS); - retval = get_mac_address(dev, dev->net->dev_addr); + retval = get_mac_address(dev, addr); + eth_hw_addr_set(dev->net, addr); return retval; } |