[PATCH] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key()
From: Bert Karwatzki
Date: Tue Sep 08 2026 - 06:23:31 EST
Without this ieee80211_select_key_8023() is never called and wifi never
connects.
Fixes: 0e80db08668b ("wifi: mac80211: fix key selection for encap offload frames")
Signed-off-by: Bert Karwatzki <spasswolf@xxxxxx>
---
net/mac80211/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 13a51a0a0358..d1d3266697b1 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -648,7 +648,7 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
- if (info->control.flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
return ieee80211_select_key_8023(tx);
if (unlikely(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
--
2.55.0
I noticed that in next-20260907 my wifi adapter fails to connect to the
wireless network. As this still worked in v7.3-rc2 I bisected the issue
and found the offending commit to be this merge:
commit d1352d1b277913736903eff185191c4f9723e0de
Merge: 7e615d9c216c 1b60ed34f712
Author: Mark Brown <broonie@xxxxxxxxxx>
Date: Mon Sep 7 13:26:24 2026 +0100
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
So I examined the patch created by
git diff 7e615d9c216c d1352d1b2779
by applying it piece by piece to commit 7e615d9c216c.
The result of this procedure was the patch above as a minimal fix in
next-20260907.
The wirless hardware used is this:
09:00.0 Network controller [0280]: MEDIATEK Corp. MT7925 802.11be 160MHz 2x2 PCIe Wireless Network Adapter [Filogic 360] [14c3:7925]
Using printk()s in ieee80211_select_key_8023() (in next-20260907) I
noticed that ieee80211_select_key_8023() is never called when using
the info->control.flags test.
Bert Karwatzki