Skip to content

Commit

Permalink
ath5k: allow setting txpower to 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Copeland authored and John W. Linville committed Nov 16, 2009
1 parent 634a555 commit 2eb2fa6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/ath/ath5k/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3025,8 +3025,6 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
ATH5K_ERR(ah->ah_sc, "invalid tx power: %u\n", txpower);
return -EINVAL;
}
if (txpower == 0)
txpower = AR5K_TUNE_DEFAULT_TXPOWER;

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

0 comments on commit 2eb2fa6

Please sign in to comment.