iwinfo: factor txpower offset into info display output, recompile if driver selection changes
SVN-Revision: 29634
This commit is contained in:
parent
d22adb1b06
commit
0baa69ddda
2 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue