Skip to content

Commit a41886f

Browse files
author
Kalle Valo
committed
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.
2 parents 51ef792 + bf19037 commit a41886f

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-trans.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
#define FH_RSCSR_FRAME_INVALID 0x55550000
118118
#define FH_RSCSR_FRAME_ALIGN 0x40
119119
#define FH_RSCSR_RPA_EN BIT(25)
120+
#define FH_RSCSR_RADA_EN BIT(26)
120121
#define FH_RSCSR_RXQ_POS 16
121122
#define FH_RSCSR_RXQ_MASK 0x3F0000
122123

@@ -128,7 +129,8 @@ struct iwl_rx_packet {
128129
* 31: flag flush RB request
129130
* 30: flag ignore TC (terminal counter) request
130131
* 29: flag fast IRQ request
131-
* 28-26: Reserved
132+
* 28-27: Reserved
133+
* 26: RADA enabled
132134
* 25: Offload enabled
133135
* 24: RPF enabled
134136
* 23: RSS enabled

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,7 @@ struct iwl_mvm {
10611061
* @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
10621062
* @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done
10631063
* @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running
1064+
* @IWL_MVM_STATUS_NEED_FLUSH_P2P: need to flush P2P bcast STA
10641065
*/
10651066
enum iwl_mvm_status {
10661067
IWL_MVM_STATUS_HW_RFKILL,
@@ -1072,6 +1073,7 @@ enum iwl_mvm_status {
10721073
IWL_MVM_STATUS_ROC_AUX_RUNNING,
10731074
IWL_MVM_STATUS_D3_RECONFIG,
10741075
IWL_MVM_STATUS_FIRMWARE_RUNNING,
1076+
IWL_MVM_STATUS_NEED_FLUSH_P2P,
10751077
};
10761078

10771079
/* Keep track of completed init configuration */

drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
234234

235235
static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
236236
struct ieee80211_rx_status *stats,
237-
struct iwl_rx_mpdu_desc *desc, int queue,
238-
u8 *crypt_len)
237+
struct iwl_rx_mpdu_desc *desc, u32 pkt_flags,
238+
int queue, u8 *crypt_len)
239239
{
240240
u16 status = le16_to_cpu(desc->status);
241241

@@ -255,6 +255,8 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
255255
return -1;
256256

257257
stats->flag |= RX_FLAG_DECRYPTED;
258+
if (pkt_flags & FH_RSCSR_RADA_EN)
259+
stats->flag |= RX_FLAG_MIC_STRIPPED;
258260
*crypt_len = IEEE80211_CCMP_HDR_LEN;
259261
return 0;
260262
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,
272274
if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
273275
IWL_RX_MPDU_STATUS_SEC_WEP)
274276
*crypt_len = IEEE80211_WEP_IV_LEN;
277+
278+
if (pkt_flags & FH_RSCSR_RADA_EN)
279+
stats->flag |= RX_FLAG_ICV_STRIPPED;
280+
275281
return 0;
276282
case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
277283
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,
850856

851857
rx_status = IEEE80211_SKB_RXCB(skb);
852858

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)) {
854862
kfree_skb(skb);
855863
return;
856864
}

drivers/net/wireless/intel/iwlwifi/mvm/time-event.c

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,24 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
132132
* executed, and a new time event means a new command.
133133
*/
134134
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+
}
135153
}
136154

137155
static void iwl_mvm_roc_finished(struct iwl_mvm *mvm)
@@ -855,10 +873,12 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm)
855873

856874
mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
857875

858-
if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE)
876+
if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) {
859877
iwl_mvm_remove_time_event(mvm, mvmvif, te_data);
860-
else
878+
set_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status);
879+
} else {
861880
iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data);
881+
}
862882

863883
iwl_mvm_roc_finished(mvm);
864884
}

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
553553
{IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)},
554554
{IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)},
555555
{IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)},
556+
{IWL_PCI_DEVICE(0x271C, 0x0214, iwl9260_2ac_cfg)},
556557
{IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)},
557558
{IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)},
558559
{IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)},
@@ -664,6 +665,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
664665
{IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)},
665666
{IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)},
666667
{IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)},
668+
{IWL_PCI_DEVICE(0xA0F0, 0x0000, iwla000_2ax_cfg_hr)},
667669

668670
#endif /* CONFIG_IWLMVM */
669671

0 commit comments

Comments
 (0)