iwinfo: factor txpower offset into info display output, recompile if driver selection...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 1 Jan 2012 16:17:10 +0000 (16:17 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 1 Jan 2012 16:17:10 +0000 (16:17 +0000)
SVN-Revision: 29634

package/iwinfo/Makefile
package/iwinfo/src/iwinfo_cli.c

index f69b86e8f72ac353372175f14cde6b71c24723a6..55a0889604e8c404cd0c449922bfafffc325f31e 100644 (file)
@@ -7,9 +7,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=21
+PKG_RELEASE:=22
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+PKG_CONFIG_DEPENDS := \
+       CONFIG_PACKAGE_kmod-brcm-wl \
+       CONFIG_PACKAGE_kmod-brcm-wl-mini \
+       CONFIG_PACKAGE_kmod-brcm-wl-mimo \
+       CONFIG_PACKAGE_kmod-madwifi \
+       CONFIG_PACKAGE_kmod-mac80211
 
 include $(INCLUDE_DIR)/package.mk
 
index 4f8f5612c7a0ff3f98444d1950756f9871f88680..d60d7b8d9d3f1ad418b7403b29d3246b2cc2e747 100644 (file)
@@ -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);
 }