Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 720620f7 authored by Amit Pundir's avatar Amit Pundir
Browse files

ANDROID: usb: gadget: fix skip Host MAC address reassignment



Change-Id: I43add9925e9d6d90c56cffbd3ed999104448f818 to skip
reassignment of Host MAC address at the time of reconnection, is broken
on newer (>3.10) AOSP/kernel/common trees. It updates deprecated
gether_setup_name() which is no longer used by RNDIS.

gether_setup_name_default() function need to be updated instead.

Fixes: cc0be22f ("usb: gadget: prevent change of Host MAC address of
'usb0' interface")
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent 4b1bceff
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1025,8 +1025,10 @@ struct net_device *gether_setup_name_default(const char *netname)

	eth_random_addr(dev->dev_mac);
	pr_warn("using random %s ethernet address\n", "self");
	eth_random_addr(dev->host_mac);
	if (get_host_ether_addr(host_ethaddr, dev->host_mac))
		pr_warn("using random %s ethernet address\n", "host");
        else
		pr_warn("using previous %s ethernet address\n", "host");

	net->netdev_ops = &eth_netdev_ops;