mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key()
       [not found] <20260802105818.0feb7ad61047.Ia506ca211176a3c466bc60e4cc3e506df34a4a67@changeid>
@ 2026-09-08  9:43 ` Bert Karwatzki
  0 siblings, 0 replies; only message in thread
From: Bert Karwatzki @ 2026-09-08  9:43 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bert Karwatzki, linux-wireless, linux-next, linux-kernel,
	Mark Brown, johannes

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@web.de>
---
 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@kernel.org>
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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-08  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20260802105818.0feb7ad61047.Ia506ca211176a3c466bc60e4cc3e506df34a4a67@changeid>
2026-09-08  9:43 ` [PATCH] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key() Bert Karwatzki

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®