diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-11-19 01:07:50 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-11-19 01:07:50 +0000 |
commit | 6c56c9da834ec02df626b49c3d11c5d7dfa4b015 (patch) | |
tree | 58495d69126182b137efe8ebfd749c6fd8216430 /target/linux/package | |
parent | f3afb99cb947c34d88c45c4b7f7fb2f00d43b9c1 (diff) | |
download | master-187ad058-6c56c9da834ec02df626b49c3d11c5d7dfa4b015.tar.gz master-187ad058-6c56c9da834ec02df626b49c3d11c5d7dfa4b015.tar.bz2 master-187ad058-6c56c9da834ec02df626b49c3d11c5d7dfa4b015.zip |
make wlcompat display 19 dBm max. when regulatory override is disabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2530 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/package')
-rw-r--r-- | target/linux/package/wlcompat/wlcompat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/package/wlcompat/wlcompat.c b/target/linux/package/wlcompat/wlcompat.c index d86a9bda99..7063c809a6 100644 --- a/target/linux/package/wlcompat/wlcompat.c +++ b/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; |