0bb64c2e96
Simply disabling FIMC IS does not work however due to compilation errors and a null pointer dereference. 01-fix-FIMC-IS-disabling.patch takes care of this. As with other exynos devices some additional things had to be disabled to make the kernel compile after FIMC IS had been disabled, specifically: CONFIG_CAMERA_EEPROM CONFIG_VIDEO_EXYNOS_MIPI_CSIS CONFIG_LEDS_MAX77803 Apart from that we also have: 02-netfilter-symbols.patch, which fixes another compilation error. 03-usb_gadget-set-random-rndis-host-MAC-address-to-prev.patch (taken from another device) which prevents host mac address being set to 00:00:00:00:00. Kernel sources have been changed to the lineage-16.0 branch in the exynos5420 repo, as that is where development happens at the moment.
23 lines
983 B
Diff
23 lines
983 B
Diff
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
|
|
index 934b8bacfeeb..f41d23c5f5cb 100644
|
|
--- a/drivers/usb/gadget/u_ether.c
|
|
+++ b/drivers/usb/gadget/u_ether.c
|
|
@@ -1224,8 +1224,17 @@ int gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN],
|
|
dev_warn(&g->dev,
|
|
"using random %s ethernet address\n", "self");
|
|
#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
|
|
+ if ((ethaddr[0] == 0x00) && (ethaddr[1] == 0x00) &&
|
|
+ (ethaddr[2] == 0x00) && (ethaddr[3] == 0x00) &&
|
|
+ (ethaddr[4] == 0x00) && (ethaddr[5] == 0x00)) {
|
|
+ printk(KERN_DEBUG "%s: no unique host MAC was set, generate random\n", __func__);
|
|
+ /* we can use random_ether_addr() from include/linux/etherdevice.h */
|
|
+ random_ether_addr(ethaddr);
|
|
+ } else {
|
|
+ printk(KERN_DEBUG "%s: set unique host mac\n", __func__);
|
|
+ }
|
|
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,
|