aboutsummaryrefslogtreecommitdiffstats
path: root/package/iwinfo/src
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-01-01 16:17:10 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-01-01 16:17:10 +0000
commit0baa69dddabc768ec7053d0d920cf1e5adb8d22e (patch)
tree716e28f4e68780167f76b2d4ebb19abc8f9b8f6c /package/iwinfo/src
parentd22adb1b064eef2ee878f357e99589e30437ff31 (diff)
downloadupstream-0baa69dddabc768ec7053d0d920cf1e5adb8d22e.tar.gz
upstream-0baa69dddabc768ec7053d0d920cf1e5adb8d22e.tar.bz2
upstream-0baa69dddabc768ec7053d0d920cf1e5adb8d22e.zip
iwinfo: factor txpower offset into info display output, recompile if driver selection changes
SVN-Revision: 29634
Diffstat (limited to 'package/iwinfo/src')
-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);
}