[PATCH wireless-next] wifi: mt76: fix MAC address for non OF pcie cards

Thorsten Leemhuis regressions at leemhuis.info
Mon Jul 6 00:23:21 PDT 2026


On 6/30/26 23:02, Rosen Penev wrote:
> 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.

By our submission guidelines and requests from Linus this afaics should
also contain:

Reported-by: Klara Modin <klarasmodin at gmail.com>
Closes: https://lore.kernel.org/all/ajRmlyx_AEGybykL@soda.int.kasm.eu/
Reported-by: Tobias Klausmann <klausman at schwarzvogel.de>
Closes:
https://lore.kernel.org/linux-wireless/30a90714-02d8-45f2-a7f1-4cfe0627d50b@skade.local/

Both of them now CCed, too, to give them a chance to provide a "Tested-by:".

> 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

> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  drivers/net/wireless/mediatek/mt76/eeprom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
> index b99d7452800f..afdb73661866 100644
> --- a/drivers/net/wireless/mediatek/mt76/eeprom.c
> +++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
> @@ -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",




More information about the linux-arm-kernel mailing list