All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: Jakub Kicinski <kubakici@wp.pl>, Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [PATCH 2/2 v2] mt7601u: run calibration works after finishing scanning
Date: Mon, 16 Apr 2018 13:56:18 +0200	[thread overview]
Message-ID: <1523879778-6455-2-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1523879778-6455-1-git-send-email-sgruszka@redhat.com>

When finishing scanning we switch to operational channel sill with
SCANNING flag. This mean that we never perform calibration works after
scanning. To fix the problem queue calibration works on
.sw_scan_complete() routine.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/mediatek/mt7601u/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/mediatek/mt7601u/main.c b/drivers/net/wireless/mediatek/mt7601u/main.c
index 43ebd460ba86..f2ddefaa29f7 100644
--- a/drivers/net/wireless/mediatek/mt7601u/main.c
+++ b/drivers/net/wireless/mediatek/mt7601u/main.c
@@ -285,6 +285,12 @@ static int mt7601u_config(struct ieee80211_hw *hw, u32 changed)
 
 	mt7601u_agc_restore(dev);
 	clear_bit(MT7601U_STATE_SCANNING, &dev->state);
+
+	ieee80211_queue_delayed_work(dev->hw, &dev->cal_work,
+				     MT_CALIBRATE_INTERVAL);
+	if (dev->freq_cal.enabled)
+		ieee80211_queue_delayed_work(dev->hw, &dev->freq_cal.work,
+					     MT_FREQ_CAL_INIT_DELAY);
 }
 
 static int
-- 
1.9.3

  reply	other threads:[~2018-04-16 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 11:56 [PATCH 1/2 v2] mt7601u: use EWMA to calculate avg_rssi Stanislaw Gruszka
2018-04-16 11:56 ` Stanislaw Gruszka [this message]
2018-04-16 17:24   ` [PATCH 2/2 v2] mt7601u: run calibration works after finishing scanning Jakub Kicinski
2018-04-24 17:33 ` [1/2,v2] mt7601u: use EWMA to calculate avg_rssi 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=1523879778-6455-2-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=kubakici@wp.pl \
    --cc=linux-wireless@vger.kernel.org \
    /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.