diff mbox

[v4] iw: ack signal support for tx ack packets

Message ID 1527246406-25475-1-git-send-email-bpothuno@codeaurora.org (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show

Commit Message

Balaji Pothunoori May 25, 2018, 11:06 a.m. UTC
This patch is to display the average ack signal,
last ack signal of tx ack packets.

Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
---
V4:
 * Changed the subject
 * Added last ack signal support and renamed avg ack signal macro
V3:
 * Added version no
V2:
 * Removed nl80211.h changes and modified the commit log

 station.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Johannes Berg June 29, 2018, 9:48 a.m. UTC | #1
On Fri, 2018-05-25 at 16:36 +0530, Balaji Pothunoori wrote:
> This patch is to display the average ack signal,
> last ack signal of tx ack packets.

Please resend this with the required kernel changes.

johannes
Balaji Pothunoori June 29, 2018, 10:20 a.m. UTC | #2
On 2018-06-29 15:18, Johannes Berg wrote:
> On Fri, 2018-05-25 at 16:36 +0530, Balaji Pothunoori wrote:
>> This patch is to display the average ack signal,
>> last ack signal of tx ack packets.
> 
> Please resend this with the required kernel changes.
> 
> johannes

Sure Johannes.

Regards,
Balaji.
diff mbox

Patch

diff --git a/station.c b/station.c
index 38c5f91..fd38043 100644
--- a/station.c
+++ b/station.c
@@ -308,6 +308,8 @@  static int print_sta_handler(struct nl_msg *msg, void *arg)
 		[NL80211_STA_INFO_TID_STATS] = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_BSS_PARAM] = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_RX_DURATION] = { .type = NLA_U64 },
+		[NL80211_STA_INFO_ACK_SIGNAL] = {.type = NLA_U8 },
+		[NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
 	};
 	char *chain;
 
@@ -409,6 +411,14 @@  static int print_sta_handler(struct nl_msg *msg, void *arg)
 		printf("\n\trx duration:\t%lld us",
 		       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_RX_DURATION]));
 
+	if (sinfo[NL80211_STA_INFO_ACK_SIGNAL])
+		printf("\n\tlast ack signal:%d dBm",
+			(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL]));
+
+	if (sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG])
+		printf("\n\tavg ack signal:\t%d dBm",
+			(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG]));
+
 	if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) {
 		uint32_t thr;