From: Lorenzo Bianconi <lorenzo@kernel.org>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com,
kevin.patrick.schmidt@googlemail.com, paweldembicki@gmail.com,
freifunk@adrianschmutzler.de, nbd@nbd.name
Subject: Re: [PATCH] mt76: mt76x0: fix default mac address overwrite
Date: Sun, 1 Dec 2019 11:14:39 +0200 [thread overview]
Message-ID: <20191201091439.GA5150@localhost.localdomain> (raw)
In-Reply-To: <567a7cda15f641acb6eab5970370c9bfac96793e.1574548832.git.lorenzo@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]
> Current implementation always use default eeprom mac address to
> configure device registers even if it is updated using
> mt76_eeprom_override. Fix it initializing macaddr filed of mt76_dev data
> structure with eeprom mac address and running mt76_eeprom_override
> before mt76x02_mac_setaddr
>
> Fixes: d1bc9bf2072c ("mt76: mt76x0: eeprom: add support for MAC address from OF")
> Tested-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Hi Kalle,
since the commit d1bc9bf2072c is already in Linus's tree and multiple users
reported regression due this commit, could you please apply this patch in
wireless-drivers tree?
Regards,
Lorenzo
> ---
> drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
> index a03e2d01fba7..d1405528b504 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
> @@ -342,8 +342,11 @@ int mt76x0_eeprom_init(struct mt76x02_dev *dev)
> dev_info(dev->mt76.dev, "EEPROM ver:%02hhx fae:%02hhx\n",
> version, fae);
>
> - mt76x02_mac_setaddr(dev, dev->mt76.eeprom.data + MT_EE_MAC_ADDR);
> + memcpy(dev->mt76.macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR,
> + ETH_ALEN);
> mt76_eeprom_override(&dev->mt76);
> + mt76x02_mac_setaddr(dev, dev->mt76.macaddr);
> +
> mt76x0_set_chip_cap(dev);
> mt76x0_set_freq_offset(dev);
> mt76x0_set_temp_offset(dev);
> --
> 2.21.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2019-12-01 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-23 22:42 [PATCH] mt76: mt76x0: fix default mac address overwrite Lorenzo Bianconi
2019-12-01 9:14 ` Lorenzo Bianconi [this message]
2019-12-02 9:16 ` Kalle Valo
[not found] ` <0101016ec5e5b1ef-b4e11580-7984-4edc-94ef-5656419b4d26-000000@us-west-2.amazonses.com>
2019-12-02 9:21 ` Lorenzo Bianconi
2019-12-02 14:49 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191201091439.GA5150@localhost.localdomain \
--to=lorenzo@kernel.org \
--cc=freifunk@adrianschmutzler.de \
--cc=kevin.patrick.schmidt@googlemail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
--cc=paweldembicki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).