diff options
author | Mohammed Shafi Shajakhan <mshajakhan@atheros.com> | 2010-11-23 20:42:27 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-30 13:49:13 -0500 |
commit | ea066d5a91f2610116dcd27054f749e4f07799d8 (patch) | |
tree | 451eb5ad15da0cf8c401dded725fe0f3838beb48 /drivers/net/wireless/ath/ath9k/ar9003_phy.c | |
parent | dd318575ff0aae91ac4cbcc5b60c184e59267212 (diff) | |
download | blackbird-op-linux-ea066d5a91f2610116dcd27054f749e4f07799d8.tar.gz blackbird-op-linux-ea066d5a91f2610116dcd27054f749e4f07799d8.zip |
ath9k: Add support for Adaptive Power Management
This feature is to mitigate the problem of certain 3
stream chips that exceed the PCIe power requirements.An EEPROM flag
controls which chips have APM enabled which is basically read from
miscellaneous configuration element of the EEPROM header.
This workaround will reduce power consumption by using 2 Tx chains for
Single and Double stream rates (5 GHz only).All self generated frames
(regardless of rate) are sent on 2 chains when this feature is
enabled(Chip Limitation).
Cc: Paul Shaw <paul.shaw@atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Tested-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_phy.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 656d8ce251a7..b34a9e91edd8 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c @@ -487,7 +487,11 @@ void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx) break; } - REG_WRITE(ah, AR_SELFGEN_MASK, tx); + if ((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7)) + REG_WRITE(ah, AR_SELFGEN_MASK, 0x3); + else + REG_WRITE(ah, AR_SELFGEN_MASK, tx); + if (tx == 0x5) { REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP, AR_PHY_SWAP_ALT_CHAIN); |