Commit 9d0fc5a5 authored by David Spinadel's avatar David Spinadel Committed by Luca Coelho

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: default avatarDavid Spinadel <david.spinadel@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 6c2d49fd
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
#define FH_RSCSR_FRAME_INVALID 0x55550000 #define FH_RSCSR_FRAME_INVALID 0x55550000
#define FH_RSCSR_FRAME_ALIGN 0x40 #define FH_RSCSR_FRAME_ALIGN 0x40
#define FH_RSCSR_RPA_EN BIT(25) #define FH_RSCSR_RPA_EN BIT(25)
#define FH_RSCSR_RADA_EN BIT(26)
#define FH_RSCSR_RXQ_POS 16 #define FH_RSCSR_RXQ_POS 16
#define FH_RSCSR_RXQ_MASK 0x3F0000 #define FH_RSCSR_RXQ_MASK 0x3F0000
...@@ -128,7 +129,8 @@ struct iwl_rx_packet { ...@@ -128,7 +129,8 @@ struct iwl_rx_packet {
* 31: flag flush RB request * 31: flag flush RB request
* 30: flag ignore TC (terminal counter) request * 30: flag ignore TC (terminal counter) request
* 29: flag fast IRQ request * 29: flag fast IRQ request
* 28-26: Reserved * 28-27: Reserved
* 26: RADA enabled
* 25: Offload enabled * 25: Offload enabled
* 24: RPF enabled * 24: RPF enabled
* 23: RSS enabled * 23: RSS enabled
......
...@@ -234,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, ...@@ -234,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
struct ieee80211_rx_status *stats, struct ieee80211_rx_status *stats,
struct iwl_rx_mpdu_desc *desc, int queue, struct iwl_rx_mpdu_desc *desc, u32 pkt_flags,
u8 *crypt_len) int queue, u8 *crypt_len)
{ {
u16 status = le16_to_cpu(desc->status); u16 status = le16_to_cpu(desc->status);
...@@ -272,6 +272,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, ...@@ -272,6 +272,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
IWL_RX_MPDU_STATUS_SEC_WEP) IWL_RX_MPDU_STATUS_SEC_WEP)
*crypt_len = IEEE80211_WEP_IV_LEN; *crypt_len = IEEE80211_WEP_IV_LEN;
if (pkt_flags & FH_RSCSR_RADA_EN)
stats->flag |= RX_FLAG_ICV_STRIPPED;
return 0; return 0;
case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) 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, ...@@ -850,7 +854,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
rx_status = IEEE80211_SKB_RXCB(skb); rx_status = IEEE80211_SKB_RXCB(skb);
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, queue, &crypt_len)) { if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc,
le32_to_cpu(pkt->len_n_flags), queue,
&crypt_len)) {
kfree_skb(skb); kfree_skb(skb);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment