1 From: Remi Pommarel <repk@triplefau.lt>
2 Date: Thu, 17 Jul 2025 17:45:28 +0200
3 Subject: [PATCH] wifi: mac80211: Check 802.11 encaps offloading in
4 ieee80211_tx_h_select_key()
6 With 802.11 encapsulation offloading, ieee80211_tx_h_select_key() is
7 called on 802.3 frames. In that case do not try to use skb data as
10 Reported-by: Bert Karwatzki <spasswolf@web.de>
11 Closes: https://lore.kernel.org/linux-wireless/20250410215527.3001-1-spasswolf@web.de
12 Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")
13 Signed-off-by: Remi Pommarel <repk@triplefau.lt>
14 Link: https://patch.msgid.link/1af4b5b903a5fca5ebe67333d5854f93b2be5abe.1752765971.git.repk@triplefau.lt
15 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 --- a/net/mac80211/tx.c
19 +++ b/net/mac80211/tx.c
20 @@ -622,6 +622,12 @@ ieee80211_tx_h_select_key(struct ieee802
24 + if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
25 + if (tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
26 + info->control.hw_key = &tx->key->conf;