From: Jo-Philipp Wich Date: Sun, 1 Jan 2012 16:17:10 +0000 (+0000) Subject: iwinfo: factor txpower offset into info display output, recompile if driver selection... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0baa69dddabc768ec7053d0d920cf1e5adb8d22e;p=openwrt%2Fstaging%2Fjow.git iwinfo: factor txpower offset into info display output, recompile if driver selection changes SVN-Revision: 29634 --- diff --git a/package/iwinfo/Makefile b/package/iwinfo/Makefile index f69b86e8f7..55a0889604 100644 --- a/package/iwinfo/Makefile +++ b/package/iwinfo/Makefile @@ -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 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); }