From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt76x0: phy: fix restore phase in mt76x0_phy_recalibrate_after_assoc
Date: Tue, 9 Oct 2018 09:35:46 +0200 [thread overview]
Message-ID: <20181009073545.GA21027@redhat.com> (raw)
In-Reply-To: <636edb3c-a2dc-306d-8ddd-8b91ebafd4f1@nbd.name>
On Mon, Oct 08, 2018 at 08:11:45PM +0200, Felix Fietkau wrote:
> On 2018-10-08 14:40, Lorenzo Bianconi wrote:
> > Fix restore value configured in 0x2124 register in
> > mt76x0_phy_recalibrate_after_assoc routine.
> >
> > Fixes: 10de7a8b4ab9 ("mt76x0: phy files")
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> > ---
> > drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> > index 99e0a91a2f99..d18942e54048 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> > @@ -734,8 +734,7 @@ void mt76x0_phy_recalibrate_after_assoc(struct mt76x02_dev *dev)
> > usleep_range(500, 700);
> >
> > reg_val = mt76_rr(dev, 0x2124);
> > - reg_val &= 0xffffff7e;
> > - mt76_wr(dev, 0x2124, reg_val);
> > + mt76_wr(dev, 0x2124, 0xffffff7e);
> I'm pretty sure you can drop the mt76_rr as well. Also, you can refer to
> 0x2124 as MT_BBP(IBI, 9).
I think is needed we do:
reg_val = mt76_rr(dev, 0x2124);
mt76_wr(dev, 0x2124, 0xffffff7e);
CALIBRATE
mt76_wr(dev, 0x2124, reg_val);
so seems we have to restore orginal value after calibration.
Referencing as MT_BBP(IBI, 9) is obviously fine.
Thanks
Stanislaw
next prev parent reply other threads:[~2018-10-09 7:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1539001391.git.lorenzo.bianconi@redhat.com>
2018-10-08 12:40 ` [PATCH] mt76x0: phy: fix restore phase in mt76x0_phy_recalibrate_after_assoc Lorenzo Bianconi
2018-10-08 18:11 ` Felix Fietkau
2018-10-08 19:55 ` Lorenzo Bianconi
2018-10-09 7:35 ` Stanislaw Gruszka [this message]
2018-10-09 8:35 ` Felix Fietkau
2018-10-09 8:48 ` Lorenzo Bianconi
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=20181009073545.GA21027@redhat.com \
--to=sgruszka@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
/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).