386-mac80211-check-per-vif-offload_flags-in-Tx-path.patch 922 B

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