diff options
author | Avri Altman <avri.altman@intel.com> | 2015-11-02 07:16:07 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-12-01 14:17:55 -0500 |
commit | 6e365100c31eb4c2aa573af9f2d75ab324eebec8 (patch) | |
tree | 6c28088514b08a07810c7e534e2ef0129a3783f9 /drivers/net/wireless/intel/iwlwifi | |
parent | abf10f868f70e8e7c62ac4bc61ff4ab94a09eda1 (diff) |
iwlwifi: mvm: Align bt-coex priority with requirements
Fix the gaps between the system requirements and our code.
Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c index 808f234c953e..c9ca029c69f4 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c | |||
@@ -901,6 +901,7 @@ u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
901 | struct ieee80211_tx_info *info, u8 ac) | 901 | struct ieee80211_tx_info *info, u8 ac) |
902 | { | 902 | { |
903 | __le16 fc = hdr->frame_control; | 903 | __le16 fc = hdr->frame_control; |
904 | bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm); | ||
904 | 905 | ||
905 | if (info->band != IEEE80211_BAND_2GHZ) | 906 | if (info->band != IEEE80211_BAND_2GHZ) |
906 | return 0; | 907 | return 0; |
@@ -908,22 +909,27 @@ u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
908 | if (unlikely(mvm->bt_tx_prio)) | 909 | if (unlikely(mvm->bt_tx_prio)) |
909 | return mvm->bt_tx_prio - 1; | 910 | return mvm->bt_tx_prio - 1; |
910 | 911 | ||
911 | /* High prio packet (wrt. BT coex) if it is EAPOL, MCAST or MGMT */ | 912 | if (likely(ieee80211_is_data(fc))) { |
912 | if (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO || | 913 | if (likely(ieee80211_is_data_qos(fc))) { |
913 | is_multicast_ether_addr(hdr->addr1) || | 914 | switch (ac) { |
914 | ieee80211_is_ctl(fc) || ieee80211_is_mgmt(fc) || | 915 | case IEEE80211_AC_BE: |
915 | ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) | 916 | return mplut_enabled ? 1 : 0; |
917 | case IEEE80211_AC_VI: | ||
918 | return mplut_enabled ? 2 : 3; | ||
919 | case IEEE80211_AC_VO: | ||
920 | return 3; | ||
921 | default: | ||
922 | return 0; | ||
923 | } | ||
924 | } else if (is_multicast_ether_addr(hdr->addr1)) { | ||
925 | return 3; | ||
926 | } else | ||
927 | return 0; | ||
928 | } else if (ieee80211_is_mgmt(fc)) { | ||
929 | return ieee80211_is_disassoc(fc) ? 0 : 3; | ||
930 | } else if (ieee80211_is_ctl(fc)) { | ||
931 | /* ignore cfend and cfendack frames as we never send those */ | ||
916 | return 3; | 932 | return 3; |
917 | |||
918 | switch (ac) { | ||
919 | case IEEE80211_AC_BE: | ||
920 | return 1; | ||
921 | case IEEE80211_AC_VO: | ||
922 | return 3; | ||
923 | case IEEE80211_AC_VI: | ||
924 | return 2; | ||
925 | default: | ||
926 | break; | ||
927 | } | 933 | } |
928 | 934 | ||
929 | return 0; | 935 | return 0; |