forked from openwrt/openwrt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mac80211: add missing change for encap offload on devices with sw rat…
…e control Signed-off-by: Felix Fietkau <nbd@nbd.name>
- Loading branch information
Showing
3 changed files
with
65 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
.../kernel/mac80211/patches/subsys/386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From: Ryder Lee <ryder.lee@mediatek.com> | ||
Date: Fri, 18 Jun 2021 04:38:59 +0800 | ||
Subject: [PATCH] mac80211: check per vif offload_flags in Tx path | ||
|
||
offload_flags has been introduced to indicate encap status of each interface. | ||
An interface can encap offload at runtime, or if it has some extra limitations | ||
it can simply override the flags, so it's more flexible to check offload_flags | ||
in Tx path. | ||
|
||
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> | ||
Link: https://lore.kernel.org/r/177785418cf407808bf3a44760302d0647076990.1623961575.git.ryder.lee@mediatek.com | ||
Signed-off-by: Johannes Berg <johannes.berg@intel.com> | ||
--- | ||
|
||
--- a/net/mac80211/tx.c | ||
+++ b/net/mac80211/tx.c | ||
@@ -3309,6 +3309,9 @@ static bool ieee80211_amsdu_aggregate(st | ||
if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) | ||
return false; | ||
|
||
+ if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) | ||
+ return false; | ||
+ | ||
if (skb_is_gso(skb)) | ||
return false; | ||
|