summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-09-08 14:36:52 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-09-18 11:59:47 +0200
commitae045152764229e11c6833f5ccae4b62e9a0b60f (patch)
treeb855c9afaf0f7a28a34cf82312aca75373736a0a /net/mac80211
parentaea6a3f03108532537aec8e18771c1d47a280744 (diff)
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 <nbd@nbd.name> Link: https://lore.kernel.org/r/20200908123702.88454-5-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ea750081f6c6..65dfc24916e8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4194,6 +4194,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_local *local = sdata->local;
+ struct ieee80211_key *key;
struct tid_ampdu_tx *tid_tx;
u8 tid;
@@ -4242,6 +4243,10 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
info->control.flags |= IEEE80211_TX_CTRL_HW_80211_ENCAP;
info->control.vif = &sdata->vif;
+ key = rcu_dereference(sta->ptk[sta->ptk_idx]);
+ if (key)
+ info->control.hw_key = &key->conf;
+
ieee80211_tx_8023(sdata, skb, skb->len, sta, false);
return;