wifi: mt76: fix MAC address for non OF pcie cards
Subsystems (3)
PATCH 1/1 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.
--- drivers/net/wireless/mediatek/mt76/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/eeprom.c +1 -1
@@ -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",
Signature · 1 line
2.55.0
Quoted 3 lines · Rosen Penev
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_addressis wrong as the proper macaddr has been written by this point.
By our submission guidelines and requests from Linus this afaics should also contain:
Closes:
https://lore.kernel.org/linux-wireless/[email protected]/
Both of them now CCed, too, to give them a chance to provide a "Tested-by:".
Quoted 1 line
Fixes 31ee1582717e ("wifi: mt76: fix of_get_mac_address error handling")
Given this and the reports linked above this afaics should also be tagged with "wireless", and not with "wireless-next", as this commit is in 7.2-rc1 -- and thus ideally should be fixed by now. See
https://www.kernel.org/doc/html/latest/process/handling-regressions.html#on-how-quickly-regressions-should-be-fixed,
which contains links to these quotes from Linus:
""But a user complaining should basically result in an immediate fix - possibly a "revert and rethink"."" and ""It's also worth noting that "immediate" obviously doesn't mean "right this *second* when the problem has been reported". But if it's a regression with a known commit that caused it, I think the rule of thumb should generally be "within a week", preferably before the next rc.""
Ciao, Thorsten
Quoted 18 lines
Signed-off-by Rosen Penev <[email protected]>--- drivers/net/wireless/mediatek/mt76/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/mediatek/mt76/eeprom.c +1
-1@@ -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",
Tobias Klausmann
Tested-byHi!
Quoted 8 lines · Thorsten Leemhuis
Quoted 3 lines · Rosen Penev
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_addressis wrong as the proper macaddr has been written by this point.By our submission guidelines and requests from Linus this afaics should also contain:
Quoted 9 lines
Reported-by Klara Modin <[email protected]>Reported-by Tobias Klausmann <[email protected]>Closes:
https://lore.kernel.org/linux-wireless/[email protected]/Both of them now CCed, too, to give them a chance to provide a "Tested-by:".
Quoted 1 line
Fixes 31ee1582717e ("wifi: mt76: fix of_get_mac_address error handling")
Indeed:
I've been running 7.2.0-rc1+the revert for a few days now with zero issues (not that I expected any).
Best,
Tobias
Quoted 6 lines · Rosen Penev
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_addressis wrong as the proper macaddr has been written by this point.Fixes 31ee1582717e ("wifi: mt76: fix of_get_mac_address error handling")Signed-off-by Rosen Penev <[email protected]>
Quoted 20 lines
--- drivers/net/wireless/mediatek/mt76/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/mediatek/mt76/eeprom.c +1
-1@@ -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",Signature · 1 line
2.55.0
Quoted 6 lines · Rosen Penev
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_addressis wrong as the proper macaddr has been written by this point.Fixes 31ee1582717e ("wifi: mt76: fix of_get_mac_address error handling")Signed-off-by Rosen Penev <[email protected]>
Fixed, thanks.
Quoted 21 lines
--- drivers/net/wireless/mediatek/mt76/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/mediatek/mt76/eeprom.c +1
-1@@ -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",Signature · 1 line
2.55.0