pmaports/device/testing/linux-samsung-j7y17lte/fix-usb-gadget-random-mac.patch
Eray Tutmaz 93f68f6253
samsung-j7y17lte: new device (MR 4502)
[ci:skip-build]: Already built successfully in CI.
2024-02-15 02:19:03 -08:00

24 lines
840 B
Diff

diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 2502ce1d..c6028edc 100755
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -1262,18 +1262,13 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
if (get_ether_addr(dev_addr, net->dev_addr))
dev_warn(&g->dev,
"using random %s ethernet address\n", "self");
-#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
- memcpy(dev->host_mac, ethaddr, ETH_ALEN);
- printk(KERN_DEBUG "usb: set unique host mac\n");
-
-#else
if (get_ether_addr(host_addr, dev->host_mac))
dev_warn(&g->dev,
"using random %s ethernet address\n", "host");
if (ethaddr)
memcpy(ethaddr, dev->host_mac, ETH_ALEN);
-#endif
+
net->netdev_ops = &eth_netdev_ops;
net->ethtool_ops = &ops;