]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: mvm: support tdls in dqa mode
authorLiad Kaufman <liad.kaufman@intel.com>
Sun, 5 Jun 2016 07:49:02 +0000 (10:49 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 6 Jul 2016 06:59:55 +0000 (09:59 +0300)
Support TDLS when working in DQA mode.

This is done mainly by NOT doing any special things
for TDLS, as the queues are dynamically created anyway,
so no need to allocate them ahead of time.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index 7321bb6b8d6754a911dbacd270d33fe8effd7c8e..1617de7c2ddc5e473c357c598194e00219006f80 100644 (file)
@@ -893,8 +893,11 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
        mvm_sta->tid_disable_agg = 0xffff; /* No aggs at first */
        mvm_sta->tfd_queue_msk = 0;
 
-       /* allocate new queues for a TDLS station */
-       if (sta->tdls) {
+       /*
+        * Allocate new queues for a TDLS station, unless we're in DQA mode,
+        * and then they'll be allocated dynamically
+        */
+       if (!iwl_mvm_is_dqa_supported(mvm) && sta->tdls) {
                ret = iwl_mvm_tdls_sta_init(mvm, sta);
                if (ret)
                        return ret;
@@ -958,7 +961,8 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,
        return 0;
 
 err:
-       iwl_mvm_tdls_sta_deinit(mvm, sta);
+       if (!iwl_mvm_is_dqa_supported(mvm) && sta->tdls)
+               iwl_mvm_tdls_sta_deinit(mvm, sta);
        return ret;
 }
 
@@ -1164,16 +1168,19 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
                if (iwl_mvm_is_dqa_supported(mvm))
                        iwl_mvm_disable_sta_queues(mvm, vif, mvm_sta);
 
-               /* if we are associated - we can't remove the AP STA now */
-               if (vif->bss_conf.assoc)
-                       return ret;
+               if (vif->type == NL80211_IFTYPE_STATION &&
+                   mvmvif->ap_sta_id == mvm_sta->sta_id) {
+                       /* if associated - we can't remove the AP STA now */
+                       if (vif->bss_conf.assoc)
+                               return ret;
 
-               /* unassoc - go ahead - remove the AP STA now */
-               mvmvif->ap_sta_id = IWL_MVM_STATION_COUNT;
+                       /* unassoc - go ahead - remove the AP STA now */
+                       mvmvif->ap_sta_id = IWL_MVM_STATION_COUNT;
 
-               /* clear d0i3_ap_sta_id if no longer relevant */
-               if (mvm->d0i3_ap_sta_id == mvm_sta->sta_id)
-                       mvm->d0i3_ap_sta_id = IWL_MVM_STATION_COUNT;
+                       /* clear d0i3_ap_sta_id if no longer relevant */
+                       if (mvm->d0i3_ap_sta_id == mvm_sta->sta_id)
+                               mvm->d0i3_ap_sta_id = IWL_MVM_STATION_COUNT;
+               }
        }
 
        /*
@@ -1211,7 +1218,7 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
        } else {
                spin_unlock_bh(&mvm_sta->lock);
 
-               if (sta->tdls)
+               if (!iwl_mvm_is_dqa_supported(mvm) && sta->tdls)
                        iwl_mvm_tdls_sta_deinit(mvm, sta);
 
                ret = iwl_mvm_rm_sta_common(mvm, mvm_sta->sta_id);
index f3a6e95cedece8e861923e2b20c74e8061e3941c..c6585ab48df3b5e15698bdfbfbaecc89333cf782 100644 (file)
@@ -546,6 +546,9 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
         * (this is not possible for unicast packets as a TLDS discovery
         * response are sent without a station entry); otherwise use the
         * AUX station.
+        * In DQA mode, if vif is of type STATION and frames are not multicast,
+        * they should be sent from the BSS queue. For example, TDLS setup
+        * frames should be sent on this queue, as they go through the AP.
         */
        sta_id = mvm->aux_sta.sta_id;
        if (info.control.vif) {
@@ -563,6 +566,9 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
 
                        if (ap_sta_id != IWL_MVM_STATION_COUNT)
                                sta_id = ap_sta_id;
+               } else if (iwl_mvm_is_dqa_supported(mvm) &&
+                          info.control.vif->type == NL80211_IFTYPE_STATION) {
+                       queue = IWL_MVM_DQA_BSS_CLIENT_QUEUE;
                }
        }
 
@@ -906,7 +912,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
 
        WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM);
 
-       if (sta->tdls) {
+       if (sta->tdls && !iwl_mvm_is_dqa_supported(mvm)) {
                /* default to TID 0 for non-QoS packets */
                u8 tdls_tid = tid == IWL_MAX_TID_COUNT ? 0 : tid;