提交 49f71713 编写于 作者: S Sara Sharon 提交者: Luca Coelho

iwlwifi: mvm: don't assume static queue numbers

In a000 devices FW will assign the queue number. Prepare for
that by getting rid of static defines and store them in variables.
Enlarge to u16 since we may have up to 512 queues.
Signed-off-by: NSara Sharon <sara.sharon@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 9c36fd71
...@@ -976,7 +976,10 @@ struct iwl_mvm { ...@@ -976,7 +976,10 @@ struct iwl_mvm {
#endif #endif
/* Tx queues */ /* Tx queues */
u8 aux_queue; u16 aux_queue;
u16 probe_queue;
u16 p2p_dev_queue;
u8 first_agg_queue; u8 first_agg_queue;
u8 last_agg_queue; u8 last_agg_queue;
......
...@@ -603,6 +603,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, ...@@ -603,6 +603,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
} }
} else { } else {
mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE;
mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE;
mvm->first_agg_queue = IWL_MVM_DQA_MIN_DATA_QUEUE; mvm->first_agg_queue = IWL_MVM_DQA_MIN_DATA_QUEUE;
mvm->last_agg_queue = IWL_MVM_DQA_MAX_DATA_QUEUE; mvm->last_agg_queue = IWL_MVM_DQA_MAX_DATA_QUEUE;
} }
......
...@@ -1806,9 +1806,9 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) ...@@ -1806,9 +1806,9 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
int queue; int queue;
if (vif->type == NL80211_IFTYPE_AP) if (vif->type == NL80211_IFTYPE_AP)
queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; queue = mvm->probe_queue;
else if (vif->type == NL80211_IFTYPE_P2P_DEVICE) else if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; queue = mvm->p2p_dev_queue;
else if (WARN(1, "Missing required TXQ for adding bcast STA\n")) else if (WARN(1, "Missing required TXQ for adding bcast STA\n"))
return -EINVAL; return -EINVAL;
...@@ -1836,24 +1836,18 @@ static void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm *mvm, ...@@ -1836,24 +1836,18 @@ static void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm *mvm,
lockdep_assert_held(&mvm->mutex); lockdep_assert_held(&mvm->mutex);
if (mvmvif->bcast_sta.tfd_queue_msk & if (mvmvif->bcast_sta.tfd_queue_msk & BIT(mvm->probe_queue)) {
BIT(IWL_MVM_DQA_AP_PROBE_RESP_QUEUE)) { iwl_mvm_disable_txq(mvm, mvm->probe_queue,
iwl_mvm_disable_txq(mvm,
IWL_MVM_DQA_AP_PROBE_RESP_QUEUE,
vif->hw_queue[0], IWL_MAX_TID_COUNT, vif->hw_queue[0], IWL_MAX_TID_COUNT,
0); 0);
mvmvif->bcast_sta.tfd_queue_msk &= mvmvif->bcast_sta.tfd_queue_msk &= ~BIT(mvm->probe_queue);
~BIT(IWL_MVM_DQA_AP_PROBE_RESP_QUEUE);
} }
if (mvmvif->bcast_sta.tfd_queue_msk & if (mvmvif->bcast_sta.tfd_queue_msk & BIT(mvm->p2p_dev_queue)) {
BIT(IWL_MVM_DQA_P2P_DEVICE_QUEUE)) { iwl_mvm_disable_txq(mvm, mvm->p2p_dev_queue,
iwl_mvm_disable_txq(mvm,
IWL_MVM_DQA_P2P_DEVICE_QUEUE,
vif->hw_queue[0], IWL_MAX_TID_COUNT, vif->hw_queue[0], IWL_MAX_TID_COUNT,
0); 0);
mvmvif->bcast_sta.tfd_queue_msk &= mvmvif->bcast_sta.tfd_queue_msk &= ~BIT(mvm->p2p_dev_queue);
~BIT(IWL_MVM_DQA_P2P_DEVICE_QUEUE);
} }
} }
......
...@@ -513,20 +513,20 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm, ...@@ -513,20 +513,20 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
*/ */
if (ieee80211_is_probe_resp(fc) || ieee80211_is_auth(fc) || if (ieee80211_is_probe_resp(fc) || ieee80211_is_auth(fc) ||
ieee80211_is_deauth(fc)) ieee80211_is_deauth(fc))
return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; return mvm->probe_queue;
if (info->hw_queue == info->control.vif->cab_queue) if (info->hw_queue == info->control.vif->cab_queue)
return info->hw_queue; return info->hw_queue;
WARN_ONCE(1, "fc=0x%02x", le16_to_cpu(fc)); WARN_ONCE(1, "fc=0x%02x", le16_to_cpu(fc));
return IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; return mvm->probe_queue;
case NL80211_IFTYPE_P2P_DEVICE: case NL80211_IFTYPE_P2P_DEVICE:
if (ieee80211_is_mgmt(fc)) if (ieee80211_is_mgmt(fc))
return IWL_MVM_DQA_P2P_DEVICE_QUEUE; return mvm->p2p_dev_queue;
if (info->hw_queue == info->control.vif->cab_queue) if (info->hw_queue == info->control.vif->cab_queue)
return info->hw_queue; return info->hw_queue;
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
return IWL_MVM_DQA_P2P_DEVICE_QUEUE; return mvm->p2p_dev_queue;
default: default:
WARN_ONCE(1, "Not a ctrl vif, no available queue\n"); WARN_ONCE(1, "Not a ctrl vif, no available queue\n");
return -1; return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册