Skip to content

Commit 2d6cb79

Browse files
tzuwen_changasus-leslieyu
authored andcommitted
usb: u_ether: Get fixed RNDIS host mac address.
Change-Id: I6e0e42427de42159bc6f608040b00ce667ee2e76
1 parent aa67223 commit 2d6cb79

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/usb/gadget/function/u_ether.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <linux/if_vlan.h>
2424

2525
#include "u_ether.h"
26-
26+
#include "../../../net/ethernet/stmicro/stmmac/eth_mac_tinker.h"
2727

2828
/*
2929
* This component encapsulates the Ethernet link glue needed to provide
@@ -1000,7 +1000,8 @@ struct net_device *gether_setup_name_default(const char *netname)
10001000

10011001
eth_random_addr(dev->dev_mac);
10021002
pr_warn("using random %s ethernet address\n", "self");
1003-
eth_random_addr(dev->host_mac);
1003+
eth_mac_eeprom(dev->host_mac);
1004+
dev->host_mac[0] = (dev->host_mac[0] == 0x02) ? 0x04 : 0x02;
10041005
pr_warn("using random %s ethernet address\n", "host");
10051006

10061007
net->netdev_ops = &eth_netdev_ops;

0 commit comments

Comments
 (0)