mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
wifi: mt76: fix MAC address for non OF pcie cards
If seems the check for err is wrong as the proper macaddr gets written
to from the EEPROM itself. Meaning checking err from of_get_mac_address is
wrong as the proper macaddr has been written by this point.
Closes:
https://lore.kernel.org/linux-wireless/30a90714-02d8-45f2-a7f1-4cfe0627d50b@skade.local/
Reported-by: Klara Modin <klarasmodin@gmail.com>
Closes: https://lore.kernel.org/all/ajRmlyx_AEGybykL@soda.int.kasm.eu/
Reported-by: Tobias Klausmann <klausman@schwarzvogel.de>
Fixes: 31ee158271 ("wifi: mt76: fix of_get_mac_address error handling")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Tested-by: Tobias Klausmann <klausman@schwarzvogel.de>
Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: John Rowley <lkml@johnrowley.me>
Link: https://patch.msgid.link/20260706232857.807044-1-rosenp@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
e858cf6bf9
commit
7fd35e8c05
|
|
@ -181,7 +181,7 @@ mt76_eeprom_override(struct mt76_phy *phy)
|
|||
if (err == -EPROBE_DEFER)
|
||||
return err;
|
||||
|
||||
if (err) {
|
||||
if (!is_valid_ether_addr(phy->macaddr)) {
|
||||
eth_random_addr(phy->macaddr);
|
||||
dev_info(dev->dev,
|
||||
"Invalid MAC address, using random address %pM\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user