diff options
author | Golan Ben Ami <golan.ben.ami@intel.com> | 2018-04-03 11:37:51 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-08-31 04:38:41 -0400 |
commit | 1169310fa9a8d8a1fc94e406643444cac30ad8b1 (patch) | |
tree | b40eb5cf1246001db291b05b37d0a0f037ed40f4 /drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |
parent | 764f9de5027149518b1633e5846b21b9fb882363 (diff) |
iwlwifi: refactor txq_alloc for supporting more command type
Support more txq_alloc command types by moving the command declaration
to the gen specific area. While at it, move some of the code segments
to a common place for re-use.
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index f5a9e4026094..99a872769e90 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -720,19 +720,15 @@ static bool iwl_mvm_update_txq_mapping(struct iwl_mvm *mvm, int queue, | |||
720 | int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm, int mac80211_queue, | 720 | int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm, int mac80211_queue, |
721 | u8 sta_id, u8 tid, unsigned int timeout) | 721 | u8 sta_id, u8 tid, unsigned int timeout) |
722 | { | 722 | { |
723 | struct iwl_tx_queue_cfg_cmd cmd = { | ||
724 | .flags = cpu_to_le16(TX_QUEUE_CFG_ENABLE_QUEUE), | ||
725 | .sta_id = sta_id, | ||
726 | .tid = tid, | ||
727 | }; | ||
728 | int queue, size = IWL_DEFAULT_QUEUE_SIZE; | 723 | int queue, size = IWL_DEFAULT_QUEUE_SIZE; |
729 | 724 | ||
730 | if (cmd.tid == IWL_MAX_TID_COUNT) { | 725 | if (tid == IWL_MAX_TID_COUNT) { |
731 | cmd.tid = IWL_MGMT_TID; | 726 | tid = IWL_MGMT_TID; |
732 | size = IWL_MGMT_QUEUE_SIZE; | 727 | size = IWL_MGMT_QUEUE_SIZE; |
733 | } | 728 | } |
734 | queue = iwl_trans_txq_alloc(mvm->trans, (void *)&cmd, | 729 | queue = iwl_trans_txq_alloc(mvm->trans, |
735 | SCD_QUEUE_CFG, size, timeout); | 730 | cpu_to_le16(TX_QUEUE_CFG_ENABLE_QUEUE), |
731 | sta_id, tid, SCD_QUEUE_CFG, size, timeout); | ||
736 | 732 | ||
737 | if (queue < 0) { | 733 | if (queue < 0) { |
738 | IWL_DEBUG_TX_QUEUES(mvm, | 734 | IWL_DEBUG_TX_QUEUES(mvm, |