iw: update to version 4.7
[lede.git] / package / network / utils / iw / patches / 300-display_interface_TX_power.patch
1 From: =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= <zajec5@gmail.com>
2 Date: Tue, 1 Sep 2015 09:55:52 +0200
3 Subject: iw: display interface TX power if available
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset="utf-8"
6 Content-Transfer-Encoding: 8bit
7
8 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
9 [print dBm]
10 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 ---
12  interface.c | 7 +++++++
13  1 file changed, 7 insertions(+)
14
15 --- a/interface.c
16 +++ b/interface.c
17 @@ -374,6 +374,13 @@ static int print_iface_handler(struct nl
18                        indent, txp / 100, txp % 100);
19         }
20  
21 +       if (tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]) {
22 +               uint32_t txp = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]);
23 +
24 +               printf("%s\ttxpower %d.%.2d dBm\n",
25 +                      indent, txp / 100, txp % 100);
26 +       }
27 +
28         return NL_SKIP;
29  }
30