提交 ae045152 编写于 作者: F Felix Fietkau 提交者: Johannes Berg

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: NFelix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20200908123702.88454-5-nbd@nbd.nameSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 aea6a3f0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册