All of lore.kernel.org
 help / color / mirror / Atom feed
From: <akolli@qti.qualcomm.com>
To: <ath10k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>, <akolli@codeaurora.org>,
	Anilkumar Kolli <akolli@qti.qualcomm.com>
Subject: [PATCH 2/2] ath10k: add support for per sta tx bitrate
Date: Fri, 7 Oct 2016 20:28:52 +0530	[thread overview]
Message-ID: <1475852332-18217-3-git-send-email-akolli@qti.qualcomm.com> (raw)
In-Reply-To: <1475852332-18217-1-git-send-email-akolli@qti.qualcomm.com>

From: Anilkumar Kolli <akolli@qti.qualcomm.com>

Per STA tx bitrate info is filled from peer stats.
Export per sta txrate info to cfg80211/nl80211

Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/debugfs_sta.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
index 9955fea0802a..7daf9927a1ef 100644
--- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c
+++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
@@ -77,6 +77,19 @@ void ath10k_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 
 	sinfo->rx_duration = arsta->rx_duration;
 	sinfo->filled |= 1ULL << NL80211_STA_INFO_RX_DURATION;
+
+	if (!arsta->txrate.legacy && !arsta->txrate.nss)
+		return;
+
+	if(arsta->txrate.legacy) {
+		sinfo->txrate.legacy = arsta->txrate.legacy;
+	} else {
+		sinfo->txrate.mcs = arsta->txrate.mcs;
+		sinfo->txrate.nss = arsta->txrate.nss;
+		sinfo->txrate.bw = arsta->txrate.bw;
+	}
+	sinfo->txrate.flags = arsta->txrate.flags;
+	sinfo->filled |= 1ULL << NL80211_STA_INFO_TX_BITRATE;
 }
 
 static ssize_t ath10k_dbg_sta_read_aggr_mode(struct file *file,
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: <akolli@qti.qualcomm.com>
To: ath10k@lists.infradead.org
Cc: Anilkumar Kolli <akolli@qti.qualcomm.com>,
	akolli@codeaurora.org, linux-wireless@vger.kernel.org
Subject: [PATCH 2/2] ath10k: add support for per sta tx bitrate
Date: Fri, 7 Oct 2016 20:28:52 +0530	[thread overview]
Message-ID: <1475852332-18217-3-git-send-email-akolli@qti.qualcomm.com> (raw)
In-Reply-To: <1475852332-18217-1-git-send-email-akolli@qti.qualcomm.com>

From: Anilkumar Kolli <akolli@qti.qualcomm.com>

Per STA tx bitrate info is filled from peer stats.
Export per sta txrate info to cfg80211/nl80211

Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/debugfs_sta.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
index 9955fea0802a..7daf9927a1ef 100644
--- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c
+++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
@@ -77,6 +77,19 @@ void ath10k_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 
 	sinfo->rx_duration = arsta->rx_duration;
 	sinfo->filled |= 1ULL << NL80211_STA_INFO_RX_DURATION;
+
+	if (!arsta->txrate.legacy && !arsta->txrate.nss)
+		return;
+
+	if(arsta->txrate.legacy) {
+		sinfo->txrate.legacy = arsta->txrate.legacy;
+	} else {
+		sinfo->txrate.mcs = arsta->txrate.mcs;
+		sinfo->txrate.nss = arsta->txrate.nss;
+		sinfo->txrate.bw = arsta->txrate.bw;
+	}
+	sinfo->txrate.flags = arsta->txrate.flags;
+	sinfo->filled |= 1ULL << NL80211_STA_INFO_TX_BITRATE;
 }
 
 static ssize_t ath10k_dbg_sta_read_aggr_mode(struct file *file,
-- 
1.7.9.5


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2016-10-07 14:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 14:58 [PATCH 0/2] ath10k: add support for tx bitrate akolli
2016-10-07 14:58 ` akolli
2016-10-07 14:58 ` [PATCH 1/2] ath10k: add per peer htt tx stats support for 10.4 akolli
2016-10-07 14:58   ` akolli
2016-10-08 14:16   ` Yeoh Chun-Yeow
2016-10-08 14:16     ` Yeoh Chun-Yeow
2016-10-12  4:59     ` Valo, Kalle
2016-10-12  4:59       ` Valo, Kalle
2016-10-12 13:36       ` Yeoh Chun-Yeow
2016-10-12 13:36         ` Yeoh Chun-Yeow
2016-10-12 13:59         ` Valo, Kalle
2016-10-12 13:59           ` Valo, Kalle
2016-10-12  4:59   ` Valo, Kalle
2016-10-12  4:59     ` Valo, Kalle
2016-10-18  5:38     ` akolli
2016-10-18  5:38       ` akolli
2016-10-07 14:58 ` akolli [this message]
2016-10-07 14:58   ` [PATCH 2/2] ath10k: add support for per sta tx bitrate akolli

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=1475852332-18217-3-git-send-email-akolli@qti.qualcomm.com \
    --to=akolli@qti.qualcomm.com \
    --cc=akolli@codeaurora.org \
    --cc=ath10k@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.