[06/90] ath5k: allow setting txpower to 0

From: Greg KH
Date: Wed Dec 16 2009 - 20:50:38 EST

2.6.31-stable review patch. If anyone has any objections, please let us know.


From: Bob Copeland <me@xxxxxxxxxxxxxxx>

commit 2eb2fa67e5462a36e98172fb92c78bc405b3035f upstream.

As a holdover from earlier code when we used to set
the power limit to '0' after a reset to configure the
default transmit power, ath5k interprets txpower=0 as
12.5 dBm. Fix that by just passing 0 through.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14567

Reported-by: Daniel Folkers <daniel.folkers@xxxxxxxxx>
Tested-by: Daniel Folkers <daniel.folkers@xxxxxxxxx>
Signed-off-by: Bob Copeland <me@xxxxxxxxxxxxxxx>
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

drivers/net/wireless/ath/ath5k/phy.c | 2 --
1 file changed, 2 deletions(-)

--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -2931,8 +2931,6 @@ ath5k_hw_txpower(struct ath5k_hw *ah, st
ATH5K_ERR(ah->ah_sc, "invalid tx power: %u\n", txpower);
return -EINVAL;
- if (txpower == 0)

/* Reset TX power values */
memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower));

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/