summaryrefslogtreecommitdiff
path: root/openwrt/target
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-11-19 01:07:50 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-11-19 01:07:50 +0000
commit081f1be6f3d887479e209a0c79ed7ebc00ffa3d3 (patch)
tree7cbba894ed67880d3ce5e7b0a9d74da68da95532 /openwrt/target
parentae0b813b36aeed09cb495b96050ef6083b30736c (diff)
make wlcompat display 19 dBm max. when regulatory override is disabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2530 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/target')
-rw-r--r--openwrt/target/linux/package/wlcompat/wlcompat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openwrt/target/linux/package/wlcompat/wlcompat.c b/openwrt/target/linux/package/wlcompat/wlcompat.c
index d86a9bda99..7063c809a6 100644
--- a/openwrt/target/linux/package/wlcompat/wlcompat.c
+++ b/openwrt/target/linux/package/wlcompat/wlcompat.c
@@ -494,14 +494,17 @@ static int wlcompat_ioctl(struct net_device *dev,
}
case SIOCGIWTXPOW:
{
- int radio;
+ int radio, override;
wl_ioctl(dev, WLC_GET_RADIO, &radio, sizeof(int));
if (wl_get_val(dev, "qtxpower", &(wrqu->txpower.value), sizeof(int)) < 0)
return -EINVAL;
+ override = (wrqu->txpower.value & WL_TXPWR_OVERRIDE) == WL_TXPWR_OVERRIDE;
wrqu->txpower.value &= ~WL_TXPWR_OVERRIDE;
+ if (!override && (wrqu->txpower.value > 76))
+ wrqu->txpower.value = 76;
wrqu->txpower.value /= 4;
wrqu->txpower.fixed = 0;