aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2100.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2007-07-12 04:09:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-07-17 21:56:17 -0400
commit9f3b2416fec56de34408eafbef19bf8ec9a81493 (patch)
treeab529ecf65ea78fd4711975f074f634e94b88bf5 /drivers/net/wireless/ipw2100.c
parent90869b249b4621d60920d5d1d53403fe86d8ecb5 (diff)
[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/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2100.c6
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,
7868 goto done; 7868 goto done;
7869 } 7869 }
7870 7870
7871 if ((mode < 1) || (mode > POWER_MODES)) 7871 if ((mode < 0) || (mode > POWER_MODES))
7872 mode = IPW_POWER_AUTO; 7872 mode = IPW_POWER_AUTO;
7873 7873
7874 if (priv->power_mode != mode) 7874 if (IPW_POWER_LEVEL(priv->power_mode) != mode)
7875 err = ipw2100_set_power_mode(priv, mode); 7875 err = ipw2100_set_power_mode(priv, mode);
7876 done: 7876 done:
7877 mutex_unlock(&priv->action_mutex); 7877 mutex_unlock(&priv->action_mutex);
@@ -7902,7 +7902,7 @@ static int ipw2100_wx_get_powermode(struct net_device *dev,
7902 break; 7902 break;
7903 case IPW_POWER_AUTO: 7903 case IPW_POWER_AUTO:
7904 snprintf(extra, MAX_POWER_STRING, 7904 snprintf(extra, MAX_POWER_STRING,
7905 "Power save level: %d (Auto)", 0); 7905 "Power save level: %d (Auto)", level);
7906 break; 7906 break;
7907 default: 7907 default:
7908 timeout = timeout_duration[level - 1] / 1000; 7908 timeout = timeout_duration[level - 1] / 1000;