Commit 18867486 authored by Jakub Kicinski's avatar Jakub Kicinski

net: qmi_wwan: use dev_addr_mod()

Commit 406f42fa ("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.
Acked-by: default avatarBjørn Mork <bjorn@mork.no>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a7021af7
...@@ -835,8 +835,11 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -835,8 +835,11 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
/* make MAC addr easily distinguishable from an IP header */ /* make MAC addr easily distinguishable from an IP header */
if (possibly_iphdr(dev->net->dev_addr)) { if (possibly_iphdr(dev->net->dev_addr)) {
dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */ u8 addr = dev->net->dev_addr[0];
dev->net->dev_addr[0] &= 0xbf; /* clear "IP" bit */
addr |= 0x02; /* set local assignment bit */
addr &= 0xbf; /* clear "IP" bit */
dev_addr_mod(dev->net, 0, &addr, 1);
} }
dev->net->netdev_ops = &qmi_wwan_netdev_ops; dev->net->netdev_ops = &qmi_wwan_netdev_ops;
dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group; dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment