wifi: rtw88: Use random MAC when efuse MAC invalid
authorChris Morgan <macromorgan@hotmail.com>
Fri, 8 Dec 2023 15:07:39 +0000 (09:07 -0600)
committerKalle Valo <kvalo@kernel.org>
Tue, 12 Dec 2023 15:34:41 +0000 (17:34 +0200)
commit0a999d82b782b55626e370ae2006dd51b48923ee
tree85fc5f63118af25ad584ede9decd17d0edbcf1cb
parentfe0a7776d4d19e613bb8dd80fe2d78ae49e8b49d
wifi: rtw88: Use random MAC when efuse MAC invalid

When the MAC address read from the efuse data is invalid, warn the
user and use a random MAC address instead.

On a device I am currently using (Anbernic RG-ARC) with a rtw8821cs
the efuse appears to be incompletely/improperly programmed. The MAC
address reads as ff:ff:ff:ff:ff:ff. When networkmanager attempts to
initiate a connection (and I haven't hard-coded a MAC address or
set it to random) it fails to establish a connection.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231208150739.129753-1-macroalpha82@gmail.com
drivers/net/wireless/realtek/rtw88/main.c