diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-08 14:48:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-08 14:48:49 -0500 |
commit | 03afb6e43aaf71e761c1e22d36c2670ef82f089a (patch) | |
tree | 44c9a1fff6638a153ba99f7c459fbe99350eadb7 /drivers | |
parent | 8a7b741e76cd31b6000636f0391e67ba6793ad1c (diff) | |
parent | a41886f56b7bbb88e6a23b5d738a94f2632142a4 (diff) |
Merge tag 'wireless-drivers-for-davem-2017-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says:
====================
wireless-drivers fixes for 4.15
Second set of fixes for 4.15. This time a lot of iwlwifi patches and
two brcmfmac patches. Most important here are the MIC and IVC fixes
for iwlwifi to unbreak 9000 series.
iwlwifi
* fix rate-scaling to not start lowest possible rate
* fix the TX queue hang detection for AP/GO modes
* fix the TX queue hang timeout in monitor interfaces
* fix packet injection
* remove a wrong error message when dumping PCI registers
* fix race condition with RF-kill
* tell mac80211 when the MIC has been stripped (9000 series)
* tell mac80211 when the IVC has been stripped (9000 series)
* add 2 new PCI IDs, one for 9000 and one for 22000
* fix a queue hang due during a P2P Remain-on-Channel operation
brcmfmac
* fix a race which sometimes caused a crash during sdio unbind
* fix a kernel-doc related build error
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 53 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 |
15 files changed, 122 insertions, 27 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 310c4e2746aa..cdf9e4161592 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | |||
@@ -2070,7 +2070,7 @@ static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt) | |||
2070 | return head_pad; | 2070 | return head_pad; |
2071 | } | 2071 | } |
2072 | 2072 | ||
2073 | /** | 2073 | /* |
2074 | * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for | 2074 | * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for |
2075 | * bus layer usage. | 2075 | * bus layer usage. |
2076 | */ | 2076 | */ |
@@ -4121,8 +4121,8 @@ release: | |||
4121 | sdio_release_host(sdiodev->func[1]); | 4121 | sdio_release_host(sdiodev->func[1]); |
4122 | fail: | 4122 | fail: |
4123 | brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err); | 4123 | brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err); |
4124 | device_release_driver(dev); | ||
4125 | device_release_driver(&sdiodev->func[2]->dev); | 4124 | device_release_driver(&sdiodev->func[2]->dev); |
4125 | device_release_driver(dev); | ||
4126 | } | 4126 | } |
4127 | 4127 | ||
4128 | struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) | 4128 | struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h index 87b4434224a1..dfa111bb411e 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | |||
@@ -68,6 +68,9 @@ | |||
68 | * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW | 68 | * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW |
69 | * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames | 69 | * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames |
70 | * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames | 70 | * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames |
71 | * @IWL_MVM_DQA_INJECT_MONITOR_QUEUE: a queue reserved for injection using | ||
72 | * monitor mode. Note this queue is the same as the queue for P2P device | ||
73 | * but we can't have active monitor mode along with P2P device anyway. | ||
71 | * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames | 74 | * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames |
72 | * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure | 75 | * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure |
73 | * that we are never left without the possibility to connect to an AP. | 76 | * that we are never left without the possibility to connect to an AP. |
@@ -87,6 +90,7 @@ enum iwl_mvm_dqa_txq { | |||
87 | IWL_MVM_DQA_CMD_QUEUE = 0, | 90 | IWL_MVM_DQA_CMD_QUEUE = 0, |
88 | IWL_MVM_DQA_AUX_QUEUE = 1, | 91 | IWL_MVM_DQA_AUX_QUEUE = 1, |
89 | IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2, | 92 | IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2, |
93 | IWL_MVM_DQA_INJECT_MONITOR_QUEUE = 2, | ||
90 | IWL_MVM_DQA_GCAST_QUEUE = 3, | 94 | IWL_MVM_DQA_GCAST_QUEUE = 3, |
91 | IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4, | 95 | IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4, |
92 | IWL_MVM_DQA_MIN_MGMT_QUEUE = 5, | 96 | IWL_MVM_DQA_MIN_MGMT_QUEUE = 5, |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h index 9c889a32fe24..223fb77a3aa9 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h | |||
@@ -209,8 +209,6 @@ static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt) | |||
209 | 209 | ||
210 | static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) | 210 | static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) |
211 | { | 211 | { |
212 | iwl_fw_dbg_stop_recording(fwrt); | ||
213 | |||
214 | fwrt->dump.conf = FW_DBG_INVALID; | 212 | fwrt->dump.conf = FW_DBG_INVALID; |
215 | } | 213 | } |
216 | 214 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index ca0b5536a8a6..921cab9e2d73 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h | |||
@@ -117,6 +117,7 @@ | |||
117 | #define FH_RSCSR_FRAME_INVALID 0x55550000 | 117 | #define FH_RSCSR_FRAME_INVALID 0x55550000 |
118 | #define FH_RSCSR_FRAME_ALIGN 0x40 | 118 | #define FH_RSCSR_FRAME_ALIGN 0x40 |
119 | #define FH_RSCSR_RPA_EN BIT(25) | 119 | #define FH_RSCSR_RPA_EN BIT(25) |
120 | #define FH_RSCSR_RADA_EN BIT(26) | ||
120 | #define FH_RSCSR_RXQ_POS 16 | 121 | #define FH_RSCSR_RXQ_POS 16 |
121 | #define FH_RSCSR_RXQ_MASK 0x3F0000 | 122 | #define FH_RSCSR_RXQ_MASK 0x3F0000 |
122 | 123 | ||
@@ -128,7 +129,8 @@ struct iwl_rx_packet { | |||
128 | * 31: flag flush RB request | 129 | * 31: flag flush RB request |
129 | * 30: flag ignore TC (terminal counter) request | 130 | * 30: flag ignore TC (terminal counter) request |
130 | * 29: flag fast IRQ request | 131 | * 29: flag fast IRQ request |
131 | * 28-26: Reserved | 132 | * 28-27: Reserved |
133 | * 26: RADA enabled | ||
132 | * 25: Offload enabled | 134 | * 25: Offload enabled |
133 | * 24: RPF enabled | 135 | * 24: RPF enabled |
134 | * 23: RSS enabled | 136 | * 23: RSS enabled |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index a2bf530eeae4..2f22e14e00fe 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | |||
@@ -787,7 +787,7 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm, | |||
787 | u32 action) | 787 | u32 action) |
788 | { | 788 | { |
789 | struct iwl_mac_ctx_cmd cmd = {}; | 789 | struct iwl_mac_ctx_cmd cmd = {}; |
790 | u32 tfd_queue_msk = 0; | 790 | u32 tfd_queue_msk = BIT(mvm->snif_queue); |
791 | int ret; | 791 | int ret; |
792 | 792 | ||
793 | WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); | 793 | WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 4575595ab022..55ab5349dd40 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
@@ -972,6 +972,7 @@ struct iwl_mvm { | |||
972 | 972 | ||
973 | /* Tx queues */ | 973 | /* Tx queues */ |
974 | u16 aux_queue; | 974 | u16 aux_queue; |
975 | u16 snif_queue; | ||
975 | u16 probe_queue; | 976 | u16 probe_queue; |
976 | u16 p2p_dev_queue; | 977 | u16 p2p_dev_queue; |
977 | 978 | ||
@@ -1060,6 +1061,7 @@ struct iwl_mvm { | |||
1060 | * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running | 1061 | * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running |
1061 | * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done | 1062 | * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done |
1062 | * @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running | 1063 | * @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running |
1064 | * @IWL_MVM_STATUS_NEED_FLUSH_P2P: need to flush P2P bcast STA | ||
1063 | */ | 1065 | */ |
1064 | enum iwl_mvm_status { | 1066 | enum iwl_mvm_status { |
1065 | IWL_MVM_STATUS_HW_RFKILL, | 1067 | IWL_MVM_STATUS_HW_RFKILL, |
@@ -1071,6 +1073,7 @@ enum iwl_mvm_status { | |||
1071 | IWL_MVM_STATUS_ROC_AUX_RUNNING, | 1073 | IWL_MVM_STATUS_ROC_AUX_RUNNING, |
1072 | IWL_MVM_STATUS_D3_RECONFIG, | 1074 | IWL_MVM_STATUS_D3_RECONFIG, |
1073 | IWL_MVM_STATUS_FIRMWARE_RUNNING, | 1075 | IWL_MVM_STATUS_FIRMWARE_RUNNING, |
1076 | IWL_MVM_STATUS_NEED_FLUSH_P2P, | ||
1074 | }; | 1077 | }; |
1075 | 1078 | ||
1076 | /* Keep track of completed init configuration */ | 1079 | /* Keep track of completed init configuration */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 7078b7e458be..45470b6b351a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -624,6 +624,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
624 | mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0; | 624 | mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0; |
625 | 625 | ||
626 | mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; | 626 | mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; |
627 | mvm->snif_queue = IWL_MVM_DQA_INJECT_MONITOR_QUEUE; | ||
627 | mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; | 628 | mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; |
628 | mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; | 629 | mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; |
629 | 630 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 76dc58381e1c..3b8d44361380 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -213,6 +213,7 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | |||
213 | struct ieee80211_rx_status *rx_status) | 213 | struct ieee80211_rx_status *rx_status) |
214 | { | 214 | { |
215 | int energy_a, energy_b, max_energy; | 215 | int energy_a, energy_b, max_energy; |
216 | u32 rate_flags = le32_to_cpu(desc->rate_n_flags); | ||
216 | 217 | ||
217 | energy_a = desc->energy_a; | 218 | energy_a = desc->energy_a; |
218 | energy_a = energy_a ? -energy_a : S8_MIN; | 219 | energy_a = energy_a ? -energy_a : S8_MIN; |
@@ -224,7 +225,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | |||
224 | energy_a, energy_b, max_energy); | 225 | energy_a, energy_b, max_energy); |
225 | 226 | ||
226 | rx_status->signal = max_energy; | 227 | rx_status->signal = max_energy; |
227 | rx_status->chains = 0; /* TODO: phy info */ | 228 | rx_status->chains = |
229 | (rate_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_POS; | ||
228 | rx_status->chain_signal[0] = energy_a; | 230 | rx_status->chain_signal[0] = energy_a; |
229 | rx_status->chain_signal[1] = energy_b; | 231 | rx_status->chain_signal[1] = energy_b; |
230 | rx_status->chain_signal[2] = S8_MIN; | 232 | rx_status->chain_signal[2] = S8_MIN; |
@@ -232,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | |||
232 | 234 | ||
233 | static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | 235 | static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, |
234 | struct ieee80211_rx_status *stats, | 236 | struct ieee80211_rx_status *stats, |
235 | struct iwl_rx_mpdu_desc *desc, int queue, | 237 | struct iwl_rx_mpdu_desc *desc, u32 pkt_flags, |
236 | u8 *crypt_len) | 238 | int queue, u8 *crypt_len) |
237 | { | 239 | { |
238 | u16 status = le16_to_cpu(desc->status); | 240 | u16 status = le16_to_cpu(desc->status); |
239 | 241 | ||
@@ -253,6 +255,8 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
253 | return -1; | 255 | return -1; |
254 | 256 | ||
255 | stats->flag |= RX_FLAG_DECRYPTED; | 257 | stats->flag |= RX_FLAG_DECRYPTED; |
258 | if (pkt_flags & FH_RSCSR_RADA_EN) | ||
259 | stats->flag |= RX_FLAG_MIC_STRIPPED; | ||
256 | *crypt_len = IEEE80211_CCMP_HDR_LEN; | 260 | *crypt_len = IEEE80211_CCMP_HDR_LEN; |
257 | return 0; | 261 | return 0; |
258 | case IWL_RX_MPDU_STATUS_SEC_TKIP: | 262 | case IWL_RX_MPDU_STATUS_SEC_TKIP: |
@@ -270,6 +274,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
270 | if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == | 274 | if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == |
271 | IWL_RX_MPDU_STATUS_SEC_WEP) | 275 | IWL_RX_MPDU_STATUS_SEC_WEP) |
272 | *crypt_len = IEEE80211_WEP_IV_LEN; | 276 | *crypt_len = IEEE80211_WEP_IV_LEN; |
277 | |||
278 | if (pkt_flags & FH_RSCSR_RADA_EN) | ||
279 | stats->flag |= RX_FLAG_ICV_STRIPPED; | ||
280 | |||
273 | return 0; | 281 | return 0; |
274 | case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: | 282 | case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: |
275 | if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) | 283 | if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) |
@@ -848,7 +856,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
848 | 856 | ||
849 | rx_status = IEEE80211_SKB_RXCB(skb); | 857 | rx_status = IEEE80211_SKB_RXCB(skb); |
850 | 858 | ||
851 | if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, queue, &crypt_len)) { | 859 | if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, |
860 | le32_to_cpu(pkt->len_n_flags), queue, | ||
861 | &crypt_len)) { | ||
852 | kfree_skb(skb); | 862 | kfree_skb(skb); |
853 | return; | 863 | return; |
854 | } | 864 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index c19f98489d4e..1add5615fc3a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -1709,29 +1709,29 @@ void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta) | |||
1709 | sta->sta_id = IWL_MVM_INVALID_STA; | 1709 | sta->sta_id = IWL_MVM_INVALID_STA; |
1710 | } | 1710 | } |
1711 | 1711 | ||
1712 | static void iwl_mvm_enable_aux_queue(struct iwl_mvm *mvm) | 1712 | static void iwl_mvm_enable_aux_snif_queue(struct iwl_mvm *mvm, u16 *queue, |
1713 | u8 sta_id, u8 fifo) | ||
1713 | { | 1714 | { |
1714 | unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ? | 1715 | unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ? |
1715 | mvm->cfg->base_params->wd_timeout : | 1716 | mvm->cfg->base_params->wd_timeout : |
1716 | IWL_WATCHDOG_DISABLED; | 1717 | IWL_WATCHDOG_DISABLED; |
1717 | 1718 | ||
1718 | if (iwl_mvm_has_new_tx_api(mvm)) { | 1719 | if (iwl_mvm_has_new_tx_api(mvm)) { |
1719 | int queue = iwl_mvm_tvqm_enable_txq(mvm, mvm->aux_queue, | 1720 | int tvqm_queue = |
1720 | mvm->aux_sta.sta_id, | 1721 | iwl_mvm_tvqm_enable_txq(mvm, *queue, sta_id, |
1721 | IWL_MAX_TID_COUNT, | 1722 | IWL_MAX_TID_COUNT, |
1722 | wdg_timeout); | 1723 | wdg_timeout); |
1723 | mvm->aux_queue = queue; | 1724 | *queue = tvqm_queue; |
1724 | } else { | 1725 | } else { |
1725 | struct iwl_trans_txq_scd_cfg cfg = { | 1726 | struct iwl_trans_txq_scd_cfg cfg = { |
1726 | .fifo = IWL_MVM_TX_FIFO_MCAST, | 1727 | .fifo = fifo, |
1727 | .sta_id = mvm->aux_sta.sta_id, | 1728 | .sta_id = sta_id, |
1728 | .tid = IWL_MAX_TID_COUNT, | 1729 | .tid = IWL_MAX_TID_COUNT, |
1729 | .aggregate = false, | 1730 | .aggregate = false, |
1730 | .frame_limit = IWL_FRAME_LIMIT, | 1731 | .frame_limit = IWL_FRAME_LIMIT, |
1731 | }; | 1732 | }; |
1732 | 1733 | ||
1733 | iwl_mvm_enable_txq(mvm, mvm->aux_queue, mvm->aux_queue, 0, &cfg, | 1734 | iwl_mvm_enable_txq(mvm, *queue, *queue, 0, &cfg, wdg_timeout); |
1734 | wdg_timeout); | ||
1735 | } | 1735 | } |
1736 | } | 1736 | } |
1737 | 1737 | ||
@@ -1750,7 +1750,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
1750 | 1750 | ||
1751 | /* Map Aux queue to fifo - needs to happen before adding Aux station */ | 1751 | /* Map Aux queue to fifo - needs to happen before adding Aux station */ |
1752 | if (!iwl_mvm_has_new_tx_api(mvm)) | 1752 | if (!iwl_mvm_has_new_tx_api(mvm)) |
1753 | iwl_mvm_enable_aux_queue(mvm); | 1753 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue, |
1754 | mvm->aux_sta.sta_id, | ||
1755 | IWL_MVM_TX_FIFO_MCAST); | ||
1754 | 1756 | ||
1755 | ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL, | 1757 | ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL, |
1756 | MAC_INDEX_AUX, 0); | 1758 | MAC_INDEX_AUX, 0); |
@@ -1764,7 +1766,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
1764 | * to firmware so enable queue here - after the station was added | 1766 | * to firmware so enable queue here - after the station was added |
1765 | */ | 1767 | */ |
1766 | if (iwl_mvm_has_new_tx_api(mvm)) | 1768 | if (iwl_mvm_has_new_tx_api(mvm)) |
1767 | iwl_mvm_enable_aux_queue(mvm); | 1769 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue, |
1770 | mvm->aux_sta.sta_id, | ||
1771 | IWL_MVM_TX_FIFO_MCAST); | ||
1768 | 1772 | ||
1769 | return 0; | 1773 | return 0; |
1770 | } | 1774 | } |
@@ -1772,10 +1776,31 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
1772 | int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | 1776 | int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
1773 | { | 1777 | { |
1774 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 1778 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1779 | int ret; | ||
1775 | 1780 | ||
1776 | lockdep_assert_held(&mvm->mutex); | 1781 | lockdep_assert_held(&mvm->mutex); |
1777 | return iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, | 1782 | |
1783 | /* Map snif queue to fifo - must happen before adding snif station */ | ||
1784 | if (!iwl_mvm_has_new_tx_api(mvm)) | ||
1785 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue, | ||
1786 | mvm->snif_sta.sta_id, | ||
1787 | IWL_MVM_TX_FIFO_BE); | ||
1788 | |||
1789 | ret = iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, | ||
1778 | mvmvif->id, 0); | 1790 | mvmvif->id, 0); |
1791 | if (ret) | ||
1792 | return ret; | ||
1793 | |||
1794 | /* | ||
1795 | * For 22000 firmware and on we cannot add queue to a station unknown | ||
1796 | * to firmware so enable queue here - after the station was added | ||
1797 | */ | ||
1798 | if (iwl_mvm_has_new_tx_api(mvm)) | ||
1799 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue, | ||
1800 | mvm->snif_sta.sta_id, | ||
1801 | IWL_MVM_TX_FIFO_BE); | ||
1802 | |||
1803 | return 0; | ||
1779 | } | 1804 | } |
1780 | 1805 | ||
1781 | int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | 1806 | int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
@@ -1784,6 +1809,8 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1784 | 1809 | ||
1785 | lockdep_assert_held(&mvm->mutex); | 1810 | lockdep_assert_held(&mvm->mutex); |
1786 | 1811 | ||
1812 | iwl_mvm_disable_txq(mvm, mvm->snif_queue, mvm->snif_queue, | ||
1813 | IWL_MAX_TID_COUNT, 0); | ||
1787 | ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); | 1814 | ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); |
1788 | if (ret) | 1815 | if (ret) |
1789 | IWL_WARN(mvm, "Failed sending remove station\n"); | 1816 | IWL_WARN(mvm, "Failed sending remove station\n"); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c index 4d0314912e94..e25cda9fbf6c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | |||
@@ -132,6 +132,24 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk) | |||
132 | * executed, and a new time event means a new command. | 132 | * executed, and a new time event means a new command. |
133 | */ | 133 | */ |
134 | iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC); | 134 | iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC); |
135 | |||
136 | /* Do the same for the P2P device queue (STA) */ | ||
137 | if (test_and_clear_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status)) { | ||
138 | struct iwl_mvm_vif *mvmvif; | ||
139 | |||
140 | /* | ||
141 | * NB: access to this pointer would be racy, but the flush bit | ||
142 | * can only be set when we had a P2P-Device VIF, and we have a | ||
143 | * flush of this work in iwl_mvm_prepare_mac_removal() so it's | ||
144 | * not really racy. | ||
145 | */ | ||
146 | |||
147 | if (!WARN_ON(!mvm->p2p_device_vif)) { | ||
148 | mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif); | ||
149 | iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true, | ||
150 | CMD_ASYNC); | ||
151 | } | ||
152 | } | ||
135 | } | 153 | } |
136 | 154 | ||
137 | static void iwl_mvm_roc_finished(struct iwl_mvm *mvm) | 155 | static void iwl_mvm_roc_finished(struct iwl_mvm *mvm) |
@@ -855,10 +873,12 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm) | |||
855 | 873 | ||
856 | mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); | 874 | mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); |
857 | 875 | ||
858 | if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) | 876 | if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { |
859 | iwl_mvm_remove_time_event(mvm, mvmvif, te_data); | 877 | iwl_mvm_remove_time_event(mvm, mvmvif, te_data); |
860 | else | 878 | set_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status); |
879 | } else { | ||
861 | iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); | 880 | iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); |
881 | } | ||
862 | 882 | ||
863 | iwl_mvm_roc_finished(mvm); | 883 | iwl_mvm_roc_finished(mvm); |
864 | } | 884 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 593b7f97b29c..333bcb75b8af 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |||
@@ -657,7 +657,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) | |||
657 | if (ap_sta_id != IWL_MVM_INVALID_STA) | 657 | if (ap_sta_id != IWL_MVM_INVALID_STA) |
658 | sta_id = ap_sta_id; | 658 | sta_id = ap_sta_id; |
659 | } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { | 659 | } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { |
660 | queue = mvm->aux_queue; | 660 | queue = mvm->snif_queue; |
661 | sta_id = mvm->snif_sta.sta_id; | ||
661 | } | 662 | } |
662 | } | 663 | } |
663 | 664 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index d46115e2d69e..03ffd84786ca 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -1134,9 +1134,18 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, | |||
1134 | unsigned int default_timeout = | 1134 | unsigned int default_timeout = |
1135 | cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout; | 1135 | cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout; |
1136 | 1136 | ||
1137 | if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) | 1137 | if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) { |
1138 | /* | ||
1139 | * We can't know when the station is asleep or awake, so we | ||
1140 | * must disable the queue hang detection. | ||
1141 | */ | ||
1142 | if (fw_has_capa(&mvm->fw->ucode_capa, | ||
1143 | IWL_UCODE_TLV_CAPA_STA_PM_NOTIF) && | ||
1144 | vif && vif->type == NL80211_IFTYPE_AP) | ||
1145 | return IWL_WATCHDOG_DISABLED; | ||
1138 | return iwlmvm_mod_params.tfd_q_hang_detect ? | 1146 | return iwlmvm_mod_params.tfd_q_hang_detect ? |
1139 | default_timeout : IWL_WATCHDOG_DISABLED; | 1147 | default_timeout : IWL_WATCHDOG_DISABLED; |
1148 | } | ||
1140 | 1149 | ||
1141 | trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS); | 1150 | trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS); |
1142 | txq_timer = (void *)trigger->data; | 1151 | txq_timer = (void *)trigger->data; |
@@ -1163,6 +1172,8 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, | |||
1163 | return le32_to_cpu(txq_timer->p2p_go); | 1172 | return le32_to_cpu(txq_timer->p2p_go); |
1164 | case NL80211_IFTYPE_P2P_DEVICE: | 1173 | case NL80211_IFTYPE_P2P_DEVICE: |
1165 | return le32_to_cpu(txq_timer->p2p_device); | 1174 | return le32_to_cpu(txq_timer->p2p_device); |
1175 | case NL80211_IFTYPE_MONITOR: | ||
1176 | return default_timeout; | ||
1166 | default: | 1177 | default: |
1167 | WARN_ON(1); | 1178 | WARN_ON(1); |
1168 | return mvm->cfg->base_params->wd_timeout; | 1179 | return mvm->cfg->base_params->wd_timeout; |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index f21fe59faccf..ccd7c33c4c28 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
@@ -553,6 +553,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
553 | {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)}, | 553 | {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)}, |
554 | {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)}, | 554 | {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)}, |
555 | {IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)}, | 555 | {IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)}, |
556 | {IWL_PCI_DEVICE(0x271C, 0x0214, iwl9260_2ac_cfg)}, | ||
556 | {IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)}, | 557 | {IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)}, |
557 | {IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)}, | 558 | {IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)}, |
558 | {IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)}, | 559 | {IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)}, |
@@ -664,6 +665,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
664 | {IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)}, | 665 | {IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)}, |
665 | {IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)}, | 666 | {IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)}, |
666 | {IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)}, | 667 | {IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)}, |
668 | {IWL_PCI_DEVICE(0xA0F0, 0x0000, iwla000_2ax_cfg_hr)}, | ||
667 | 669 | ||
668 | #endif /* CONFIG_IWLMVM */ | 670 | #endif /* CONFIG_IWLMVM */ |
669 | 671 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index c59f4581e972..ac05fd1e74c4 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | |||
@@ -49,6 +49,7 @@ | |||
49 | * | 49 | * |
50 | *****************************************************************************/ | 50 | *****************************************************************************/ |
51 | #include "iwl-trans.h" | 51 | #include "iwl-trans.h" |
52 | #include "iwl-prph.h" | ||
52 | #include "iwl-context-info.h" | 53 | #include "iwl-context-info.h" |
53 | #include "internal.h" | 54 | #include "internal.h" |
54 | 55 | ||
@@ -156,6 +157,11 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power) | |||
156 | 157 | ||
157 | trans_pcie->is_down = true; | 158 | trans_pcie->is_down = true; |
158 | 159 | ||
160 | /* Stop dbgc before stopping device */ | ||
161 | iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); | ||
162 | udelay(100); | ||
163 | iwl_write_prph(trans, DBGC_OUT_CTRL, 0); | ||
164 | |||
159 | /* tell the device to stop sending interrupts */ | 165 | /* tell the device to stop sending interrupts */ |
160 | iwl_disable_interrupts(trans); | 166 | iwl_disable_interrupts(trans); |
161 | 167 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index b7a51603465b..4541c86881d6 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
@@ -166,6 +166,7 @@ static void iwl_trans_pcie_dump_regs(struct iwl_trans *trans) | |||
166 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, | 166 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, |
167 | 4, buf, i, 0); | 167 | 4, buf, i, 0); |
168 | } | 168 | } |
169 | goto out; | ||
169 | 170 | ||
170 | err_read: | 171 | err_read: |
171 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); | 172 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); |
@@ -1226,6 +1227,15 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power) | |||
1226 | 1227 | ||
1227 | trans_pcie->is_down = true; | 1228 | trans_pcie->is_down = true; |
1228 | 1229 | ||
1230 | /* Stop dbgc before stopping device */ | ||
1231 | if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) { | ||
1232 | iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100); | ||
1233 | } else { | ||
1234 | iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); | ||
1235 | udelay(100); | ||
1236 | iwl_write_prph(trans, DBGC_OUT_CTRL, 0); | ||
1237 | } | ||
1238 | |||
1229 | /* tell the device to stop sending interrupts */ | 1239 | /* tell the device to stop sending interrupts */ |
1230 | iwl_disable_interrupts(trans); | 1240 | iwl_disable_interrupts(trans); |
1231 | 1241 | ||