From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
To: <linux-wireless@vger.kernel.org>
Cc: <ath10k@lists.infradead.org>, <johannes@sipsolutions.net>,
<kvalo@codeaurora.org>, <mohammed@codeaurora.org>,
Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Subject: [PATCH v3] iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute
Date: Wed, 9 Mar 2016 18:45:57 +0530 [thread overview]
Message-ID: <1457529357-19077-2-git-send-email-mohammed@qca.qualcomm.com> (raw)
In-Reply-To: <1457529357-19077-1-git-send-email-mohammed@qca.qualcomm.com>
From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Enable support for parsing per station rx-duration (usecs)
via adding support for new netlink attribute NL80211_STA_INFO_RX_DURATION
rx_duration is aggregate PPDU duration(usecs) for all the frames
frames from a peer . This will get dumped as part of
'iw dev wlan#N station dump'
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
---
nl80211.h | 3 +++
station.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/nl80211.h b/nl80211.h
index 5b7b5eb..991b3ce 100644
--- a/nl80211.h
+++ b/nl80211.h
@@ -2464,6 +2464,8 @@ enum nl80211_sta_bss_param {
* TID+1 and the special TID 16 (i.e. value 17) is used for non-QoS frames;
* each one of those is again nested with &enum nl80211_tid_stats
* attributes carrying the actual values.
+ * @NL80210_STA_INFO_RX_DURATION: aggregate PPDU duration(usecs) for all the
+ * frames from a peer
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -2500,6 +2502,7 @@ enum nl80211_sta_info {
NL80211_STA_INFO_BEACON_RX,
NL80211_STA_INFO_BEACON_SIGNAL_AVG,
NL80211_STA_INFO_TID_STATS,
+ NL80211_STA_INFO_RX_DURATION,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
diff --git a/station.c b/station.c
index b5ccf4a..a730db1 100644
--- a/station.c
+++ b/station.c
@@ -147,6 +147,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
[NL80211_STA_INFO_NONPEER_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_CHAIN_SIGNAL] = { .type = NLA_NESTED },
[NL80211_STA_INFO_CHAIN_SIGNAL_AVG] = { .type = NLA_NESTED },
+ [NL80211_STA_INFO_RX_DURATION] = { .type = NLA_U64 },
};
char *chain;
@@ -226,6 +227,10 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
printf("\n\trx bitrate:\t%s", buf);
}
+ if (sinfo[NL80211_STA_INFO_RX_DURATION])
+ printf("\n\trx duration:\t%lld us",
+ (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_RX_DURATION]));
+
if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) {
uint32_t thr;
--
1.7.9.5
next prev parent reply other threads:[~2016-03-09 13:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 13:15 [PATCH v3] cfg80211/nl80211: Add support for NL80211_STA_INFO_RX_DURATION Mohammed Shafi Shajakhan
2016-03-09 13:15 ` Mohammed Shafi Shajakhan [this message]
2016-04-05 10:04 ` Johannes Berg
2016-04-05 12:38 ` Mohammed Shafi Shajakhan
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=1457529357-19077-2-git-send-email-mohammed@qca.qualcomm.com \
--to=mohammed@qti.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=johannes@sipsolutions.net \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mohammed@codeaurora.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).