From patchwork Wed Feb 3 15:37:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Shafi Shajakhan X-Patchwork-Id: 8204101 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 62930BEEE5 for ; Wed, 3 Feb 2016 15:39:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86D0F20221 for ; Wed, 3 Feb 2016 15:39:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF15C2022D for ; Wed, 3 Feb 2016 15:39:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQzW8-00014i-09; Wed, 03 Feb 2016 15:38:52 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQzW4-0000un-8D for ath10k@lists.infradead.org; Wed, 03 Feb 2016 15:38:48 +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=1454513928; x=1486049928; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=SFfxx4np8I5PolpE2SLcXgMIRaOvhsGANE53WCCTFes=; b=lczeiKfU0DawVtd6s4e1FGr93JGF0SXY1cj1cwQeLaVWUNRgnloA1v8u FgBH77QLKnCriYSvJoInmeqz/SlXAxajkUy2HGz+5pQt2FhGZATFZv5nD U+wwjzNhXF1nklrjd4wRdEJ/9Wf7M0ShJmAPxFT2rjL6pI3F8mFHOUh+k w=; X-IronPort-AV: E=Sophos;i="5.22,391,1449561600"; d="scan'208";a="166522061" Received: from ironmsg04-r-new.qualcomm.com (HELO Ironmsg04-R.qualcomm.com) ([10.53.140.108]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Feb 2016 07:38:18 -0800 From: Mohammed Shafi Shajakhan X-IronPort-AV: E=McAfee;i="5700,7163,8063"; a="1132421824" Received: from nasanexm02d.na.qualcomm.com ([10.85.0.44]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 03 Feb 2016 07:38:18 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM02D.na.qualcomm.com (10.85.0.44) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Wed, 3 Feb 2016 07:38:17 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Wed, 3 Feb 2016 21:08:08 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Wed, 03 Feb 2016 21:08:02 +0530 To: Subject: [PATCH 1/2] ath10k: Fix updating peer stats rx duration Date: Wed, 3 Feb 2016 21:07:42 +0530 Message-ID: <1454513863-2703-2-git-send-email-mohammed@qca.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1454513863-2703-1-git-send-email-mohammed@qca.qualcomm.com> References: <1454513863-2703-1-git-send-email-mohammed@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm01a.na.qualcomm.com (10.85.0.81) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160203_073848_512565_E929FA66 X-CRM114-Status: UNSURE ( 7.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kalle Valo , linux-wireless@vger.kernel.org, Mohammed Shafi Shajakhan Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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: Mohammed Shafi Shajakhan We are not updating peer stats rx_duration periodically unless the user one polls for fw_stats, this is because we discard the update event since pdev list is empty. Fix this by updating rx duration periodically irrepective of checks for pdev list (irrespective of ping-pong response) Fixes: 856e7c3 ("ath10k: add debugfs support for Per STA total rx duration") Signed-off-by: Mohammed Shafi Shajakhan --- drivers/net/wireless/ath/ath10k/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 8d4148a..d80a44e 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -348,6 +348,9 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb) */ peer_stats_svc = test_bit(WMI_SERVICE_PEER_STATS, ar->wmi.svc_map); + if (peer_stats_svc) + ath10k_sta_update_rx_duration(ar, &stats.peers); + if (ar->debug.fw_stats_done && !peer_stats_svc) { ath10k_warn(ar, "received unsolicited stats update event\n"); goto free; @@ -384,9 +387,6 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb) goto free; } - if (peer_stats_svc) - ath10k_sta_update_rx_duration(ar, &stats.peers); - list_splice_tail_init(&stats.peers, &ar->debug.fw_stats.peers); list_splice_tail_init(&stats.vdevs, &ar->debug.fw_stats.vdevs); }