diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 |
3 files changed, 13 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index f80ec7497d0f..d7deae85d980 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -4762,6 +4762,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, | |||
4762 | struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); | 4762 | struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); |
4763 | struct ath_common *common = ath9k_hw_common(ah); | 4763 | struct ath_common *common = ath9k_hw_common(ah); |
4764 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; | 4764 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; |
4765 | struct ar9300_modal_eep_header *modal_hdr; | ||
4765 | u8 targetPowerValT2[ar9300RateSize]; | 4766 | u8 targetPowerValT2[ar9300RateSize]; |
4766 | u8 target_power_val_t2_eep[ar9300RateSize]; | 4767 | u8 target_power_val_t2_eep[ar9300RateSize]; |
4767 | unsigned int i = 0, paprd_scale_factor = 0; | 4768 | unsigned int i = 0, paprd_scale_factor = 0; |
@@ -4771,15 +4772,17 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, | |||
4771 | 4772 | ||
4772 | if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) { | 4773 | if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) { |
4773 | if (IS_CHAN_2GHZ(chan)) | 4774 | if (IS_CHAN_2GHZ(chan)) |
4774 | ah->paprd_ratemask = (IS_CHAN_HT40(chan) ? | 4775 | modal_hdr = &eep->modalHeader2G; |
4775 | le32_to_cpu(eep->modalHeader2G.papdRateMaskHt40) : | ||
4776 | le32_to_cpu(eep->modalHeader2G.papdRateMaskHt20)) | ||
4777 | & AR9300_PAPRD_RATE_MASK; | ||
4778 | else | 4776 | else |
4779 | ah->paprd_ratemask = (IS_CHAN_HT40(chan) ? | 4777 | modal_hdr = &eep->modalHeader5G; |
4780 | le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40) : | 4778 | |
4781 | le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20)) | 4779 | ah->paprd_ratemask = |
4782 | & AR9300_PAPRD_RATE_MASK; | 4780 | le32_to_cpu(modal_hdr->papdRateMaskHt20) & |
4781 | AR9300_PAPRD_RATE_MASK; | ||
4782 | |||
4783 | ah->paprd_ratemask_ht40 = | ||
4784 | le32_to_cpu(modal_hdr->papdRateMaskHt40) & | ||
4785 | AR9300_PAPRD_RATE_MASK; | ||
4783 | 4786 | ||
4784 | paprd_scale_factor = ar9003_get_paprd_scale_factor(ah, chan); | 4787 | paprd_scale_factor = ar9003_get_paprd_scale_factor(ah, chan); |
4785 | min_pwridx = IS_CHAN_HT40(chan) ? ALL_TARGET_HT40_0_8_16 : | 4788 | min_pwridx = IS_CHAN_HT40(chan) ? ALL_TARGET_HT40_0_8_16 : |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c index 79554c524b68..356d2fd78822 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c | |||
@@ -134,7 +134,7 @@ static int ar9003_paprd_setup_single_table(struct ath_hw *ah) | |||
134 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK, | 134 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK, |
135 | ah->paprd_ratemask); | 135 | ah->paprd_ratemask); |
136 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_HT40, AR_PHY_PAPRD_HT40_MASK, | 136 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_HT40, AR_PHY_PAPRD_HT40_MASK, |
137 | AR_PHY_PAPRD_HT40_MASK); | 137 | ah->paprd_ratemask_ht40); |
138 | 138 | ||
139 | for (i = 0; i < ah->caps.max_txchains; i++) { | 139 | for (i = 0; i < ah->caps.max_txchains; i++) { |
140 | REG_RMW_FIELD(ah, ctrl0[i], | 140 | REG_RMW_FIELD(ah, ctrl0[i], |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index b98053f0640a..b8ffaa5dc650 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -835,6 +835,7 @@ struct ath_hw { | |||
835 | unsigned int paprd_target_power; | 835 | unsigned int paprd_target_power; |
836 | unsigned int paprd_training_power; | 836 | unsigned int paprd_training_power; |
837 | unsigned int paprd_ratemask; | 837 | unsigned int paprd_ratemask; |
838 | unsigned int paprd_ratemask_ht40; | ||
838 | bool paprd_table_write_done; | 839 | bool paprd_table_write_done; |
839 | u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES]; | 840 | u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES]; |
840 | u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES]; | 841 | u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES]; |