diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2017-12-07 08:50:34 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-12-07 08:50:34 -0500 |
commit | a41886f56b7bbb88e6a23b5d738a94f2632142a4 (patch) | |
tree | de46541e89acaaaf3b69c1ea4543715c155876e1 /drivers | |
parent | 51ef7925e10688c57186d438e784532e063492e4 (diff) | |
parent | bf19037074e770aad74b3b90f37b8b98db3f3748 (diff) |
Merge tag 'iwlwifi-for-kalle-2017-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
Third batch of iwlwifi patches intended for 4.15.
* Tell mac80211 when the MAC 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 ROC.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 |
5 files changed, 40 insertions, 6 deletions
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/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 6a9a25beab3f..55ab5349dd40 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
@@ -1061,6 +1061,7 @@ struct iwl_mvm { | |||
1061 | * @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 |
1062 | * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done | 1062 | * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done |
1063 | * @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 | ||
1064 | */ | 1065 | */ |
1065 | enum iwl_mvm_status { | 1066 | enum iwl_mvm_status { |
1066 | IWL_MVM_STATUS_HW_RFKILL, | 1067 | IWL_MVM_STATUS_HW_RFKILL, |
@@ -1072,6 +1073,7 @@ enum iwl_mvm_status { | |||
1072 | IWL_MVM_STATUS_ROC_AUX_RUNNING, | 1073 | IWL_MVM_STATUS_ROC_AUX_RUNNING, |
1073 | IWL_MVM_STATUS_D3_RECONFIG, | 1074 | IWL_MVM_STATUS_D3_RECONFIG, |
1074 | IWL_MVM_STATUS_FIRMWARE_RUNNING, | 1075 | IWL_MVM_STATUS_FIRMWARE_RUNNING, |
1076 | IWL_MVM_STATUS_NEED_FLUSH_P2P, | ||
1075 | }; | 1077 | }; |
1076 | 1078 | ||
1077 | /* Keep track of completed init configuration */ | 1079 | /* Keep track of completed init configuration */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 20fe23fbf040..3b8d44361380 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -234,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | |||
234 | 234 | ||
235 | 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, |
236 | struct ieee80211_rx_status *stats, | 236 | struct ieee80211_rx_status *stats, |
237 | struct iwl_rx_mpdu_desc *desc, int queue, | 237 | struct iwl_rx_mpdu_desc *desc, u32 pkt_flags, |
238 | u8 *crypt_len) | 238 | int queue, u8 *crypt_len) |
239 | { | 239 | { |
240 | u16 status = le16_to_cpu(desc->status); | 240 | u16 status = le16_to_cpu(desc->status); |
241 | 241 | ||
@@ -255,6 +255,8 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
255 | return -1; | 255 | return -1; |
256 | 256 | ||
257 | 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; | ||
258 | *crypt_len = IEEE80211_CCMP_HDR_LEN; | 260 | *crypt_len = IEEE80211_CCMP_HDR_LEN; |
259 | return 0; | 261 | return 0; |
260 | case IWL_RX_MPDU_STATUS_SEC_TKIP: | 262 | case IWL_RX_MPDU_STATUS_SEC_TKIP: |
@@ -272,6 +274,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
272 | if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == | 274 | if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == |
273 | IWL_RX_MPDU_STATUS_SEC_WEP) | 275 | IWL_RX_MPDU_STATUS_SEC_WEP) |
274 | *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 | |||
275 | return 0; | 281 | return 0; |
276 | case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: | 282 | case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: |
277 | if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) | 283 | if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) |
@@ -850,7 +856,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
850 | 856 | ||
851 | rx_status = IEEE80211_SKB_RXCB(skb); | 857 | rx_status = IEEE80211_SKB_RXCB(skb); |
852 | 858 | ||
853 | 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)) { | ||
854 | kfree_skb(skb); | 862 | kfree_skb(skb); |
855 | return; | 863 | return; |
856 | } | 864 | } |
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/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 | ||