rndis_wlan: add missing range check for power_output modparam
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Tue, 27 May 2008 08:15:08 +0000 (11:15 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 28 May 2008 20:43:48 +0000 (16:43 -0400)
Range check for power_output were missing.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rndis_wlan.c

index ac56f8d9a5e56026eb1097c3c638a93b5d5b2279..18c9931e3267182c2872b2fda928d1383e8db5ab 100644 (file)
@@ -2470,6 +2470,11 @@ static int bcm4320_early_init(struct usbnet *dev)
        else if (priv->param_power_save > 2)
                priv->param_power_save = 2;
 
+       if (priv->param_power_output < 0)
+               priv->param_power_output = 0;
+       else if (priv->param_power_output > 3)
+               priv->param_power_output = 3;
+
        if (priv->param_roamtrigger < -80)
                priv->param_roamtrigger = -80;
        else if (priv->param_roamtrigger > -60)