From patchwork Sat Oct 26 20:34:00 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: 3099021 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 044CBBF924 for ; Sat, 26 Oct 2013 20:46:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E2872017B for ; Sat, 26 Oct 2013 20:46:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F73F2010C for ; Sat, 26 Oct 2013 20:46:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754163Ab3JZUqa (ORCPT ); Sat, 26 Oct 2013 16:46:30 -0400 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 Received: by mail-ee0-f53.google.com with SMTP id e51so696085eek.12 for ; Sat, 26 Oct 2013 13:40:24 -0700 (PDT) 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=cUsPZgHmKZc/uznuB1kLCzdoPj9rp4N397mX45fuLaU=; b=NTB7cpqOZmMbyNBfpAE05zhpJM738fDq29/1U4KgVUeEgB8wj/rJY2Vb3N9LoiN+Yj W9N5KeTRu2izlYS04k7VaDFcCjeQ2L6z49NDlK9Jo8Hvg3zhX0uzRdClmHpAYYIf7m5g 5k/RUoVX67JizZsiv1UDoxhH0Mo8UzYD35TBE7yuqm6gX1Vkyh/LB2m1nI2KXZGq+k5S WaIvpKWEFDItrC7RrhWL99Mg04KC14O/RDWeb3HI/yKvyA384jJfiGLCTreTtgXOoNfA Vx3JTSA+NVVQaYVz/7PuULOaFHlw1MslY1BhZfx9M8jDWGtXXNLm8JNierZ7WfAvVaxJ FjcQ== X-Received: by 10.15.32.7 with SMTP id z7mr3923797eeu.78.1382820024204; Sat, 26 Oct 2013 13:40:24 -0700 (PDT) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id i1sm35327553eeg.0.2013.10.26.13.40.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Oct 2013 13:40:23 -0700 (PDT) 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> X-Mailer: git-send-email 1.7.10.4 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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 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-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