All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: account TX MSDUs properly with segmentation offload
@ 2015-06-23  9:50 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2015-06-23  9:50 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

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>
---
 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 9489b5da5a46..53d462c84977 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2810,7 +2810,11 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
 	u64_stats_update_begin(&sta->tx_sync);
 	sta->tx_bytes[skb_get_queue_mapping(skb)] += skb->len;
 	sta->tx_packets[skb_get_queue_mapping(skb)]++;
-	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]++;
 	u64_stats_update_end(&sta->tx_sync);
 
 	if (fast_tx->pn_offs) {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-23  9:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23  9:50 [PATCH] mac80211: account TX MSDUs properly with segmentation offload Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.