iwlwifi: mvm: block TID when using TDLS
authorLiad Kaufman <liad.kaufman@intel.com>
Mon, 6 Oct 2014 17:08:56 +0000 (19:08 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 24 Nov 2014 06:30:23 +0000 (08:30 +0200)
Block TID 4 (VI) on a vif when using TDLS. This TID will be used by FW
for TDLS channel-switch requests and PTI requests.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index 64e89e89140c33a4961cb777e9269f8f56c161e1..5aedf9dbf23c3d2fa9d24c1ee04594ab96143570 100644 (file)
@@ -2186,6 +2186,15 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
  out_unlock:
        mutex_unlock(&mvm->mutex);
 
+       if (sta->tdls && ret == 0) {
+               if (old_state == IEEE80211_STA_NOTEXIST &&
+                   new_state == IEEE80211_STA_NONE)
+                       ieee80211_reserve_tid(sta, IWL_MVM_TDLS_FW_TID);
+               else if (old_state == IEEE80211_STA_NONE &&
+                        new_state == IEEE80211_STA_NOTEXIST)
+                       ieee80211_unreserve_tid(sta, IWL_MVM_TDLS_FW_TID);
+       }
+
        return ret;
 }