]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: fix offchannel cancel failures
authorMichal Kazior <michal.kazior@tieto.com>
Mon, 24 Nov 2014 13:58:33 +0000 (14:58 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 26 Nov 2014 06:30:16 +0000 (08:30 +0200)
When mac80211 requests driver to cancel a hw roc
the driver must not call the expired() callback or
else roc will fail in some cases depending on how
things get scheduled.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index 770d2b59d73420a54f913ac203d00ae12208c2bf..8d07f77e34de1210f0ecd7922497c75063583af3 100644 (file)
@@ -2184,10 +2184,10 @@ void __ath10k_scan_finish(struct ath10k *ar)
        case ATH10K_SCAN_IDLE:
                break;
        case ATH10K_SCAN_RUNNING:
-       case ATH10K_SCAN_ABORTING:
                if (ar->scan.is_roc)
                        ieee80211_remain_on_channel_expired(ar->hw);
-               else
+       case ATH10K_SCAN_ABORTING:
+               if (!ar->scan.is_roc)
                        ieee80211_scan_completed(ar->hw,
                                                 (ar->scan.state ==
                                                  ATH10K_SCAN_ABORTING));