Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13552
b: refs/heads/master
c: f75459e
h: refs/heads/master
v: v3
  • Loading branch information
Liu Hong authored and James Ketrenos committed Nov 7, 2005
1 parent 3b68f19 commit dea8885
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25b645be1e25e16ea7a25678ac195a0e7595c629
refs/heads/master: f75459e6f64ca0632f23029e2ca47b424dd33373
13 changes: 6 additions & 7 deletions trunk/drivers/net/wireless/ipw2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -5102,6 +5102,10 @@ static int ipw2100_set_tx_power(struct ipw2100_priv *priv, u32 tx_power)
};
int err = 0;

if (tx_power != IPW_TX_POWER_DEFAULT)
tx_power = (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;

if (priv->ieee->iw_mode == IW_MODE_ADHOC)
Expand Down Expand Up @@ -7523,8 +7527,7 @@ static int ipw2100_wx_set_txpow(struct net_device *dev,
wrqu->txpower.value > IPW_TX_POWER_MAX_DBM)
return -EINVAL;

value = (wrqu->txpower.value - IPW_TX_POWER_MIN_DBM) * 16 /
(IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM);
value = wrqu->txpower.value;
}

down(&priv->action_sem);
Expand Down Expand Up @@ -7564,11 +7567,7 @@ static int ipw2100_wx_get_txpow(struct net_device *dev,
} else {
wrqu->power.disabled = 0;
wrqu->power.fixed = 1;
wrqu->power.value =
(priv->tx_power *
(IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM)) /
(IPW_TX_POWER_MAX - IPW_TX_POWER_MIN) +
IPW_TX_POWER_MIN_DBM;
wrqu->power.value = priv->tx_power;
}

wrqu->power.flags = IW_TXPOW_DBM;
Expand Down

0 comments on commit dea8885

Please sign in to comment.