From: Vladimir Bely <vlwwwwww@gmail.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Jeff Johnson <jjohnson@kernel.org>
Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, Vladimir Bely <vlwwwwww@gmail.com>
Subject: [PATCH ath-next 1/3] wifi: wcn36xx: set RX decryption flags only on encrypted data frames
Date: Sun, 29 Nov 2026 02:31:55 +0300 [thread overview]
Message-ID: <20261128233157.966718-2-vlwwwwww@gmail.com> (raw)
In-Reply-To: <20261128233157.966718-1-vlwwwwww@gmail.com>
wcn36xx_rx_skb() unconditionally sets RX_FLAG_IV_STRIPPED,
RX_FLAG_MMIC_STRIPPED, and RX_FLAG_DECRYPTED on every received frame,
regardless of whether hardware decryption actually took place.
This causes two issues:
- Management frames (which WCNSS firmware delivers untouched with
bd->dpu_ne == 1 when rmf == 0) are falsely marked as decrypted,
preventing mac80211 from performing software decryption/MIC
verification on robust management frames and bypassing
ieee80211_drop_unencrypted_mgmt().
- Unencrypted data frames such as 4-way handshake EAPOL frames
(fc 0x0288), where WCN3620 hardware leaves bd->dpu_ne == 0, are
falsely reported as decrypted and bypass ieee80211_drop_unencrypted().
Only set the hardware decryption flags when bd->dpu_ne is clear, the
frame is not a management frame, and IEEE80211_FCTL_PROTECTED is set in
the 802.11 header (verified on WCN3620 that hardware preserves the
Protected bit on both CCMP and TKIP hardware-decrypted data frames).
Signed-off-by: Vladimir Bely <vlwwwwww@gmail.com>
---
drivers/net/wireless/ath/wcn36xx/txrx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c
index 882699879..a554c59de 100644
--- a/drivers/net/wireless/ath/wcn36xx/txrx.c
+++ b/drivers/net/wireless/ath/wcn36xx/txrx.c
@@ -355,9 +355,11 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
status.antenna = 1;
status.flag = 0;
status.rx_flags = 0;
- status.flag |= RX_FLAG_IV_STRIPPED |
- RX_FLAG_MMIC_STRIPPED |
- RX_FLAG_DECRYPTED;
+ if (!bd->dpu_ne && !ieee80211_is_mgmt(hdr->frame_control) &&
+ ieee80211_has_protected(hdr->frame_control))
+ status.flag |= RX_FLAG_IV_STRIPPED |
+ RX_FLAG_MMIC_STRIPPED |
+ RX_FLAG_DECRYPTED;
wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag);
--
2.43.0
next prev parent reply other threads:[~2026-11-28 23:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 23:31 [PATCH ath-next 0/3] wifi: wcn36xx: enable MFP (802.11w) support Vladimir Bely
2026-11-28 23:31 ` Vladimir Bely [this message]
2026-11-28 23:31 ` [PATCH ath-next 2/3] wifi: wcn36xx: track WoWLAN GTK offload validity and skip with MFP Vladimir Bely
2026-11-28 23:31 ` [PATCH ath-next 3/3] wifi: wcn36xx: enable MFP (802.11w) support Vladimir Bely
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=20261128233157.966718-2-vlwwwwww@gmail.com \
--to=vlwwwwww@gmail.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=wcn36xx@lists.infradead.org \
/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