From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt76x0: use band parameter for LC calibration
Date: Tue, 30 Oct 2018 12:12:41 +0100 [thread overview]
Message-ID: <20181030111240.GD32471@localhost.localdomain> (raw)
In-Reply-To: <1540484313-9354-1-git-send-email-sgruszka@redhat.com>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> index c734987a344c..ca24b5716b58 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> @@ -522,6 +522,7 @@ void mt76x0_phy_set_txpower(struct mt76x02_dev *dev)
> void mt76x0_phy_calibrate(struct mt76x02_dev *dev, bool power_on)
> {
> struct ieee80211_channel *chan = dev->mt76.chandef.chan;
> + int is_5ghz = (chan->band == NL80211_BAND_5GHZ) ? 1 : 0;
> u32 val, tx_alc, reg_val;
>
> if (is_mt7630(dev))
> @@ -542,7 +543,7 @@ void mt76x0_phy_calibrate(struct mt76x02_dev *dev, bool power_on)
> reg_val = mt76_rr(dev, MT_BBP(IBI, 9));
> mt76_wr(dev, MT_BBP(IBI, 9), 0xffffff7e);
>
> - if (chan->band == NL80211_BAND_5GHZ) {
> + if (is_5ghz) {
> if (chan->hw_value < 100)
> val = 0x701;
> else if (chan->hw_value < 140)
> @@ -555,7 +556,7 @@ void mt76x0_phy_calibrate(struct mt76x02_dev *dev, bool power_on)
>
> mt76x02_mcu_calibrate(dev, MCU_CAL_FULL, val, false);
> msleep(350);
> - mt76x02_mcu_calibrate(dev, MCU_CAL_LC, 1, false);
> + mt76x02_mcu_calibrate(dev, MCU_CAL_LC, is_5ghz, false);
> usleep_range(15000, 20000);
>
> mt76_wr(dev, MT_BBP(IBI, 9), reg_val);
> --
> 2.7.5
>
Tested-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Regards,
Lorenzo
next prev parent reply other threads:[~2018-10-30 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 16:18 [PATCH] mt76x0: use band parameter for LC calibration Stanislaw Gruszka
2018-10-29 14:30 ` Kalle Valo
2018-10-30 11:12 ` Lorenzo Bianconi [this message]
2018-10-30 13:20 ` Stanislaw Gruszka
2018-11-05 14:58 ` Kalle Valo
2018-11-05 15:00 ` Felix Fietkau
2018-11-05 17:01 ` Felix Fietkau
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=20181030111240.GD32471@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=sgruszka@redhat.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).