diff options
author | Zhu Yi <yi.zhu@intel.com> | 2007-07-12 10:09:24 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-07-18 03:56:17 +0200 |
commit | 9f3b2416fec56de34408eafbef19bf8ec9a81493 (patch) | |
tree | ab529ecf65ea78fd4711975f074f634e94b88bf5 /drivers/net/wireless | |
parent | [PATCH] softmac: Channel is listed twice in scan output (diff) | |
download | linux-9f3b2416fec56de34408eafbef19bf8ec9a81493.tar.xz linux-9f3b2416fec56de34408eafbef19bf8ec9a81493.zip |
[PATCH] ipw2100: Fix `iwpriv set_power` error
iwpriv <iface> set_power [0~6] can be used for ipw2100. '0' indicates
off and '6' indicates auto. 1~5 are the actual power levels.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 072ede71e575..8990585bd228 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -7868,10 +7868,10 @@ static int ipw2100_wx_set_powermode(struct net_device *dev, goto done; } - if ((mode < 1) || (mode > POWER_MODES)) + if ((mode < 0) || (mode > POWER_MODES)) mode = IPW_POWER_AUTO; - if (priv->power_mode != mode) + if (IPW_POWER_LEVEL(priv->power_mode) != mode) err = ipw2100_set_power_mode(priv, mode); done: mutex_unlock(&priv->action_mutex); @@ -7902,7 +7902,7 @@ static int ipw2100_wx_get_powermode(struct net_device *dev, break; case IPW_POWER_AUTO: snprintf(extra, MAX_POWER_STRING, - "Power save level: %d (Auto)", 0); + "Power save level: %d (Auto)", level); break; default: timeout = timeout_duration[level - 1] / 1000; |