aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@intel.com>2014-07-30 04:41:01 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-16 05:57:50 -0400
commit3edf8ff6179dc470d53f3b88d4a778e241a73654 (patch)
tree79d47945de1c95ac543ae340db2920bbd3c2c6f3 /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
parent73897bd1d949d34b7a38a2cd14302d91f68ef12d (diff)
iwlwifi: mvm: prepare for scheduler config command
The scheduler is a HW sub-block that directs the work of the Flow Handler by issuing requests for frame transfers, specifying source and destination. Its primary function is to allocate flows into the TX FIFOs based upon a pre-determined mapping. The driver has some responsibilities to the scheduler, namely initialising and maintaining the hardware registers. This is currently done by directly accessing them, which can cause races with the firmware also accessing the registers. To address this problem, change the driver to no longer directly access the registers but go through the firmware for this if the firmware has support for DQA and thus the new command. Signed-off-by: Avri Altman <avri.altman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 834267145929..0c5c0b0e23f5 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -427,17 +427,17 @@ int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
427 427
428 switch (vif->type) { 428 switch (vif->type) {
429 case NL80211_IFTYPE_P2P_DEVICE: 429 case NL80211_IFTYPE_P2P_DEVICE:
430 iwl_trans_ac_txq_enable(mvm->trans, IWL_MVM_OFFCHANNEL_QUEUE, 430 iwl_mvm_enable_ac_txq(mvm, IWL_MVM_OFFCHANNEL_QUEUE,
431 IWL_MVM_TX_FIFO_VO); 431 IWL_MVM_TX_FIFO_VO);
432 break; 432 break;
433 case NL80211_IFTYPE_AP: 433 case NL80211_IFTYPE_AP:
434 iwl_trans_ac_txq_enable(mvm->trans, vif->cab_queue, 434 iwl_mvm_enable_ac_txq(mvm, vif->cab_queue,
435 IWL_MVM_TX_FIFO_MCAST); 435 IWL_MVM_TX_FIFO_MCAST);
436 /* fall through */ 436 /* fall through */
437 default: 437 default:
438 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) 438 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
439 iwl_trans_ac_txq_enable(mvm->trans, vif->hw_queue[ac], 439 iwl_mvm_enable_ac_txq(mvm, vif->hw_queue[ac],
440 iwl_mvm_ac_to_tx_fifo[ac]); 440 iwl_mvm_ac_to_tx_fifo[ac]);
441 break; 441 break;
442 } 442 }
443 443
@@ -452,16 +452,14 @@ void iwl_mvm_mac_ctxt_release(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
452 452
453 switch (vif->type) { 453 switch (vif->type) {
454 case NL80211_IFTYPE_P2P_DEVICE: 454 case NL80211_IFTYPE_P2P_DEVICE:
455 iwl_trans_txq_disable(mvm->trans, IWL_MVM_OFFCHANNEL_QUEUE, 455 iwl_mvm_disable_txq(mvm, IWL_MVM_OFFCHANNEL_QUEUE);
456 true);
457 break; 456 break;
458 case NL80211_IFTYPE_AP: 457 case NL80211_IFTYPE_AP:
459 iwl_trans_txq_disable(mvm->trans, vif->cab_queue, true); 458 iwl_mvm_disable_txq(mvm, vif->cab_queue);
460 /* fall through */ 459 /* fall through */
461 default: 460 default:
462 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) 461 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
463 iwl_trans_txq_disable(mvm->trans, vif->hw_queue[ac], 462 iwl_mvm_disable_txq(mvm, vif->hw_queue[ac]);
464 true);
465 } 463 }
466} 464}
467 465