From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ee0-f53.google.com ([74.125.83.53]:53108 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753382Ab3JZUkZ (ORCPT ); Sat, 26 Oct 2013 16:40:25 -0400 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Luciano Coelho , "John W. Linville" , Johannes Berg , "David S. Miller" Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, freemangordon@abv.bg, aaro.koskinen@iki.fi, pavel@ucw.cz, sre@ring0.de, joni.lapilainen@gmail.com, pali.rohar@gmail.com, David Gnedt Subject: [PATCH 01/16] mac80211: fix TX device statistics for monitor interfaces Date: Sat, 26 Oct 2013 22:34:00 +0200 Message-Id: <1382819655-30430-2-git-send-email-pali.rohar@gmail.com> (sfid-20131026_224647_415772_4C8BF2B8) In-Reply-To: <1382819655-30430-1-git-send-email-pali.rohar@gmail.com> References: <1382819655-30430-1-git-send-email-pali.rohar@gmail.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: From: David Gnedt Count TX packets and bytes also for monitor interfaces. Signed-of-by: David Gnedt --- 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