Author: nbd
Date: 2015-12-05 10:51:53 +0100 (Sat, 05 Dec 2015)
New Revision: 47779

Added:
   trunk/package/network/utils/iw/patches/300-display_interface_TX_power.patch
Log:
iw: display interface TX power if available

Signed-off-by: Sven Eckelmann <[email protected]>

Added: 
trunk/package/network/utils/iw/patches/300-display_interface_TX_power.patch
===================================================================
--- trunk/package/network/utils/iw/patches/300-display_interface_TX_power.patch 
                        (rev 0)
+++ trunk/package/network/utils/iw/patches/300-display_interface_TX_power.patch 
2015-12-05 09:51:53 UTC (rev 47779)
@@ -0,0 +1,32 @@
+From: =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= <[email protected]>
+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 <[email protected]>
+[print dBm]
+Signed-off-by: Johannes Berg <[email protected]>
+---
+ 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;
+ }
+ 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to