aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-06-23 11:50:52 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-07-17 15:38:28 +0200
commitccc6bb96ff058ad737fb8236e15aeaa56e822296 (patch)
tree51800afa08d89f3db286ae11e2fb572e221fb1cc /net/mac80211
parentwireless: remove superfluous if statement in regulatory code (diff)
downloadlinux-dev-ccc6bb96ff058ad737fb8236e15aeaa56e822296.tar.xz
linux-dev-ccc6bb96ff058ad737fb8236e15aeaa56e822296.zip
mac80211: account TX MSDUs properly with segmentation offload
If an SKB will be segmented by the driver, count it for multiple MSDUs that are being transmitted rather than just a single. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c0d6af809640..d14f3618069f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2771,7 +2771,11 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
sdata->sequence_number += 0x10;
}
- sta->tx_msdu[tid]++;
+ if (skb_shinfo(skb)->gso_size)
+ sta->tx_msdu[tid] +=
+ DIV_ROUND_UP(skb->len, skb_shinfo(skb)->gso_size);
+ else
+ sta->tx_msdu[tid]++;
info->hw_queue = sdata->vif.hw_queue[skb_get_queue_mapping(skb)];