From patchwork Tue Dec 5 13:31:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akolli@qti.qualcomm.com X-Patchwork-Id: 10092949 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1A2C60327 for ; Tue, 5 Dec 2017 13:59:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF82B2890E for ; Tue, 5 Dec 2017 13:59:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2F2E28DCC; Tue, 5 Dec 2017 13:59:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 382C82890E for ; Tue, 5 Dec 2017 13:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IEgtTwJKXq6U0ce4w+h+aC7Jm9WkYS8AtYU2UbccrwA=; b=sHwfNvUmpE/PiP IJeZcw8VtKDQWpDX/lzzUgmm3P5wm8wDehI1iXi9o8zlJbIV+mcjJOHod9rNAanNwA3cgptfIcT4V Wa3vHvF8Pno69puFzeoiRBDP22kFKrA8Vjf7UbWZQmiYQg7duvxImayot/t94vXFkE+8xS6Yt0kU9 v1MonuddhuijcWb4f5FeHE0VxMQ2jgBRrYKk/Oze5gEZVEo7i5Zutc5bp9G3TCTkDOXDsIpATvgDZ JQTWKNnfydRcyaWCFRhs1rhvsyVc0I8r4PDa9zeCI5CDIYrM9r2oaETtdvKgongN2ejv14Hh8tAyA 8m5HGqpac3wKaxkkGMvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMDkQ-0003SO-77; Tue, 05 Dec 2017 13:58:58 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMDkC-0003Dy-1I for ath10k@bombadil.infradead.org; Tue, 05 Dec 2017 13:58:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0qHmo1rzLvxFDhPN8qDYYXUnQdRFejYJqDr63g/f7ZA=; b=n7xJYglMtkZO9k0Ng+B+V8dMY 9D6hZYpfX5fcnn9uW6n1wCTdx0l9vcTdmXWlxoRoPy9+xpyI3i7qxoJMUVk4Lu0ciK/9xk5u081v7 4OEoGnrE3IMpl/enA/pJflstYj9NnY8KljJKk+JfNlJiQn1F5INBKWhdgURmgAxZAJxKE+VUGY4nf 7BBKnEcNSaBk4WXNRxpmzfgXiqv7MNnGwcR+G14E+uSzszb+r1UC2qLWD8vUxMvzplQMDBOUlP2kH EZT1Fkjo2R7eA54v5s14jVT5ICz6Vs+xCwQA4h/HZ6ehKSSG8CnZg56viy+oLDJs4WKzoAm+OaUNd zGg0gYZHw==; Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMDJs-0006AB-Dn for ath10k@lists.infradead.org; Tue, 05 Dec 2017 13:31:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1512480692; x=1544016692; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=0Ps2JG3Z8Uw1H2l4vTlH+h+MTkGte9FVGfgpLeCvIEo=; b=ReatQVOqrSqdXZes5vENJqVfau6WRSZNwgI0amq7N+s5laVeYRQCis2H EcNT5YzUs7FmgsT7oys59IFbxg6arFKmXXwofbopf+UwnQJ4BrHUtEG3/ nBGeZgKTeLbIMNRW1s9Q0RZQBOov3GrlnBOuq1o7760OL3iScW7F2xPKq Q=; X-IronPort-AV: E=Sophos;i="5.45,364,1508828400"; d="scan'208";a="117392281" Received: from unknown (HELO ironmsg02-R.qualcomm.com) ([10.53.140.106]) by sabertooth01.qualcomm.com with ESMTP; 05 Dec 2017 05:31:09 -0800 X-IronPort-AV: E=McAfee;i="5900,7806,8735"; a="1084566586" X-MGA-submission: =?us-ascii?q?MDFlT3e8ktPmpgAYp5Tgmc9rS5eEgJ5ubRhLU7?= =?us-ascii?q?XvvXsQwNP6y8VLUzl7gSvnU2sfTTAevpGiL4Ifmn/ebkd929WcWeKUNu?= =?us-ascii?q?x9hX6d/HsFLeHpAXofWdYdwEnk88emDeZ8HrHIC2ohF9a0r0tM62byeY?= =?us-ascii?q?0n?= Received: from nasanexm03g.na.qualcomm.com ([10.85.0.49]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/AES256-SHA; 05 Dec 2017 05:30:59 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm03g.na.qualcomm.com (10.85.0.49) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 5 Dec 2017 05:30:58 -0800 Received: from localhost (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 5 Dec 2017 19:00:53 +0530 From: To: Subject: [PATCHv2 1/3] ath10k: remove MAC80211_DEBUGFS dependency on ath10k_sta_statistics Date: Tue, 5 Dec 2017 19:01:23 +0530 Message-ID: <1512480685-28471-2-git-send-email-akolli@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1512480685-28471-1-git-send-email-akolli@qti.qualcomm.com> References: <1512480685-28471-1-git-send-email-akolli@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01G.na.qualcomm.com (10.85.0.33) To aphydexm01f.ap.qualcomm.com (10.252.127.15) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anilkumar Kolli , akolli@codeaurora.org, linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anilkumar Kolli Remove CONFIG_MAC80211_DEBUGFS dependency on ath10k_sta_statistics(). ath10k_sta_statistics() has per sta tx/rx stats and this should not be dependent on MAC80211_DEBUGFS. No changes in functionality. Signed-off-by: Anilkumar Kolli --- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/debug.h | 3 --- drivers/net/wireless/ath/ath10k/debugfs_sta.c | 27 ---------------------- drivers/net/wireless/ath/ath10k/mac.c | 30 ++++++++++++++++++++++++- 4 files changed, 30 insertions(+), 32 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 643041ef3271..15e386d091a4 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -364,11 +364,11 @@ struct ath10k_sta { struct rate_info txrate; struct work_struct update_wk; + u64 rx_duration; #ifdef CONFIG_MAC80211_DEBUGFS /* protected by conf_mutex */ bool aggr_mode; - u64 rx_duration; #endif }; diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index 548ad5483a4a..dd82a61ed1c8 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h @@ -190,9 +190,6 @@ void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct dentry *dir); void ath10k_sta_update_rx_duration(struct ath10k *ar, struct ath10k_fw_stats *stats); -void ath10k_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - struct station_info *sinfo); #else static inline void ath10k_sta_update_rx_duration(struct ath10k *ar, diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c index d59ac6b83340..ff96f70d2282 100644 --- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c @@ -65,33 +65,6 @@ void ath10k_sta_update_rx_duration(struct ath10k *ar, ath10k_sta_update_stats_rx_duration(ar, stats); } -void ath10k_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - struct station_info *sinfo) -{ - struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv; - struct ath10k *ar = arsta->arvif->ar; - - if (!ath10k_peer_stats_enabled(ar)) - return; - - sinfo->rx_duration = arsta->rx_duration; - sinfo->filled |= 1ULL << NL80211_STA_INFO_RX_DURATION; - - if (!arsta->txrate.legacy && !arsta->txrate.nss) - return; - - if (arsta->txrate.legacy) { - sinfo->txrate.legacy = arsta->txrate.legacy; - } else { - sinfo->txrate.mcs = arsta->txrate.mcs; - sinfo->txrate.nss = arsta->txrate.nss; - sinfo->txrate.bw = arsta->txrate.bw; - } - sinfo->txrate.flags = arsta->txrate.flags; - sinfo->filled |= 1ULL << NL80211_STA_INFO_TX_BITRATE; -} - static ssize_t ath10k_dbg_sta_read_aggr_mode(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 06383e70e009..884543026f3a 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -7630,6 +7630,34 @@ static void ath10k_mac_op_sta_pre_rcu_remove(struct ieee80211_hw *hw, peer->removed = true; } +static void ath10k_sta_statistics(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct station_info *sinfo) +{ + struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv; + struct ath10k *ar = arsta->arvif->ar; + + if (!ath10k_peer_stats_enabled(ar)) + return; + + sinfo->rx_duration = arsta->rx_duration; + sinfo->filled |= 1ULL << NL80211_STA_INFO_RX_DURATION; + + if (!arsta->txrate.legacy && !arsta->txrate.nss) + return; + + if (arsta->txrate.legacy) { + sinfo->txrate.legacy = arsta->txrate.legacy; + } else { + sinfo->txrate.mcs = arsta->txrate.mcs; + sinfo->txrate.nss = arsta->txrate.nss; + sinfo->txrate.bw = arsta->txrate.bw; + } + sinfo->txrate.flags = arsta->txrate.flags; + sinfo->filled |= 1ULL << NL80211_STA_INFO_TX_BITRATE; +} + static const struct ieee80211_ops ath10k_ops = { .tx = ath10k_mac_op_tx, .wake_tx_queue = ath10k_mac_op_wake_tx_queue, @@ -7671,6 +7699,7 @@ static void ath10k_mac_op_sta_pre_rcu_remove(struct ieee80211_hw *hw, .unassign_vif_chanctx = ath10k_mac_op_unassign_vif_chanctx, .switch_vif_chanctx = ath10k_mac_op_switch_vif_chanctx, .sta_pre_rcu_remove = ath10k_mac_op_sta_pre_rcu_remove, + .sta_statistics = ath10k_sta_statistics, CFG80211_TESTMODE_CMD(ath10k_tm_cmd) @@ -7681,7 +7710,6 @@ static void ath10k_mac_op_sta_pre_rcu_remove(struct ieee80211_hw *hw, #endif #ifdef CONFIG_MAC80211_DEBUGFS .sta_add_debugfs = ath10k_sta_add_debugfs, - .sta_statistics = ath10k_sta_statistics, #endif };