pmaports/device/testing/linux-samsung-treltexx/samsung-usb-ethaddr.patch
djyee 49d91586ad
samsung-treltexx: new device (MR 3285)
[ci:skip-build] already built successfully in CI
2022-07-21 21:03:47 -07:00

17 lines
790 B
Diff

For some reason, CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE disables the code in u_ether
that assigns a random MAC address to the USB network interface. This patch simply
disables it to fall back to the original code that works correctly.
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index 61d98db8bd63..105feffa4686 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -1148,7 +1148,7 @@ 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
+#if 0
memcpy(dev->host_mac, ethaddr, ETH_ALEN);
printk(KERN_DEBUG "usb: set unique host mac\n");
#else