pmaports/device/testing/linux-samsung-j5y17lte/fix-usb-gadget-random-mac.patch
Andras Sebok 0bc724b8ba
samsung-j5y17lte: new device (MR 4797)
[ci:skip-build]: Already built successfully in CI.
2024-02-11 19:15:00 +01: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;