Message ID | 4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] mac80211: check per vif offload_flags in Tx path | expand |
On 2021-06-17 20:53, Ryder Lee wrote: > 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> > --- > net/mac80211/tx.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c > index 0a4bc9e08637..8cb1289c704a 100644 > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -3695,7 +3698,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, > } > > if (skb_has_frag_list(skb) && > - !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) { > + (!ieee80211_hw_check(&local->hw, TX_FRAG_LIST) || > + vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)) { > if (skb_linearize(skb)) { > ieee80211_free_txskb(&local->hw, skb); > goto begin; I think this chunk should be dropped. - Felix
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 0a4bc9e08637..8cb1289c704a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3267,6 +3267,9 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata, 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; @@ -3695,7 +3698,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, } if (skb_has_frag_list(skb) && - !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) { + (!ieee80211_hw_check(&local->hw, TX_FRAG_LIST) || + vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)) { if (skb_linearize(skb)) { ieee80211_free_txskb(&local->hw, skb); goto begin;
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> --- net/mac80211/tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)