diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-01-01 16:17:10 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-01-01 16:17:10 +0000 |
commit | 9eb767be13517da3b977d100d9cccba2e59cd695 (patch) | |
tree | 221fc4a8bc361611ee3dc068c07bfc210a6f216f /package/iwinfo/src/iwinfo_cli.c | |
parent | a13cb527c95ed1a4a84644faf4ac18e56b53b8dd (diff) | |
download | master-187ad058-9eb767be13517da3b977d100d9cccba2e59cd695.tar.gz master-187ad058-9eb767be13517da3b977d100d9cccba2e59cd695.tar.bz2 master-187ad058-9eb767be13517da3b977d100d9cccba2e59cd695.zip |
[package] iwinfo: factor txpower offset into info display output, recompile if driver selection changes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29634 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iwinfo/src/iwinfo_cli.c')
-rw-r--r-- | package/iwinfo/src/iwinfo_cli.c | 7 |
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); } |