summaryrefslogtreecommitdiffstats
path: root/package/iw/patches
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-26 11:34:08 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-26 11:34:08 +0000
commitc338b106e577090e2f9dfe9b19555122f9de1453 (patch)
tree42f02dc9d1c19a968d2e8c4a2743ff3b11f76f48 /package/iw/patches
parent379e89101fbb3a69f373e40ce07c43dcbe0991c8 (diff)
iw: Add signal average to station information
Patch from: kentarou matsuyama <matsuyama@thinktube.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25109 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iw/patches')
-rw-r--r--package/iw/patches/500-sta-signal-avg.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/iw/patches/500-sta-signal-avg.patch b/package/iw/patches/500-sta-signal-avg.patch
new file mode 100644
index 000000000..8758ddc72
--- /dev/null
+++ b/package/iw/patches/500-sta-signal-avg.patch
@@ -0,0 +1,36 @@
+iw: add signal average to station information
+
+From: Bruno Randolf <br1@einfach.org>
+
+
+---
+ nl80211.h | 1 +
+ station.c | 3 +++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/nl80211.h b/nl80211.h
+index 276fec0..9da840d 100644
+--- a/nl80211.h
++++ b/nl80211.h
+@@ -1179,6 +1179,7 @@ enum nl80211_sta_info {
+ NL80211_STA_INFO_TX_PACKETS,
+ NL80211_STA_INFO_TX_RETRIES,
+ NL80211_STA_INFO_TX_FAILED,
++ NL80211_STA_INFO_SIGNAL_AVG,
+
+ /* keep last */
+ __NL80211_STA_INFO_AFTER_LAST,
+diff --git a/station.c b/station.c
+index 7639553..20f4ad4 100644
+--- a/station.c
++++ b/station.c
+@@ -107,6 +107,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
+ if (sinfo[NL80211_STA_INFO_SIGNAL])
+ printf("\n\tsignal: \t%d dBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
++ if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
++ printf("\n\tsignal avg:\t%d dBm",
++ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
+
+ if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
+ if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,