From patchwork Fri Feb 1 05:36:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Surabhi Vishnoi X-Patchwork-Id: 10791831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8CCC6C2 for ; Fri, 1 Feb 2019 05:37:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D725931285 for ; Fri, 1 Feb 2019 05:37:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CABBB31A84; Fri, 1 Feb 2019 05:37:15 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 774DC31285 for ; Fri, 1 Feb 2019 05:37:15 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=2j57Wt94hQ8bqk/9rfHuNikoKP0UKvibBE4Bhla7yWQ=; b=llA Wd96Wwv0b171/QpmasLFHlMy6Q8z8gn9rO+Wi6TViUZ21pQAu8M88sVFje1hZyH8OIm4uaemP0+kj Ty4WGG+k9GSZM/Sp7r0V+QZ9vNiUDvPuoOB1spQqWiNzqfMyWRUAU9habUO3bjYkeRml89FRbepue mgD6wNXoMi+ZErfqPIWFsdhTyUP6Dks554j5OpWd2bn4uuNGCHWpJNc0Wv0tNqTPBa1P6m/w3L2j0 3oeJpzA+YvanQ/ltD0El+7Nq0dtTVf+2HJagDwa5Khqtv1yeMHsdGaIyJILQNjPWf0blWSjRFQCah geyUrE+rClVMYye4UYA2u6K7Jj/c8vQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpRVo-0005Bl-9h; Fri, 01 Feb 2019 05:37:12 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpRVE-0004hk-Ob for ath10k@lists.infradead.org; Fri, 01 Feb 2019 05:36:46 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3AFFA60A08; Fri, 1 Feb 2019 05:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548999396; bh=jpvJB/hbiatxUn3jTj25FD2nkjPyuWEJbl/mo2gFlUM=; h=From:To:Cc:Subject:Date:From; b=b2qIVdmraINvAqntyvxpPAziPb1EkYw5IS6FgZWNeO6wJ90eEYcx4weQVrAdLF81F OfLISAUClBGxKcBFqK1BjlJ2mK+zHG5+SAebpBBYK3e9vRTyjjEsZNYibM+7P35K6c BtY9lKEI19LuwuWPXMdFv0RSDGVREx0sJ+Qt82O8= Received: from svishnoi-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: svishnoi@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7911460721; Fri, 1 Feb 2019 05:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548999395; bh=jpvJB/hbiatxUn3jTj25FD2nkjPyuWEJbl/mo2gFlUM=; h=From:To:Cc:Subject:Date:From; b=eLaMosKhm3XRgcNDCvevacBTWZrE5pIDLnlbv7ASqVfnMhVWCrYDGyXQStvi0f7ox 8i2KeCik2Ux4NRF+3vDwYaDPGJlrV04/egxIIv7HhROnMV7gP3jU0WR+Nx7e7UCOBB TgSbie+hTfJ2tJRgBTTUgXuSbcHleKLQuZz/Lui8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7911460721 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=svishnoi@codeaurora.org From: Surabhi Vishnoi To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Fill tx_duration for each peer in Tx stats per STA Date: Fri, 1 Feb 2019 11:06:30 +0530 Message-Id: <1548999390-25576-1-git-send-email-svishnoi@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190131_213637_662680_F5C0AD6E X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. 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: linux-wireless@vger.kernel.org, Surabhi Vishnoi MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Firmware sends the tx_duration for each in HTT_T2H_MSG_TYPE_PEER_STATS msg. Fill the tx_duration sent by firmware in the tx stats information per STA. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0 Signed-off-by: Surabhi Vishnoi --- drivers/net/wireless/ath/ath10k/htt_rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index f42bac2..89d84dc 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2975,6 +2975,8 @@ static inline s8 ath10k_get_legacy_rate_idx(struct ath10k *ar, u8 rate) STATS_OP_FMT(RETRY).rate_table[0][idx] += pstats->retry_bytes; STATS_OP_FMT(RETRY).rate_table[1][idx] += pstats->retry_pkts; } + + tx_stats->tx_duration += pstats->duration; } static void @@ -3141,6 +3143,7 @@ static void ath10k_htt_fetch_peer_stats(struct ath10k *ar, p_tx_stats->succ_pkts = __le16_to_cpu(tx_stats->succ_pkts); p_tx_stats->retry_pkts = __le16_to_cpu(tx_stats->retry_pkts); p_tx_stats->failed_pkts = __le16_to_cpu(tx_stats->failed_pkts); + p_tx_stats->duration = __le16_to_cpu(tx_stats->tx_duration); ath10k_update_per_peer_tx_stats(ar, sta, p_tx_stats); }