summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Straube <straube.linux@gmail.com>2025-10-04 12:10:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-13 10:38:37 +0200
commitb655b838aede112e864e74d0ed0cc8e8aa8686d6 (patch)
tree9eed9626ac4bb1328e5c3c0d71769cde2556b3cc
parent622c811052b3c36df10c91e46ba9d511d318ac77 (diff)
staging: rtl8723bs: fall back to random mac address
Use a random mac address if we cannot load it from the efuses. Do not use a constant mac address as fallback. This may create conflicts if we have several rtl8723bs devices on the network. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8723bs/hal/sdio_halinit.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 6f1f726d1630..4e81ef53dc47 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1014,14 +1014,10 @@ static void Hal_EfuseParseMACAddr_8723BS(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{
- u16 i;
- u8 sMacAddr[6] = {0x00, 0xE0, 0x4C, 0xb7, 0x23, 0x00};
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
if (AutoLoadFail) {
-/* sMacAddr[5] = (u8)GetRandomNumber(1, 254); */
- for (i = 0; i < 6; i++)
- pEEPROM->mac_addr[i] = sMacAddr[i];
+ eth_random_addr(pEEPROM->mac_addr);
} else {
/* Read Permanent MAC address */
memcpy(pEEPROM->mac_addr, &hwinfo[EEPROM_MAC_ADDR_8723BS], ETH_ALEN);