aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iw/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-12-05 09:51:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-12-05 09:51:53 +0000
commit9dd65e54935ba2b458b78aa263b627e9805d346c (patch)
treea4a9d518fb226c901eb4cdc0fbe50b2a09e6b465 /package/network/utils/iw/patches
parentc9cb3f4d1cd63b924d95733f30c7c7d1759c987b (diff)
downloadupstream-9dd65e54935ba2b458b78aa263b627e9805d346c.tar.gz
upstream-9dd65e54935ba2b458b78aa263b627e9805d346c.tar.bz2
upstream-9dd65e54935ba2b458b78aa263b627e9805d346c.zip
iw: display interface TX power if available
Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 47779
Diffstat (limited to 'package/network/utils/iw/patches')
-rw-r--r--package/network/utils/iw/patches/300-display_interface_TX_power.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/network/utils/iw/patches/300-display_interface_TX_power.patch b/package/network/utils/iw/patches/300-display_interface_TX_power.patch
new file mode 100644
index 0000000000..574c490318
--- /dev/null
+++ b/package/network/utils/iw/patches/300-display_interface_TX_power.patch
@@ -0,0 +1,32 @@
+From: =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= <zajec5@gmail.com>
+Date: Tue, 1 Sep 2015 09:55:52 +0200
+Subject: iw: display interface TX power if available
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+[print dBm]
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+---
+ interface.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/interface.c b/interface.c
+index 73ccecd..4f0821d 100644
+--- a/interface.c
++++ b/interface.c
+@@ -368,6 +368,13 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
+ printf("\n");
+ }
+
++ if (tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]) {
++ uint32_t txp = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]);
++
++ printf("%s\ttxpower %d.%.2d dBm\n",
++ indent, txp / 100, txp % 100);
++ }
++
+ return NL_SKIP;
+ }
+