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: run calibration after scanning
Date: Tue, 30 Oct 2018 10:39:46 +0100 [thread overview]
Message-ID: <20181030093945.GB26345@redhat.com> (raw)
In-Reply-To: <1540808213-14442-1-git-send-email-sgruszka@redhat.com>
On Mon, Oct 29, 2018 at 11:16:53AM +0100, Stanislaw Gruszka wrote:
> If we are associated and scanning is performed , sw_scan_complete callback
> is done after we get back to operating channel, so we do not perform
> phy calibration and queue cal work. Fix this by run calibration from
> sw_scan_complete().
>
> Fixes: bbd10586f0df ("mt76x0: phy: do not run calibration during channel switch")
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> This is for 4.20
>
> drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 19 +++++++++++++++++++
> drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 ++
> drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +-
> drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 2 +-
> 4 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
> index a803a9b6a4c5..896a9d46bb76 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
> @@ -78,3 +78,22 @@ int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
> return ret;
> }
> EXPORT_SYMBOL_GPL(mt76x0_config);
> +
> +void mt76x0_sw_scan_complete(struct ieee80211_hw *hw,
> + struct ieee80211_vif *vif)
> +{
> + struct mt76x02_dev *dev = hw->priv;
> +
> + mutex_lock(&dev->mt76.mutex);
> + if (vif->bss_conf.assoc) {
> + mt76x0_phy_calibrate(dev, false);
> + mt76x0_phy_set_txpower(dev);
Actually I don't think this part is needed, it is done after channel
switch just before we associate, and that seems to be sufficient.
> +
> + ieee80211_queue_delayed_work(dev->mt76.hw, &dev->cal_work,
> + MT_CALIBRATE_INTERVAL);
We just have to schedule this work, and mt76x2 suffer from similar
issue, so this can be done in mt76x02_sw_scan_complete(). Will
post v2.
Thanks
Stanislaw
prev parent reply other threads:[~2018-10-30 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 10:16 [PATCH] mt76x0: run calibration after scanning Stanislaw Gruszka
2018-10-29 14:25 ` Kalle Valo
2018-10-30 9:36 ` Stanislaw Gruszka
2018-10-30 10:23 ` Kalle Valo
2018-10-30 9:39 ` Stanislaw Gruszka [this message]
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=20181030093945.GB26345@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.