Skip to content

Commit 9d0fc5a

Browse files
DavidSpinadellucacoelho
authored andcommitted
iwlwifi: mvm: enable RX offloading with TKIP and WEP
Set the flag that indicates that ICV was stripped on if this option was enabled in the HW. Cc: stable@vger.kernel.org # 4.13+ [this is needed for the 9000-series HW to work properly] Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
1 parent 6c2d49f commit 9d0fc5a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
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/rxmq.c

Lines changed: 9 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

@@ -272,6 +272,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
272272
if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
273273
IWL_RX_MPDU_STATUS_SEC_WEP)
274274
*crypt_len = IEEE80211_WEP_IV_LEN;
275+
276+
if (pkt_flags & FH_RSCSR_RADA_EN)
277+
stats->flag |= RX_FLAG_ICV_STRIPPED;
278+
275279
return 0;
276280
case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
277281
if (!(status & IWL_RX_MPDU_STATUS_MIC_OK))
@@ -850,7 +854,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
850854

851855
rx_status = IEEE80211_SKB_RXCB(skb);
852856

853-
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, queue, &crypt_len)) {
857+
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc,
858+
le32_to_cpu(pkt->len_n_flags), queue,
859+
&crypt_len)) {
854860
kfree_skb(skb);
855861
return;
856862
}

0 commit comments

Comments
 (0)