diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/coex.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/sta.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tx.c | 9 |
4 files changed, 28 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c index 43027c346ad3..018d75c805ad 100644 --- a/drivers/net/wireless/iwlwifi/mvm/coex.c +++ b/drivers/net/wireless/iwlwifi/mvm/coex.c | |||
@@ -1208,16 +1208,30 @@ bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm, | |||
1208 | } | 1208 | } |
1209 | 1209 | ||
1210 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | 1210 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, |
1211 | struct ieee80211_tx_info *info) | 1211 | struct ieee80211_tx_info *info, u8 ac) |
1212 | { | 1212 | { |
1213 | __le16 fc = hdr->frame_control; | 1213 | __le16 fc = hdr->frame_control; |
1214 | 1214 | ||
1215 | if (info->band != IEEE80211_BAND_2GHZ) | ||
1216 | return 0; | ||
1217 | |||
1215 | /* High prio packet (wrt. BT coex) if it is EAPOL, MCAST or MGMT */ | 1218 | /* High prio packet (wrt. BT coex) if it is EAPOL, MCAST or MGMT */ |
1216 | if (info->band == IEEE80211_BAND_2GHZ && | 1219 | if (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO || |
1217 | (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO || | ||
1218 | is_multicast_ether_addr(hdr->addr1) || | 1220 | is_multicast_ether_addr(hdr->addr1) || |
1219 | ieee80211_is_back_req(fc) || ieee80211_is_mgmt(fc))) | 1221 | ieee80211_is_ctl(fc) || ieee80211_is_mgmt(fc) || |
1222 | ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) | ||
1223 | return 3; | ||
1224 | |||
1225 | switch (ac) { | ||
1226 | case IEEE80211_AC_BE: | ||
1227 | return 1; | ||
1228 | case IEEE80211_AC_VO: | ||
1229 | return 3; | ||
1230 | case IEEE80211_AC_VI: | ||
1220 | return 2; | 1231 | return 2; |
1232 | default: | ||
1233 | break; | ||
1234 | } | ||
1221 | 1235 | ||
1222 | return 0; | 1236 | return 0; |
1223 | } | 1237 | } |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 221a482a36ea..f77be762ebd9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -346,6 +346,8 @@ iwl_mvm_vif_from_mac80211(struct ieee80211_vif *vif) | |||
346 | return (void *)vif->drv_priv; | 346 | return (void *)vif->drv_priv; |
347 | } | 347 | } |
348 | 348 | ||
349 | extern const u8 tid_to_mac80211_ac[]; | ||
350 | |||
349 | enum iwl_scan_status { | 351 | enum iwl_scan_status { |
350 | IWL_MVM_SCAN_NONE, | 352 | IWL_MVM_SCAN_NONE, |
351 | IWL_MVM_SCAN_OS, | 353 | IWL_MVM_SCAN_OS, |
@@ -913,7 +915,7 @@ u16 iwl_mvm_coex_agg_time_limit(struct iwl_mvm *mvm, | |||
913 | bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm, | 915 | bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm, |
914 | struct ieee80211_sta *sta); | 916 | struct ieee80211_sta *sta); |
915 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | 917 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, |
916 | struct ieee80211_tx_info *info); | 918 | struct ieee80211_tx_info *info, u8 ac); |
917 | int iwl_mvm_bt_coex_reduced_txp(struct iwl_mvm *mvm, u8 sta_id, bool enable); | 919 | int iwl_mvm_bt_coex_reduced_txp(struct iwl_mvm *mvm, u8 sta_id, bool enable); |
918 | 920 | ||
919 | enum iwl_bt_kill_msk { | 921 | enum iwl_bt_kill_msk { |
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c index 2677d1c0e1a1..67393535a5fb 100644 --- a/drivers/net/wireless/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/iwlwifi/mvm/sta.c | |||
@@ -851,7 +851,7 @@ static int iwl_mvm_sta_tx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
851 | return ret; | 851 | return ret; |
852 | } | 852 | } |
853 | 853 | ||
854 | static const u8 tid_to_mac80211_ac[] = { | 854 | const u8 tid_to_mac80211_ac[] = { |
855 | IEEE80211_AC_BE, | 855 | IEEE80211_AC_BE, |
856 | IEEE80211_AC_BK, | 856 | IEEE80211_AC_BK, |
857 | IEEE80211_AC_BK, | 857 | IEEE80211_AC_BK, |
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c index dd813d463218..0e3f45a8553e 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c | |||
@@ -79,6 +79,7 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
79 | __le16 fc = hdr->frame_control; | 79 | __le16 fc = hdr->frame_control; |
80 | u32 tx_flags = le32_to_cpu(tx_cmd->tx_flags); | 80 | u32 tx_flags = le32_to_cpu(tx_cmd->tx_flags); |
81 | u32 len = skb->len + FCS_LEN; | 81 | u32 len = skb->len + FCS_LEN; |
82 | u8 ac; | ||
82 | 83 | ||
83 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) | 84 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) |
84 | tx_flags |= TX_CMD_FLG_ACK; | 85 | tx_flags |= TX_CMD_FLG_ACK; |
@@ -90,9 +91,6 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
90 | else if (ieee80211_is_back_req(fc)) | 91 | else if (ieee80211_is_back_req(fc)) |
91 | tx_flags |= TX_CMD_FLG_ACK | TX_CMD_FLG_BAR; | 92 | tx_flags |= TX_CMD_FLG_ACK | TX_CMD_FLG_BAR; |
92 | 93 | ||
93 | tx_flags |= iwl_mvm_bt_coex_tx_prio(mvm, hdr, info) << | ||
94 | TX_CMD_FLG_BT_PRIO_POS; | ||
95 | |||
96 | if (ieee80211_has_morefrags(fc)) | 94 | if (ieee80211_has_morefrags(fc)) |
97 | tx_flags |= TX_CMD_FLG_MORE_FRAG; | 95 | tx_flags |= TX_CMD_FLG_MORE_FRAG; |
98 | 96 | ||
@@ -108,6 +106,11 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
108 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL; | 106 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL; |
109 | } | 107 | } |
110 | 108 | ||
109 | /* tid_tspec will default to 0 = BE when QOS isn't enabled */ | ||
110 | ac = tid_to_mac80211_ac[tx_cmd->tid_tspec]; | ||
111 | tx_flags |= iwl_mvm_bt_coex_tx_prio(mvm, hdr, info, ac) << | ||
112 | TX_CMD_FLG_BT_PRIO_POS; | ||
113 | |||
111 | if (ieee80211_is_mgmt(fc)) { | 114 | if (ieee80211_is_mgmt(fc)) { |
112 | if (ieee80211_is_assoc_req(fc) || ieee80211_is_reassoc_req(fc)) | 115 | if (ieee80211_is_assoc_req(fc) || ieee80211_is_reassoc_req(fc)) |
113 | tx_cmd->pm_frame_timeout = cpu_to_le16(3); | 116 | tx_cmd->pm_frame_timeout = cpu_to_le16(3); |