summaryrefslogtreecommitdiff
path: root/package/iwinfo/src/iwinfo_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/iwinfo/src/iwinfo_cli.c')
-rw-r--r--package/iwinfo/src/iwinfo_cli.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/iwinfo/src/iwinfo_cli.c b/package/iwinfo/src/iwinfo_cli.c
index 4f8f5612c7..d60d7b8d9d 100644
--- a/package/iwinfo/src/iwinfo_cli.c
+++ b/package/iwinfo/src/iwinfo_cli.c
@@ -391,9 +391,14 @@ static char * print_frequency(const struct iwinfo_ops *iw, const char *ifname)
static char * print_txpower(const struct iwinfo_ops *iw, const char *ifname)
{
- int pwr;
+ int pwr, off;
+ if (iw->txpower_offset(ifname, &off))
+ off = 0;
+
if (iw->txpower(ifname, &pwr))
pwr = -1;
+ else
+ pwr += off;
return format_txpower(pwr);
}