Re: [PATCH 2/2 v2] mt7601u: run calibration works after finishing scanning

2018-04-16 Thread Jakub Kicinski
On Mon, 16 Apr 2018 13:56:18 +0200, Stanislaw Gruszka wrote:
> 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 

Acked-by: Jakub Kicinski 

Thank you!!


[PATCH 2/2 v2] mt7601u: run calibration works after finishing scanning

2018-04-16 Thread Stanislaw Gruszka
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 
---
 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, >state);
+
+   ieee80211_queue_delayed_work(dev->hw, >cal_work,
+MT_CALIBRATE_INTERVAL);
+   if (dev->freq_cal.enabled)
+   ieee80211_queue_delayed_work(dev->hw, >freq_cal.work,
+MT_FREQ_CAL_INIT_DELAY);
 }
 
 static int
-- 
1.9.3