summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/coex.c
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@intel.com>2015-11-02 13:16:07 +0100
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-12-01 20:17:55 +0100
commit6e365100c31eb4c2aa573af9f2d75ab324eebec8 (patch)
tree6c28088514b08a07810c7e534e2ef0129a3783f9 /drivers/net/wireless/intel/iwlwifi/mvm/coex.c
parentiwlwifi: Add PCI IDs for the new series 8165 (diff)
downloadlinux-6e365100c31eb4c2aa573af9f2d75ab324eebec8.tar.xz
linux-6e365100c31eb4c2aa573af9f2d75ab324eebec8.zip
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/mvm/coex.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/coex.c36
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,
struct ieee80211_tx_info *info, u8 ac)
{
__le16 fc = hdr->frame_control;
+ bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm);
if (info->band != IEEE80211_BAND_2GHZ)
return 0;
@@ -908,22 +909,27 @@ u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
if (unlikely(mvm->bt_tx_prio))
return mvm->bt_tx_prio - 1;
- /* High prio packet (wrt. BT coex) if it is EAPOL, MCAST or MGMT */
- if (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO ||
- is_multicast_ether_addr(hdr->addr1) ||
- ieee80211_is_ctl(fc) || ieee80211_is_mgmt(fc) ||
- ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc))
+ if (likely(ieee80211_is_data(fc))) {
+ if (likely(ieee80211_is_data_qos(fc))) {
+ switch (ac) {
+ case IEEE80211_AC_BE:
+ return mplut_enabled ? 1 : 0;
+ case IEEE80211_AC_VI:
+ return mplut_enabled ? 2 : 3;
+ case IEEE80211_AC_VO:
+ return 3;
+ default:
+ return 0;
+ }
+ } else if (is_multicast_ether_addr(hdr->addr1)) {
+ return 3;
+ } else
+ return 0;
+ } else if (ieee80211_is_mgmt(fc)) {
+ return ieee80211_is_disassoc(fc) ? 0 : 3;
+ } else if (ieee80211_is_ctl(fc)) {
+ /* ignore cfend and cfendack frames as we never send those */
return 3;
-
- switch (ac) {
- case IEEE80211_AC_BE:
- return 1;
- case IEEE80211_AC_VO:
- return 3;
- case IEEE80211_AC_VI:
- return 2;
- default:
- break;
}
return 0;