summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorNaftali Goldstein <naftali.goldstein@intel.com>2019-05-13 16:36:30 +0300
committerLuca Coelho <luciano.coelho@intel.com>2019-06-29 10:09:39 +0300
commitb5e2fe356e09cd8576529dce832f2a6599fa88a4 (patch)
tree1d74d179df80ba118d88477ec60cddaa4385b00e /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parentbd9c519785926c72ff66e1b7218a622ace1da0eb (diff)
iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd
The indexes into the ac array in the iwl_mac_ctx_cmd are from the iwl_ac enum and not the txfs. The current code therefore puts the edca params in the wrong indexes of the array, causing wrong priority for data-streams of different ACs. Fix this. Note that this bug only occurs in NICs that use the new tx api, since in the old tx api the txf number is equal to the corresponding ac in the iwl_ac enum. Signed-off-by: Naftali Goldstein <naftali.goldstein@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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index cc56ab88fb43..aeece6e29fdf 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -238,6 +238,18 @@ u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx)
return fw_rate_idx_to_plcp[rate_idx];
}
+u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac)
+{
+ static const u8 mac80211_ac_to_ucode_ac[] = {
+ AC_VO,
+ AC_VI,
+ AC_BE,
+ AC_BK
+ };
+
+ return mac80211_ac_to_ucode_ac[ac];
+}
+
void iwl_mvm_rx_fw_error(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);