From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
David Spinadel <david.spinadel@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 12/15] iwlwifi: mvm: enable RX offloading with TKIP and WEP
Date: Sat, 2 Dec 2017 18:28:55 +0200 [thread overview]
Message-ID: <20171202162858.4167-13-luca@coelho.fi> (raw)
In-Reply-To: <20171202162858.4167-1-luca@coelho.fi>
From: David Spinadel <david.spinadel@intel.com>
Set the flag that indicates that ICV was stripped on if
this option was enabled in the HW.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +++-
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 +++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 196b90b0451f..84ae1e274d38 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -117,6 +117,7 @@
#define FH_RSCSR_FRAME_INVALID 0x55550000
#define FH_RSCSR_FRAME_ALIGN 0x40
#define FH_RSCSR_RPA_EN BIT(25)
+#define FH_RSCSR_RADA_EN BIT(26)
#define FH_RSCSR_RXQ_POS 16
#define FH_RSCSR_RXQ_MASK 0x3F0000
@@ -128,7 +129,8 @@ struct iwl_rx_packet {
* 31: flag flush RB request
* 30: flag ignore TC (terminal counter) request
* 29: flag fast IRQ request
- * 28-26: Reserved
+ * 28-27: Reserved
+ * 26: RADA enabled
* 25: Offload enabled
* 24: RPF enabled
* 23: RSS enabled
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 00d048bd2d35..0e6a7dd30aa9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -232,8 +232,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,
struct ieee80211_rx_status *stats,
- struct iwl_rx_mpdu_desc *desc, int queue,
- u8 *crypt_len)
+ struct iwl_rx_mpdu_desc *desc, u32 pkt_flags,
+ int queue, u8 *crypt_len)
{
u16 status = le16_to_cpu(desc->status);
@@ -270,6 +270,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
IWL_RX_MPDU_STATUS_SEC_WEP)
*crypt_len = IEEE80211_WEP_IV_LEN;
+
+ if (pkt_flags & FH_RSCSR_RADA_EN)
+ stats->flag |= RX_FLAG_ICV_STRIPPED;
+
return 0;
case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
if (!(status & IWL_RX_MPDU_STATUS_MIC_OK))
@@ -848,7 +852,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
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);
return;
}
--
2.15.0
next prev parent reply other threads:[~2017-12-02 16:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-02 16:28 [PATCH 00/15] iwlwifi: updates intended for v4.16 2017-12-02 Luca Coelho
2017-12-02 16:28 ` [PATCH 01/15] iwlwifi: mvm: add WFA vendor specific TPC report IE to probe request Luca Coelho
2017-12-02 16:28 ` [PATCH 02/15] iwlwifi: bump FW API to 36 for 8000 and up Luca Coelho
2017-12-02 16:28 ` [PATCH 03/15] iwlwifi: mvm: remove set but unused variable in iwl_mvm_roc_done_wk Luca Coelho
2017-12-02 16:28 ` [PATCH 04/15] iwlwifi: mvm: avoid dumping assert log when device is stopped Luca Coelho
2017-12-02 16:28 ` [PATCH 05/15] iwlwifi: mvm: rs: introduce new API for rate scaling Luca Coelho
2017-12-02 16:28 ` [PATCH 06/15] iwlwifi: mvm: rs: add ops for the new rate scaling in the FW Luca Coelho
2017-12-02 21:36 ` [PATCH v2 " Luca Coelho
2017-12-08 12:38 ` Kalle Valo
2017-12-08 12:40 ` Luciano Coelho
2017-12-02 16:28 ` [PATCH 07/15] iwlwifi: mvm: rs: add basic implementation of the new RS API handlers Luca Coelho
2017-12-02 16:28 ` [PATCH 08/15] iwlwifi: mvm: rs: new rate scale API - add FW notifications Luca Coelho
2017-12-02 16:28 ` [PATCH 09/15] iwlwifi: mvm: rs: new rate scale API - add debugfs hooks Luca Coelho
2017-12-02 16:28 ` [PATCH 10/15] iwlwifi: mvm: rs: add size checks when printing to a buffer Luca Coelho
2017-12-02 16:28 ` [PATCH 11/15] iwlwifi: mvm: rs: add sanity check when sending LQ command Luca Coelho
2017-12-02 16:28 ` Luca Coelho [this message]
2017-12-04 12:57 ` [PATCH 12/15] iwlwifi: mvm: enable RX offloading with TKIP and WEP Luciano Coelho
2017-12-02 16:28 ` [PATCH 13/15] iwlwifi: mvm: mark MIC stripped MPDUs Luca Coelho
2017-12-04 12:57 ` Luciano Coelho
2017-12-02 16:28 ` [PATCH 14/15] iwlwifi: mvm: make init_dbg effective only on failure Luca Coelho
2017-12-02 16:28 ` [PATCH 15/15] iwlwifi: mvm: request statistics when reading debugfs Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171202162858.4167-13-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=david.spinadel@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).