From patchwork Wed Nov 13 15:01:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateswara Naralasetty X-Patchwork-Id: 11242059 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 9BBE11515 for ; Wed, 13 Nov 2019 15:01:55 +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 79ADC206BB for ; Wed, 13 Nov 2019 15:01:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="scyCnbEM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79ADC206BB 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=DgvdcCCGY7JpoZ4Y08UQUVLum0HHAyW3mpab10E/fqY=; b=scy CnbEMVer6LwYeQN1P7tLauL05nU7UM61z92p6pZxBp7PZ0memKfmk/BJ5DOR8fjBwQ5ZFrc8SWMFe UrRs/w2+dpMc537NvDwEcIYUdkEcUZjDqWWdsIlNnFcJK7N+KbxVgsblc23KQTb44EgRAekwvD7mN McGHW69KskxRFQO1aAYoQlDHg8OW7SuQ+B3BttMsByc0m8aSS9AFT/fo9EASvV9sJnRVKqxoPCIO0 KZRNV8w989dDtj9aBD1cixxmOXz0TPApCGwMsDWjzEMDhJxYG5azn1RuRSSJ1DFoH9i5/PPMyz4T5 7mqcsu5e3r5KBfdnA3m/NHAEAVy8gyQ==; 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 1iUu9Z-0000f0-Th; Wed, 13 Nov 2019 15:01:53 +0000 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUu9X-0000dw-2x for ath11k@lists.infradead.org; Wed, 13 Nov 2019 15:01:52 +0000 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 13 Nov 2019 20:31:40 +0530 IronPort-SDR: lfEtK1WcYhyove75RFwJgoRQJHtueURs24iGDZGzaUY8mRfzCnmeG6cKyF7SEPiHipwYHIuTv/ FK/emEAF+CuD6O2ffwThgLZo1RkHKuh94e0Tmh2Cb/EwzaSeEPuviMtZPVv142Y0Tngc3SuGeb kgcdI30JsLkaPReKtEvYPH1uoAA+2GtHZ7lHclxuE24haDZSWrbgTlYOzpkNfoPK4WNqt1/Fer 8gB9rIO1aklzLWUs3BqpQqIRBFdT2VZJ6fSilTovXfkM+qESal6/qfKuTn0eHltLN0MgbUzO0u ct0WNEi11BNx74Q6sbOx38Bb Received: from vnaralas-linux.qualcomm.com ([10.201.26.231]) by ironmsg01-blr.qualcomm.com with ESMTP; 13 Nov 2019 20:31:36 +0530 Received: by vnaralas-linux.qualcomm.com (Postfix, from userid 443942) id 1910E2F4A; Wed, 13 Nov 2019 20:31:34 +0530 (IST) From: Venkateswara Naralasetty To: ath11k@lists.infradead.org Subject: [PATCHv2] ath11k: update tx duration in station info Date: Wed, 13 Nov 2019 20:31:33 +0530 Message-Id: <1573657293-29509-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-20191113_070151_650439_2E24AD07 X-CRM114-Status: UNSURE ( 7.32 ) 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.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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 --- v2: * rebased version drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 065cb9d..06482a5 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 8c21925..8b88e56 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1147,7 +1147,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, arsta->txrate.nss = nss; arsta->txrate.bw = ath11k_mac_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)); if (succ_pkts) { diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 5ee7c2a..c5ab067 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5316,6 +5316,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;