]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - interface.c
iw: correctly print signed TX power level
[thirdparty/iw.git] / interface.c
index b69748278803b4ca29dbe5b03feefa29af5ebeb4..6a44304628c2cf631ab3fa176fb41590a14b624b 100644 (file)
@@ -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);