pmaports/device/.shared-patches/linux/samsung-usb-ethaddr.patch

17 lines
808 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 5615b9e18f8..2fd18d56d13 100755
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -1657,7 +1657,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
if (ethaddr != NULL) {
memcpy(dev->host_mac, ethaddr, ETH_ALEN);
printk(KERN_DEBUG "usb: set unique host mac\n");