aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-11-16 08:30:29 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-16 14:17:14 -0500
commit2eb2fa67e5462a36e98172fb92c78bc405b3035f (patch)
tree10ad3ee6bdbe01156a7b86a9627e89405e7eceb1
parent634a555ce3ee5ea1fdcaee8b4ac9ce7b54f301ac (diff)
ath5k: allow setting txpower to 0
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 Cc: stable@kernel.org Reported-by: Daniel Folkers <daniel.folkers@task24.nl> Tested-by: Daniel Folkers <daniel.folkers@task24.nl> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 895990751d36..721ec5ee381d 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -3025,8 +3025,6 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3025 ATH5K_ERR(ah->ah_sc, "invalid tx power: %u\n", txpower); 3025 ATH5K_ERR(ah->ah_sc, "invalid tx power: %u\n", txpower);
3026 return -EINVAL; 3026 return -EINVAL;
3027 } 3027 }
3028 if (txpower == 0)
3029 txpower = AR5K_TUNE_DEFAULT_TXPOWER;
3030 3028
3031 /* Reset TX power values */ 3029 /* Reset TX power values */
3032 memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower)); 3030 memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower));