mac80211: Update to version 5.13.19-1
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / subsys / 386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch
1 From: Ryder Lee <ryder.lee@mediatek.com>
2 Date: Fri, 18 Jun 2021 04:38:59 +0800
3 Subject: [PATCH] mac80211: check per vif offload_flags in Tx path
4
5 offload_flags has been introduced to indicate encap status of each interface.
6 An interface can encap offload at runtime, or if it has some extra limitations
7 it can simply override the flags, so it's more flexible to check offload_flags
8 in Tx path.
9
10 Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
11 Link: https://lore.kernel.org/r/177785418cf407808bf3a44760302d0647076990.1623961575.git.ryder.lee@mediatek.com
12 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 ---
14
15 --- a/net/mac80211/tx.c
16 +++ b/net/mac80211/tx.c
17 @@ -3318,6 +3318,9 @@ static bool ieee80211_amsdu_aggregate(st
18 if (!ieee80211_hw_check(&local->hw, TX_AMSDU))
19 return false;
20
21 + if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
22 + return false;
23 +
24 if (skb_is_gso(skb))
25 return false;
26