From patchwork Sun Dec 8 08:45:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 3305851 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 95E399F37A for ; Sun, 8 Dec 2013 08:47:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D47CE20303 for ; Sun, 8 Dec 2013 08:47:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04732202B8 for ; Sun, 8 Dec 2013 08:47:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752882Ab3LHIqf (ORCPT ); Sun, 8 Dec 2013 03:46:35 -0500 Received: from mail-ea0-f169.google.com ([209.85.215.169]:62511 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578Ab3LHIqe (ORCPT ); Sun, 8 Dec 2013 03:46:34 -0500 Received: by mail-ea0-f169.google.com with SMTP id l9so1012308eaj.0 for ; Sun, 08 Dec 2013 00:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TeaZic6LPGfQ9g6fsLNDM/QynfjDnfWnGL51/iIKuCI=; b=K3dTMKqgiGtFGc7LkQyxciZp1Hz/FTrTnIaxMyQ4PcPM7s+Qe7PyuFVMV7iYh/KpSg ysPxy3wG81TTEw57WnUHW/peVsMz43wzFcWUSGlV3/2wd7VRMCBgzbePDBaYAGEKqwOl JH8LNSlR3VttTo2iUE5UQRqhubKr87ImDywnrJXSYSi8B7OM8J/+vc6YK1zGmApinFnw wxtBct/oPhV4X46BEFwHM3TGnrl8w4cmr+WLAyI5JhsRF++H7q/mAH8YygDu4e7cukmr 9B+kfYlc2OW7l/DKSiykw/aJtX4SclBcfJXBsp7GuqWz4i6BbCWsF6yVOwyytlezZzFi +eGg== X-Received: by 10.15.41.140 with SMTP id s12mr8564872eev.50.1386492392370; Sun, 08 Dec 2013 00:46:32 -0800 (PST) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id o1sm15043591eea.10.2013.12.08.00.46.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 00:46:31 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: "John W. Linville" , Johannes Berg , "David S. Miller" Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Gnedt Subject: [PATCH] mac80211: fix TX device statistics for monitor interfaces Date: Sun, 8 Dec 2013 09:45:57 +0100 Message-Id: <1386492357-20826-1-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <87iowiszyu.fsf@purkki.adurom.net> References: <87iowiszyu.fsf@purkki.adurom.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Gnedt Count TX packets and bytes also for monitor interfaces. Signed-off-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 c558b24..37b38fb 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1623,6 +1623,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