Skip to content

Commit 4b5b55f

Browse files
tzuwen_changasus-leslieyu
authored andcommitted
usb: u_ether: Get fixed RNDIS host mac address.
Change-Id: I6e0e42427de42159bc6f608040b00ce667ee2e76
1 parent 7516511 commit 4b5b55f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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
@@ -1002,7 +1002,8 @@ struct net_device *gether_setup_name_default(const char *netname)
10021002

10031003
eth_random_addr(dev->dev_mac);
10041004
pr_warn("using random %s ethernet address\n", "self");
1005-
eth_random_addr(dev->host_mac);
1005+
eth_mac_eeprom(dev->host_mac);
1006+
dev->host_mac[0] = (dev->host_mac[0] == 0x02) ? 0x04 : 0x02;
10061007
pr_warn("using random %s ethernet address\n", "host");
10071008

10081009
net->netdev_ops = &eth_netdev_ops;

0 commit comments

Comments
 (0)