All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute
@ 2016-04-07 14:30 Mohammed Shafi Shajakhan
  2016-05-31  9:41 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2016-04-07 14:30 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>

Add support for new netlink attribute 'NL80211_STA_INFO_RX_DURATION'.
'NL80211_STA_INFO_RX_DURATION' accounts for aggregate PPDU duration
in microseconds for all the frames from a peer. Drivers can fill
'rx_duration' field and set the flag 'NL80211_STA_INFO_RX_DURATION'.
'rx_duration' will give an idea about the total time spent by our peer
with each of its connected peers.

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute
  2016-04-07 14:30 [PATCH v4] iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute Mohammed Shafi Shajakhan
@ 2016-05-31  9:41 ` Johannes Berg
  2016-05-31 13:25   ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2016-05-31  9:41 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan; +Cc: linux-wireless

On Thu, 2016-04-07 at 20:00 +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> 
> Add support for new netlink attribute 'NL80211_STA_INFO_RX_DURATION'.
> 'NL80211_STA_INFO_RX_DURATION' accounts for aggregate PPDU duration
> in microseconds for all the frames from a peer. Drivers can fill
> 'rx_duration' field and set the flag 'NL80211_STA_INFO_RX_DURATION'.
> 'rx_duration' will give an idea about the total time spent by our
> peer
> with each of its connected peers.
> 
> This will get dumped as part of 'iw dev wlan#N station dump'
> 
Applied.

It's easier for me if you don't send nl80211.h changes in iw patches,
but I can deal with just removing those too.

johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute
  2016-05-31  9:41 ` Johannes Berg
@ 2016-05-31 13:25   ` Mohammed Shafi Shajakhan
  0 siblings, 0 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2016-05-31 13:25 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Mohammed Shafi Shajakhan, linux-wireless

On Tue, May 31, 2016 at 11:41:08AM +0200, Johannes Berg wrote:
> On Thu, 2016-04-07 at 20:00 +0530, Mohammed Shafi Shajakhan wrote:
> > From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
> > 
> > Add support for new netlink attribute 'NL80211_STA_INFO_RX_DURATION'.
> > 'NL80211_STA_INFO_RX_DURATION' accounts for aggregate PPDU duration
> > in microseconds for all the frames from a peer. Drivers can fill
> > 'rx_duration' field and set the flag 'NL80211_STA_INFO_RX_DURATION'.
> > 'rx_duration' will give an idea about the total time spent by our
> > peer
> > with each of its connected peers.
> > 
> > This will get dumped as part of 'iw dev wlan#N station dump'
> > 
> Applied.
> 
> It's easier for me if you don't send nl80211.h changes in iw patches,
> but I can deal with just removing those too.

[shafi] sure Johannes, next time i will sending nl80211.h changes

> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-31 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-07 14:30 [PATCH v4] iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute Mohammed Shafi Shajakhan
2016-05-31  9:41 ` Johannes Berg
2016-05-31 13:25   ` Mohammed Shafi Shajakhan

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.