]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath5k: allow setting txpower to 0
authorBob Copeland <me@bobcopeland.com>
Mon, 16 Nov 2009 13:30:29 +0000 (08:30 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:43:18 +0000 (13:43 -0800)
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@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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath5k/phy.c

index 0981fb406cb09a044c87d1e94cb16e2a5111a5da..5c0e31b197a06a9be218bc55ae8a38b36f3f5323 100644 (file)
@@ -2931,8 +2931,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));