diff mbox

iw: [PATCH] display station noise

Message ID 200910201416.10574.hs4233@mail.mn-solutions.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Holger Schurig Oct. 20, 2009, 12:16 p.m. UTC
None
diff mbox

Patch

Index: iw/link.c
===================================================================
--- iw.orig/link.c	2009-10-20 12:32:55.000000000 +0200
+++ iw/link.c	2009-10-20 12:33:26.000000000 +0200
@@ -119,6 +119,7 @@  static int print_link_sta(struct nl_msg 
 		[NL80211_STA_INFO_RX_PACKETS] = { .type = NLA_U32 },
 		[NL80211_STA_INFO_TX_PACKETS] = { .type = NLA_U32 },
 		[NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
+		[NL80211_STA_INFO_NOISE] = { .type = NLA_U8 },
 		[NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
 		[NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
@@ -157,6 +158,9 @@  static int print_link_sta(struct nl_msg 
 	if (sinfo[NL80211_STA_INFO_SIGNAL])
 		printf("\tsignal: %d dBm\n",
 			(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
+	if (sinfo[NL80211_STA_INFO_NOISE])
+		printf("\tnoise: %d dBm\n",
+			(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_NOISE]));
 
 	if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
 		if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,