aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-14 11:40:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-03-15 13:45:08 -0400
commitc7effd35932b948c2a18159e96a07e1686703e62 (patch)
treef98419dd168bd64cd43f9756c06386db2f2505f9 /drivers/net/wireless
parentaa0e5786b6e0cf2adaa26d72770cb5a0ad263026 (diff)
ath9k: inline AR9271 1.0 INI overrides
Makes them more readable and reduces code size Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar5008_phy.c7
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9002_hw.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9002_initvals.h6
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9002_phy.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
5 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 3e108c8b1d3..d7d8e919914 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -834,9 +834,10 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
834 AR_SREV_9287_11_OR_LATER(ah)) 834 AR_SREV_9287_11_OR_LATER(ah))
835 REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites); 835 REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
836 836
837 if (AR_SREV_9271_10(ah)) 837 if (AR_SREV_9271_10(ah)) {
838 REG_WRITE_ARRAY(&ah->iniModes_9271_1_0_only, 838 REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ENA);
839 modesIndex, regWrites); 839 REG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_ADC_ON, 0xa);
840 }
840 841
841 ENABLE_REGWRITE_BUFFER(ah); 842 ENABLE_REGWRITE_BUFFER(ah);
842 843
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
index 99d2dd979d1..d9a69fc470c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
@@ -34,9 +34,6 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
34 ARRAY_SIZE(ar9271Modes_9271), 5); 34 ARRAY_SIZE(ar9271Modes_9271), 5);
35 INIT_INI_ARRAY(&ah->iniCommon, ar9271Common_9271, 35 INIT_INI_ARRAY(&ah->iniCommon, ar9271Common_9271,
36 ARRAY_SIZE(ar9271Common_9271), 2); 36 ARRAY_SIZE(ar9271Common_9271), 2);
37 INIT_INI_ARRAY(&ah->iniModes_9271_1_0_only,
38 ar9271Modes_9271_1_0_only,
39 ARRAY_SIZE(ar9271Modes_9271_1_0_only), 5);
40 INIT_INI_ARRAY(&ah->iniModes_9271_ANI_reg, ar9271Modes_9271_ANI_reg, 37 INIT_INI_ARRAY(&ah->iniModes_9271_ANI_reg, ar9271Modes_9271_ANI_reg,
41 ARRAY_SIZE(ar9271Modes_9271_ANI_reg), 5); 38 ARRAY_SIZE(ar9271Modes_9271_ANI_reg), 5);
42 return; 39 return;
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_initvals.h b/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
index d571c329ee5..4d18c66a679 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
@@ -3092,12 +3092,6 @@ static const u32 ar9271Common_9271[][2] = {
3092 {0x0000d384, 0xf3307ff0}, 3092 {0x0000d384, 0xf3307ff0},
3093}; 3093};
3094 3094
3095static const u32 ar9271Modes_9271_1_0_only[][5] = {
3096 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
3097 {0x00009910, 0x30002311, 0x30002311, 0x30002311, 0x30002311},
3098 {0x00009828, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001},
3099};
3100
3101static const u32 ar9271Modes_9271_ANI_reg[][5] = { 3095static const u32 ar9271Modes_9271_ANI_reg[][5] = {
3102 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 3096 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
3103 {0x00009850, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2}, 3097 {0x00009850, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2},
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.h b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
index 453af6dc514..f9eb2c35716 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
@@ -60,6 +60,8 @@
60#define AR_PHY_RF_CTL3 0x9828 60#define AR_PHY_RF_CTL3 0x9828
61#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000 61#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000
62#define AR_PHY_TX_END_TO_A2_RX_ON_S 16 62#define AR_PHY_TX_END_TO_A2_RX_ON_S 16
63#define AR_PHY_TX_END_TO_ADC_ON 0xFF000000
64#define AR_PHY_TX_END_TO_ADC_ON_S 24
63 65
64#define AR_PHY_ADC_CTL 0x982C 66#define AR_PHY_ADC_CTL 0x982C
65#define AR_PHY_ADC_CTL_OFF_INBUFGAIN 0x00000003 67#define AR_PHY_ADC_CTL_OFF_INBUFGAIN 0x00000003
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index ca673a8757d..aa1680a0c7f 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -831,7 +831,6 @@ struct ath_hw {
831 struct ar5416IniArray iniAdditional; 831 struct ar5416IniArray iniAdditional;
832 struct ar5416IniArray iniModesRxGain; 832 struct ar5416IniArray iniModesRxGain;
833 struct ar5416IniArray iniModesTxGain; 833 struct ar5416IniArray iniModesTxGain;
834 struct ar5416IniArray iniModes_9271_1_0_only;
835 struct ar5416IniArray iniCckfirNormal; 834 struct ar5416IniArray iniCckfirNormal;
836 struct ar5416IniArray iniCckfirJapan2484; 835 struct ar5416IniArray iniCckfirJapan2484;
837 struct ar5416IniArray ini_japan2484; 836 struct ar5416IniArray ini_japan2484;