iwlwifi: mvm: map cab_queue to different txq_id
authorSara Sharon <sara.sharon@intel.com>
Wed, 22 Feb 2017 17:35:10 +0000 (19:35 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 25 Apr 2017 19:39:09 +0000 (22:39 +0300)
cab_queue can now get bigger than u8, since in TVQM we will support
512 queues..
Support it by maintaining internal mapping between the actual number
and mac80211 queue (IWL_MVM_DQA_GCAST_QUEUE).
For pre-a000 the internal queue will be the same as the mac80211
queue.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index 9e69b9d2012cca424abb5fffd4763670e09d90ce..2476af904f5e503881ea0322c3b89f7340b4e0f5 100644 (file)
@@ -467,6 +467,11 @@ static int iwl_mvm_mac_ctxt_allocate_resources(struct iwl_mvm *mvm,
                        queue = IWL_MVM_DQA_GCAST_QUEUE;
                }
 
+               /*
+                * For TVQM this will be overwritten later with the FW assigned
+                * queue value (when queue is enabled).
+                */
+               mvmvif->cab_queue = queue;
                vif->cab_queue = queue;
        } else {
                vif->cab_queue = IEEE80211_INVAL_HW_QUEUE;
index 1bb4249fc6f41e405a75bee8d88064dbbd91509e..1dbe37f8b08ca700030f72e61dbb134fe6d23208 100644 (file)
@@ -380,6 +380,8 @@ struct iwl_mvm_vif {
        bool associated;
        u8 ap_assoc_sta_count;
 
+       u16 cab_queue;
+
        bool uploaded;
        bool ap_ibss_active;
        bool pm_enabled;
index b5b7214a811ffbc543e25e08dc197bc6695eff2f..2d5d1fc100134b2f8a4376dc1ae4af3835b69e83 100644 (file)
@@ -2128,7 +2128,7 @@ int iwl_mvm_add_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
                                                    msta->sta_id,
                                                    IWL_MAX_TID_COUNT,
                                                    timeout);
-               vif->cab_queue = queue;
+               mvmvif->cab_queue = queue;
        } else {
                iwl_mvm_enable_txq(mvm, vif->cab_queue, vif->cab_queue, 0,
                                   &cfg, timeout);
@@ -2151,7 +2151,7 @@ int iwl_mvm_rm_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
        if (!iwl_mvm_is_dqa_supported(mvm))
                return 0;
 
-       iwl_mvm_disable_txq(mvm, vif->cab_queue, vif->cab_queue,
+       iwl_mvm_disable_txq(mvm, mvmvif->cab_queue, vif->cab_queue,
                            IWL_MAX_TID_COUNT, 0);
 
        ret = iwl_mvm_rm_sta_common(mvm, mvmvif->mcast_sta.sta_id);
index 8f737f6cdd80b8458b66b8aace13ab3e33a51d47..06bd7cc562ff7ceef28afbcc72a14ebb50fa6bbb 100644 (file)
@@ -630,6 +630,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
                        if (queue < 0)
                                return -1;
 
+                       if (queue == info.control.vif->cab_queue)
+                               queue = mvmvif->cab_queue;
                } else if (info.control.vif->type == NL80211_IFTYPE_STATION &&
                           is_multicast_ether_addr(hdr->addr1)) {
                        u8 ap_sta_id = ACCESS_ONCE(mvmvif->ap_sta_id);