linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: linux-wireless@vger.kernel.org
Cc: ath11k@lists.infradead.org
Subject: [PATCH 5/9] ath11k: update tx duration in station info
Date: Thu, 28 Nov 2019 08:21:51 +0000	[thread overview]
Message-ID: <0101016eb11a27fd-1680b7b5-4be4-48b1-8259-c9e83a16bcbb-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <1574929300-31782-1-git-send-email-kvalo@codeaurora.org>

From: Venkateswara Naralasetty <vnaralas@codeaurora.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 <vnaralas@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 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 065cb9dc880b..06482a5c102d 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 85e999c7a238..8f69de594ada 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 b048057b398f..624534d4c33a 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;
 
-- 
2.7.4


  parent reply	other threads:[~2019-11-28  8:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1574929300-31782-1-git-send-email-kvalo@codeaurora.org>
2019-11-28  8:21 ` [PATCH 1/9] ath11k: Update tx and rx chain count properly on drv_set_antenna Kalle Valo
2019-11-29  7:51   ` Kalle Valo
2019-11-28  8:21 ` [PATCH 2/9] ath11k: Advertise MPDU start spacing as no restriction Kalle Valo
2019-11-28  8:21 ` [PATCH 3/9] ath11k: fix memory leak in monitor mode Kalle Valo
2019-11-28  8:21 ` [PATCH 4/9] ath11k: fix vht guard interval mapping Kalle Valo
2019-11-28  8:21 ` Kalle Valo [this message]
2019-11-28  8:21 ` [PATCH 6/9] ath11k: Skip update peer stats for management packets Kalle Valo
2019-11-28  8:21 ` [PATCH 7/9] ath11k: Move mac80211 hw allocation before wmi_init command Kalle Valo
2019-11-28  8:21 ` [PATCH 8/9] ath11k: Setup REO destination ring before sending " Kalle Valo
2019-11-28  8:22 ` [PATCH 9/9] ath11k: fix indentation in ath11k_mac_prepare_he_mode() Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0101016eb11a27fd-1680b7b5-4be4-48b1-8259-c9e83a16bcbb-000000@us-west-2.amazonses.com \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).