From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
To: herbert@gondor.apana.org.au, davem@davemloft.net,
johannes@sipsolutions.net, miriam.rachel.korenblit@intel.com
Cc: ilan.peer@intel.com, emmanuel.grumbach@intel.com,
linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Subject: [PATCH v3 3/4] wifi: iwlwifi: fix RX AMPDU and A-MSDU in FIPS mode
Date: Fri, 9 Oct 2026 08:54:12 +0200 [thread overview]
Message-ID: <20261009065413.53403-4-jtornosm@redhat.com> (raw)
In-Reply-To: <20261009065413.53403-1-jtornosm@redhat.com>
In FIPS mode with the WiFi MFP exception active, firmware has no
encryption keys installed (mac80211 handles all crypto in software).
This causes two RX-path issues that severely limit downlink
throughput:
1) Firmware reports SEC_UNKNOWN for all received data frames because
it has no keys to decrypt them. iwl_mvm_rx_crypto() drops these
frames when they arrive inside an AMPDU, mistaking them for a
security error. In FIPS SW-crypto mode this is expected -- the
frames are encrypted and will be decrypted by mac80211. Skip
the drop when the FIPS exception is active, same as already done
for monitor mode.
2) Firmware clears the A-MSDU present bit in the QoS header for
frames it processes. When firmware has no keys, it still strips
this bit even though it cannot de-aggregate the A-MSDU. mac80211
then treats the A-MSDU as a regular MSDU, delivering a malformed
frame. Preserve the A-MSDU bit when the FIPS exception is active
so mac80211 can properly de-aggregate after SW decryption.
Without these fixes (in my scenario), RX throughput is limited to
non-aggregated rates (~25 Mbps). With both fixes, RX AMPDU works
normally and throughput reaches ~450 Mbps.
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
---
v3: new
v2: https://lore.kernel.org/all/20260930120829.383408-1-jtornosm@redhat.com/
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 7f0b4f5daa21..1ebca0323a89 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -5,6 +5,7 @@
* Copyright (C) 2015-2017 Intel Deutschland GmbH
*/
#include <linux/etherdevice.h>
+#include <linux/fips.h>
#include <linux/skbuff.h>
#include "iwl-trans.h"
#include "mvm.h"
@@ -421,14 +422,15 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
/*
* Drop UNKNOWN frames in aggregation, unless in monitor mode
- * (where we don't have the keys).
+ * (where we don't have the keys) or FIPS SW-crypto mode.
* We limit this to aggregation because in TKIP this is a valid
* scenario, since we may not have the (correct) TTAK (phase 1
* key) in the firmware.
*/
if (phy_info & IWL_RX_MPDU_PHY_AMPDU &&
(status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
- IWL_RX_MPDU_STATUS_SEC_UNKNOWN && !mvm->monitor_on) {
+ IWL_RX_MPDU_STATUS_SEC_UNKNOWN && !mvm->monitor_on &&
+ !fips_allows_exception(FIPS_EXCEPTION_WIFI_MFP)) {
IWL_DEBUG_DROP(mvm, "Dropping packets, bad enc status\n");
return -1;
}
@@ -2357,7 +2359,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
!WARN_ON(!ieee80211_is_data_qos(hdr->frame_control))) {
u8 *qc = ieee80211_get_qos_ctl(hdr);
- *qc &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT;
+ if (!fips_allows_exception(FIPS_EXCEPTION_WIFI_MFP))
+ *qc &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT;
if (mvm->trans->mac_cfg->device_family ==
IWL_DEVICE_FAMILY_9000) {
--
2.55.0
next prev parent reply other threads:[~2026-10-09 6:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 6:54 [PATCH v3 0/4] wifi: add opt-in FIPS exception for iwlwifi Jose Ignacio Tornos Martinez
2026-10-09 6:54 ` [PATCH v3 1/4] crypto: fips: add fips_exception kernel boot parameter and fips_allows_exception() helper Jose Ignacio Tornos Martinez
2026-10-09 6:54 ` [PATCH v3 2/4] wifi: iwlwifi: enable MFP_CAPABLE in FIPS mode Jose Ignacio Tornos Martinez
2026-10-09 6:54 ` Jose Ignacio Tornos Martinez [this message]
2026-10-09 6:54 ` [PATCH v3 4/4] wifi: iwlwifi: reduce encryption error message to debug level " Jose Ignacio Tornos Martinez
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=20261009065413.53403-4-jtornosm@redhat.com \
--to=jtornosm@redhat.com \
--cc=davem@davemloft.net \
--cc=emmanuel.grumbach@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=ilan.peer@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@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
all inboxes | Powered by JetHome®