]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mt7601u: run calibration works after finishing scanning
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 16 Apr 2018 11:56:18 +0000 (13:56 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 24 Apr 2018 17:33:03 +0000 (20:33 +0300)
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>
Acked-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt7601u/main.c

index 3c9ea40d9584e63e43fc7e95286021bdbcdb3447..7b21016012c333c2ac938318282d338cd39869b3 100644 (file)
@@ -288,6 +288,12 @@ mt7601u_sw_scan_complete(struct ieee80211_hw *hw,
 
        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