Skip to content

Commit ae04515

Browse files
nbd168jmberg-intel
authored andcommitted
mac80211: set info->control.hw_key for encap offload packets
This is needed for drivers that don't do the key lookup themselves Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent aea6a3f commit ae04515

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/mac80211/tx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4194,6 +4194,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
41944194
{
41954195
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
41964196
struct ieee80211_local *local = sdata->local;
4197+
struct ieee80211_key *key;
41974198
struct tid_ampdu_tx *tid_tx;
41984199
u8 tid;
41994200

@@ -4242,6 +4243,10 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
42424243
info->control.flags |= IEEE80211_TX_CTRL_HW_80211_ENCAP;
42434244
info->control.vif = &sdata->vif;
42444245

4246+
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
4247+
if (key)
4248+
info->control.hw_key = &key->conf;
4249+
42454250
ieee80211_tx_8023(sdata, skb, skb->len, sta, false);
42464251

42474252
return;

0 commit comments

Comments
 (0)