Thread (76 messages) 76 messages, 9 authors, 2014-01-16
STALE4518d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 01/16] mac80211: fix TX device statistics for monitor interfaces

From: Pali Rohár <hidden>
Date: 2013-10-26 20:46:30
Also in: linux-wireless, lkml
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

From: David Gnedt <redacted>

Count TX packets and bytes also for monitor interfaces.

Signed-of-by: David Gnedt [off-list ref]
---
 net/mac80211/tx.c |    3 +++
 1 file changed, 3 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3456c04..674db8e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1593,6 +1593,9 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
 	if (unlikely(skb->len < len_rthdr))
 		goto fail; /* skb too short for claimed rt header extent */
 
+	dev->stats.tx_packets++;
+	dev->stats.tx_bytes += skb->len;
+
 	/*
 	 * fix up the pointers accounting for the radiotap
 	 * header still being in there.  We are being given
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help