aboutsummaryrefslogtreecommitdiffstats
path: root/package/iw
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-26 11:34:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-01-26 11:34:05 +0000
commit6bc59d25f9c3528bdf331a58bdafa46eff032830 (patch)
tree8972676ef2b331c9dcaa474ee17dd7eb1f800461 /package/iw
parent87374ddab802b2724c142574ef5e7897e1c2d904 (diff)
downloadupstream-6bc59d25f9c3528bdf331a58bdafa46eff032830.tar.gz
upstream-6bc59d25f9c3528bdf331a58bdafa46eff032830.tar.bz2
upstream-6bc59d25f9c3528bdf331a58bdafa46eff032830.zip
iw: Add support to print station retry counters
Patch from: kentarou matsuyama <matsuyama@thinktube.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25108 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iw')
-rw-r--r--package/iw/patches/302-sta-retries.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/iw/patches/302-sta-retries.patch b/package/iw/patches/302-sta-retries.patch
new file mode 100644
index 0000000000..6141d29233
--- /dev/null
+++ b/package/iw/patches/302-sta-retries.patch
@@ -0,0 +1,35 @@
+iw: print station retry counters
+
+From: Bruno Randolf <br1@einfach.org>
+
+Signed-off-by: Bruno Randolf <br1@einfach.org>
+---
+ station.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/station.c b/station.c
+index 8cf038d..7639553 100644
+--- a/station.c
++++ b/station.c
+@@ -48,6 +48,8 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
+ [NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
+ [NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
+ [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
++ [NL80211_STA_INFO_TX_RETRIES] = { .type = NLA_U32 },
++ [NL80211_STA_INFO_TX_FAILED] = { .type = NLA_U32 },
+ };
+
+ static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = {
+@@ -96,6 +98,12 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
+ if (sinfo[NL80211_STA_INFO_TX_PACKETS])
+ printf("\n\ttx packets:\t%u",
+ nla_get_u32(sinfo[NL80211_STA_INFO_TX_PACKETS]));
++ if (sinfo[NL80211_STA_INFO_TX_RETRIES])
++ printf("\n\ttx retries:\t%u",
++ nla_get_u32(sinfo[NL80211_STA_INFO_TX_RETRIES]));
++ if (sinfo[NL80211_STA_INFO_TX_FAILED])
++ printf("\n\ttx failed:\t%u",
++ nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED]));
+ if (sinfo[NL80211_STA_INFO_SIGNAL])
+ printf("\n\tsignal: \t%d dBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));