Skip to content

Commit

Permalink
rndis_wlan: add missing range check for power_output modparam
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed May 28, 2008
1 parent 135a548 commit a762483
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a762483

Please sign in to comment.