1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 21 Aug 2020 06:03:45 +0200
3 Subject: [PATCH] mac80211: set info->control.hw_key for encap offload
6 This is needed for drivers that don't do the key lookup themselves
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 --- a/net/mac80211/tx.c
12 +++ b/net/mac80211/tx.c
13 @@ -4191,6 +4191,7 @@ static void ieee80211_8023_xmit(struct i
15 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
16 struct ieee80211_local *local = sdata->local;
17 + struct ieee80211_key *key;
18 struct tid_ampdu_tx *tid_tx;
21 @@ -4239,6 +4240,10 @@ static void ieee80211_8023_xmit(struct i
22 info->flags |= IEEE80211_TX_CTL_HW_80211_ENCAP;
23 info->control.vif = &sdata->vif;
25 + key = rcu_dereference(sta->ptk[sta->ptk_idx]);
27 + info->control.hw_key = &key->conf;
29 ieee80211_tx_8023(sdata, skb, skb->len, sta, false);