add script for autogenerating /etc/config/network based on nvram, remove default...
[openwrt.git] / openwrt / target / linux / package / wlcompat / wlcompat.c
index d86a9bd..7063c80 100644 (file)
@@ -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;
This page took 0.028059 seconds and 4 git commands to generate.