From: Rafał Miłecki Date: Tue, 1 Sep 2015 07:55:52 +0000 (+0200) Subject: iw: display interface TX power if available X-Git-Tag: v4.7~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=619d28ab8cdc53876285824b22a6142232f8c71c;p=thirdparty%2Fiw.git iw: display interface TX power if available Signed-off-by: Rafał Miłecki [print dBm] Signed-off-by: Johannes Berg --- 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; }