aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2006-01-24 00:49:01 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-01-30 20:35:31 -0500
commit3173ca0b76879be1fb7af826ae4ce7ee733159ce (patch)
treefedfdd8e491e6a4496ee9dc78d55b3851aca1ae8 /drivers/net
parentcbbdd03fadeddd02efec05ccfd4e6870ed913762 (diff)
[PATCH] ipw2100: Make iwconfig txpower setting consistent with user input
Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ipw2100.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index b73af7789588..80bfc1cf142f 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -5107,12 +5107,13 @@ static int ipw2100_set_tx_power(struct ipw2100_priv *priv, u32 tx_power)
5107 .host_command_length = 4 5107 .host_command_length = 4
5108 }; 5108 };
5109 int err = 0; 5109 int err = 0;
5110 u32 tmp = tx_power;
5110 5111
5111 if (tx_power != IPW_TX_POWER_DEFAULT) 5112 if (tx_power != IPW_TX_POWER_DEFAULT)
5112 tx_power = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 / 5113 tmp = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 /
5113 (IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM); 5114 (IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM);
5114 5115
5115 cmd.host_command_parameters[0] = tx_power; 5116 cmd.host_command_parameters[0] = tmp;
5116 5117
5117 if (priv->ieee->iw_mode == IW_MODE_ADHOC) 5118 if (priv->ieee->iw_mode == IW_MODE_ADHOC)
5118 err = ipw2100_hw_send_command(priv, &cmd); 5119 err = ipw2100_hw_send_command(priv, &cmd);