diff options
| author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-08-29 15:03:25 -0400 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2018-08-30 03:59:22 -0400 |
| commit | 1eb507903665442360a959136dfa3234c43db085 (patch) | |
| tree | 7fceb0a1530338e60f7c767e5b510ef82f108af0 /net | |
| parent | 4f0223bfe9c3e62d8f45a85f1ef1b18a8a263ef9 (diff) | |
mac80211: do not convert to A-MSDU if frag/subframe limited
Do not start to aggregate packets in a A-MSDU frame (converting the
first subframe to A-MSDU, adding the header) if max_tx_fragments or
max_amsdu_subframes limits are already exceeded by it. In particular,
this happens when drivers set the limit to 1 to avoid A-MSDUs at all.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
[reword commit message to be more precise]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/mac80211/tx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 667a73d6eb5c..1aac5e3c7eee 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
| @@ -3208,9 +3208,6 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata, | |||
| 3208 | if (skb->len + head->len > max_amsdu_len) | 3208 | if (skb->len + head->len > max_amsdu_len) |
| 3209 | goto out; | 3209 | goto out; |
| 3210 | 3210 | ||
| 3211 | if (!ieee80211_amsdu_prepare_head(sdata, fast_tx, head)) | ||
| 3212 | goto out; | ||
| 3213 | |||
| 3214 | nfrags = 1 + skb_shinfo(skb)->nr_frags; | 3211 | nfrags = 1 + skb_shinfo(skb)->nr_frags; |
| 3215 | nfrags += 1 + skb_shinfo(head)->nr_frags; | 3212 | nfrags += 1 + skb_shinfo(head)->nr_frags; |
| 3216 | frag_tail = &skb_shinfo(head)->frag_list; | 3213 | frag_tail = &skb_shinfo(head)->frag_list; |
| @@ -3226,6 +3223,9 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata, | |||
| 3226 | if (max_frags && nfrags > max_frags) | 3223 | if (max_frags && nfrags > max_frags) |
| 3227 | goto out; | 3224 | goto out; |
| 3228 | 3225 | ||
| 3226 | if (!ieee80211_amsdu_prepare_head(sdata, fast_tx, head)) | ||
| 3227 | goto out; | ||
| 3228 | |||
| 3229 | /* | 3229 | /* |
| 3230 | * Pad out the previous subframe to a multiple of 4 by adding the | 3230 | * Pad out the previous subframe to a multiple of 4 by adding the |
| 3231 | * padding to the next one, that's being added. Note that head->len | 3231 | * padding to the next one, that's being added. Note that head->len |
