From: Johannes Berg Date: Wed, 4 Mar 2020 14:54:22 +0000 (+0100) Subject: iw: correctly print signed TX power level X-Git-Tag: v5.8~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71340cdc47d623cfcfa1bbaabe97fa00623500bd;p=thirdparty%2Fiw.git iw: correctly print signed TX power level This should be signed (per nl80211.h), but we put it into a uint32_t, fix that. Change-Id: I1ca8d3d74e2927c7fb38d5981b0628ea6da94298 Signed-off-by: Johannes Berg --- diff --git a/interface.c b/interface.c index b697482..6a44304 100644 --- a/interface.c +++ b/interface.c @@ -435,7 +435,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg) } if (tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]) { - uint32_t txp = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_TX_POWER_LEVEL]); + int32_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);