Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3173ca0b authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville
Browse files

[PATCH] ipw2100: Make iwconfig txpower setting consistent with user input



Signed-off-by: default avatarHong Liu <hong.liu@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cbbdd03f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -5107,12 +5107,13 @@ static int ipw2100_set_tx_power(struct ipw2100_priv *priv, u32 tx_power)
		.host_command_length = 4
	};
	int err = 0;
	u32 tmp = tx_power;

	if (tx_power != IPW_TX_POWER_DEFAULT)
		tx_power = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 /
		tmp = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 /
		      (IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM);

	cmd.host_command_parameters[0] = tx_power;
	cmd.host_command_parameters[0] = tmp;

	if (priv->ieee->iw_mode == IW_MODE_ADHOC)
		err = ipw2100_hw_send_command(priv, &cmd);