Re: [PATCHv2 wireless] wifi: mt76: fix MAC address for non OF pcie cards

Klara Modin <[email protected]>
Newsgroups org.infradead.lists.linux-mediatek,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
On 2026-07-22 08:40:56 +0200, Felix Fietkau wrote:
> Hi,
> 
> On 21.07.26 22:22, Klara Modin wrote:
> > On 2026-07-06 16:28:57 -0700, 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.
> > > 
> > > Reported-by: Klara Modin <[email protected]>
> > > Closes: https://lore.kernel.org/all/[email protected]/
> > > Reported-by: Tobias Klausmann <[email protected]>
> > > Closes:
> > > https://lore.kernel.org/linux-wireless/[email protected]/
> > > Fixes: 31ee1582717e ("wifi: mt76: fix of_get_mac_address error handling")
> > > Signed-off-by: Rosen Penev <[email protected]>
> > > Tested-by: Tobias Klausmann <[email protected]>
> > > Tested-by: Klara Modin <[email protected]>
> > > ---
> > >  v2: add extra tags and target wireless
> > >  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",
> > > -- 
> > > 2.55.0
> > > 
> > 
> > Ping. No one seems to have picked this up yet, but I suppose it is
> > holiday season.
> It's in the mt76-fixes pull request that I just sent.
> 
> - Felix

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.