ath10k: stop monitor vdev for sta assoc
authorMichal Kazior <michal.kazior@tieto.com>
Thu, 28 Aug 2014 10:58:17 +0000 (12:58 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 2 Sep 2014 07:28:47 +0000 (10:28 +0300)
This prevents some fw revisions from crashing in
many cases when user is trying to run a
promiscuous station interface (e.g. sniffing,
4addr bridge).

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 8d793f31bbd8dc701bfe090d2445bc42032ae503..100ed4f0cabdce0b2e0ad3985c4fdfb02813b2fd 100644 (file)
@@ -3169,8 +3169,16 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
        }
 
        if (changed & BSS_CHANGED_ASSOC) {
-               if (info->assoc)
+               if (info->assoc) {
+                       /* Workaround: Make sure monitor vdev is not running
+                        * when associating to prevent some firmware revisions
+                        * (e.g. 10.1 and 10.2) from crashing.
+                        */
+                       if (ar->monitor_started)
+                               ath10k_monitor_stop(ar);
                        ath10k_bss_assoc(hw, vif, info);
+                       ath10k_monitor_recalc(ar);
+               }
        }
 
 exit: