Commit 0929d1ef authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: use random default mac address

Use a random default mac address instead of a fixed one to reduce the
likelihood of mac address collision.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210830121508.6411-6-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent abfab1aa
...@@ -1033,15 +1033,8 @@ void rtw_macaddr_cfg(u8 *mac_addr) ...@@ -1033,15 +1033,8 @@ void rtw_macaddr_cfg(u8 *mac_addr)
} }
if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) { if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
mac[0] = 0x00; eth_random_addr(mac_addr);
mac[1] = 0xe0; DBG_88E("MAC Address from efuse error, assign random one !!!\n");
mac[2] = 0x4c;
mac[3] = 0x87;
mac[4] = 0x00;
mac[5] = 0x00;
/* use default mac addresss */
memcpy(mac_addr, mac, ETH_ALEN);
DBG_88E("MAC Address from efuse error, assign default one !!!\n");
} }
DBG_88E("rtw_macaddr_cfg MAC Address = %pM\n", (mac_addr)); DBG_88E("rtw_macaddr_cfg MAC Address = %pM\n", (mac_addr));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment