From patchwork Thu Oct 31 05:22:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateswara Naralasetty X-Patchwork-Id: 11220621 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 16A07112B for ; Thu, 31 Oct 2019 05:29:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E749A20862 for ; Thu, 31 Oct 2019 05:29:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SwvII3SM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E749A20862 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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=R9izRsnoCSUAGOaxlQVRSvpR5l1kSud2E3egLWvIdAw=; b=Swv II3SMn37PdAx2LeQoq2ULhEvp4WeSqFbVeD0gGmuTMzOCRCoahdIK/Ld5GOFm0h5WQ74CVsusG1b0 n8zY5P2n/bY1z8rLaGLLxJvS1wmBV/GoiXHNcjBK9RJiaDtcv6ZZkhIbMlQBEoZ5a+XRnxFs2zRkv K+FovswiXH1oopZLDBhnEmB3zCvJ3SdUN8NfQISl3KZTmWnRv/nOGsKAwj4Z16aIZqMC5hgfP/O9M BKsf7f3rah9kH9tKkl3uChtmpFanJB0eTDv6WLY6Pa2VAWAQk/q0NnF4dj8r/c2gQE2VB+++/2jnz dn+LVw3MlksHZNL9lf5jvFZiIagszog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQ31B-0002kM-Hs; Thu, 31 Oct 2019 05:29:09 +0000 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQ318-0002jx-C2 for ath11k@lists.infradead.org; Thu, 31 Oct 2019 05:29:08 +0000 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-02.qualcomm.com with ESMTP/TLS/AES256-SHA; 31 Oct 2019 10:52:47 +0530 IronPort-SDR: 5h+4Em6lTDFUlDYfeOO3R7moNQLqicDgf9bpitVU8Mk70vP8Uus8ePDWCrOg/+b460txaZ1rEg v6jTmQagnaQBwhhR6lClK6dIIdHfS7DX+fAMsIhXlc7Tt1ZdyO73vQRxM5SiJn7Bs07JrCrPq9 eD0IEjHjVXvznUM+pcsGMqoDrXofh5xFTpcojaFegX815/ibCDBJUUvClgv0zY8g7obSXz2jFL ztRvgSTT5J36Ilu28jImBPwWyO6aqMdiTapAo8T0fh8MA3yxBA2oOU/YJqXlRC5V0IfcoN9jFz rBtGF9s/oFB5b7dzx9Vna/F+ Received: from vnaralas-linux.qualcomm.com ([10.201.26.231]) by ironmsg02-blr.qualcomm.com with ESMTP; 31 Oct 2019 10:52:42 +0530 Received: by vnaralas-linux.qualcomm.com (Postfix, from userid 443942) id 842C22D60; Thu, 31 Oct 2019 10:52:41 +0530 (IST) From: Venkateswara Naralasetty To: ath11k@lists.infradead.org Subject: [PATCH] ath11k: update tx duration in station info Date: Thu, 31 Oct 2019 10:52:40 +0530 Message-Id: <1572499360-4430-1-git-send-email-vnaralas@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191030_222906_931523_41255625 X-CRM114-Status: UNSURE ( 5.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Venkateswara Naralasetty MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org Update tx duration in station info form PPDU stats so that users can dump tx duration of the station. Signed-off-by: Venkateswara Naralasetty --- drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/dp_rx.c | 1 + drivers/net/wireless/ath/ath11k/mac.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 95447d1..8ed034d 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -335,6 +335,7 @@ struct ath11k_sta { struct rate_info txrate; struct rate_info last_txrate; u64 rx_duration; + u64 tx_duration; u8 rssi_comb; struct ath11k_htt_tx_stats *tx_stats; struct ath11k_rx_peer_stats *rx_stats; diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 9491a47..e1e805c 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1159,6 +1159,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, arsta->txrate.nss = nss; arsta->txrate.bw = ath11k_bw_to_mac80211_bw(bw); arsta->tx_info.status.rates[0].flags |= ath11k_bw_to_mac80211_bwflags(bw); + arsta->tx_duration += tx_duration; memcpy(&arsta->last_txrate, &arsta->txrate, sizeof(struct rate_info)); diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index cb025a4..c49c2cf 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -4962,6 +4962,9 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw, sinfo->rx_duration = arsta->rx_duration; sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_DURATION); + sinfo->tx_duration = arsta->tx_duration; + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_DURATION); + if (!arsta->txrate.legacy && !arsta->txrate.nss) return;