ath10k: block offchannel operations if TDLS session is active
authorAnilkumar Kolli <akolli@qti.qualcomm.com>
Fri, 27 Oct 2017 08:12:28 +0000 (11:12 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 27 Oct 2017 13:45:47 +0000 (16:45 +0300)
Do not allow off channel operations like scans/roc when
there are active TDLS sessions.

The Current firmware 10.4-3.5.1-00035 on QCA9888 does not
supports any offchannel operations on active TDLS sessions,
either driver needs to block the offchannel operation requests
or should teardown the TDLS connection.

Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index 485d196..0a947ee 100644 (file)
@@ -5651,6 +5651,11 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw,
 
        mutex_lock(&ar->conf_mutex);
 
+       if (ath10k_mac_tdls_vif_stations_count(hw, vif) > 0) {
+               ret = -EBUSY;
+               goto exit;
+       }
+
        spin_lock_bh(&ar->data_lock);
        switch (ar->scan.state) {
        case ATH10K_SCAN_IDLE:
@@ -6490,6 +6495,11 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw,
 
        mutex_lock(&ar->conf_mutex);
 
+       if (ath10k_mac_tdls_vif_stations_count(hw, vif) > 0) {
+               ret = -EBUSY;
+               goto exit;
+       }
+
        spin_lock_bh(&ar->data_lock);
        switch (ar->scan.state) {
        case ATH10K_SCAN_IDLE: