summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-12-18 02:00:10 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-12-18 02:00:10 +0000
commit4cc2bb43c85f28f4dec00197bd75ff7cca978610 (patch)
tree3fa369953145fcccc4f54b64c700a43e630096a2 /package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch
parent934c0029fd9a2c715e0dba997b0699ca89df8186 (diff)
mac80211: update to wireless-testing 2010-12-16
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24655 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch')
-rw-r--r--package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch b/package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch
new file mode 100644
index 0000000000..cea8f2e378
--- /dev/null
+++ b/package/mac80211/patches/520-ath9k_paprd_ht40_fix.patch
@@ -0,0 +1,57 @@
+--- 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_regulatory *regulatory = ath9k_hw_regulatory(ah);
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
++ struct ar9300_modal_eep_header *modal_hdr;
+ u8 targetPowerValT2[ar9300RateSize];
+ u8 target_power_val_t2_eep[ar9300RateSize];
+ unsigned int i = 0, paprd_scale_factor = 0;
+@@ -4771,15 +4772,17 @@ static void ath9k_hw_ar9300_set_txpower(
+
+ if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) {
+ if (IS_CHAN_2GHZ(chan))
+- ah->paprd_ratemask = (IS_CHAN_HT40(chan) ?
+- le32_to_cpu(eep->modalHeader2G.papdRateMaskHt40) :
+- le32_to_cpu(eep->modalHeader2G.papdRateMaskHt20))
+- & AR9300_PAPRD_RATE_MASK;
++ modal_hdr = &eep->modalHeader2G;
+ else
+- ah->paprd_ratemask = (IS_CHAN_HT40(chan) ?
+- le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40) :
+- le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20))
+- & AR9300_PAPRD_RATE_MASK;
++ modal_hdr = &eep->modalHeader5G;
++
++ ah->paprd_ratemask =
++ le32_to_cpu(modal_hdr->papdRateMaskHt20) &
++ AR9300_PAPRD_RATE_MASK;
++
++ ah->paprd_ratemask_ht40 =
++ le32_to_cpu(modal_hdr->papdRateMaskHt40) &
++ AR9300_PAPRD_RATE_MASK;
+
+ paprd_scale_factor = ar9003_get_paprd_scale_factor(ah, chan);
+ min_pwridx = IS_CHAN_HT40(chan) ? ALL_TARGET_HT40_0_8_16 :
+--- 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_tab
+ REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK,
+ ah->paprd_ratemask);
+ REG_RMW_FIELD(ah, AR_PHY_PAPRD_HT40, AR_PHY_PAPRD_HT40_MASK,
+- AR_PHY_PAPRD_HT40_MASK);
++ ah->paprd_ratemask_ht40);
+
+ for (i = 0; i < ah->caps.max_txchains; i++) {
+ REG_RMW_FIELD(ah, ctrl0[i],
+--- a/drivers/net/wireless/ath/ath9k/hw.h
++++ b/drivers/net/wireless/ath/ath9k/hw.h
+@@ -837,6 +837,7 @@ struct ath_hw {
+ unsigned int paprd_target_power;
+ unsigned int paprd_training_power;
+ unsigned int paprd_ratemask;
++ unsigned int paprd_ratemask_ht40;
+ bool paprd_table_write_done;
+ u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES];
+ u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES];