aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/initvals.h23
-rw-r--r--drivers/net/wireless/ath/ath9k/phy.c25
4 files changed, 48 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index b120c2127e9a..1e0f5bd702c6 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -943,6 +943,16 @@ int ath9k_hw_init(struct ath_hw *ah)
943 else 943 else
944 ath9k_hw_disablepcie(ah); 944 ath9k_hw_disablepcie(ah);
945 945
946 /* Support for Japan ch.14 (2484) spread */
947 if (AR_SREV_9287_11_OR_LATER(ah)) {
948 INIT_INI_ARRAY(&ah->iniCckfirNormal,
949 ar9287Common_normal_cck_fir_coeff_92871_1,
950 ARRAY_SIZE(ar9287Common_normal_cck_fir_coeff_92871_1), 2);
951 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
952 ar9287Common_japan_2484_cck_fir_coeff_92871_1,
953 ARRAY_SIZE(ar9287Common_japan_2484_cck_fir_coeff_92871_1), 2);
954 }
955
946 r = ath9k_hw_post_init(ah); 956 r = ath9k_hw_post_init(ah);
947 if (r) 957 if (r)
948 return r; 958 return r;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index d854c17b8688..6673a8103364 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -592,6 +592,8 @@ struct ath_hw {
592 struct ar5416IniArray iniModesAdditional; 592 struct ar5416IniArray iniModesAdditional;
593 struct ar5416IniArray iniModesRxGain; 593 struct ar5416IniArray iniModesRxGain;
594 struct ar5416IniArray iniModesTxGain; 594 struct ar5416IniArray iniModesTxGain;
595 struct ar5416IniArray iniCckfirNormal;
596 struct ar5416IniArray iniCckfirJapan2484;
595 597
596 u32 intr_gen_timer_trigger; 598 u32 intr_gen_timer_trigger;
597 u32 intr_gen_timer_thresh; 599 u32 intr_gen_timer_thresh;
diff --git a/drivers/net/wireless/ath/ath9k/initvals.h b/drivers/net/wireless/ath/ath9k/initvals.h
index 8622265a030a..d8aaeeef6d56 100644
--- a/drivers/net/wireless/ath/ath9k/initvals.h
+++ b/drivers/net/wireless/ath/ath9k/initvals.h
@@ -5918,9 +5918,6 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
5918 { 0x000099ec, 0x0cc80caa }, 5918 { 0x000099ec, 0x0cc80caa },
5919 { 0x000099f0, 0x00000000 }, 5919 { 0x000099f0, 0x00000000 },
5920 { 0x000099fc, 0x00001042 }, 5920 { 0x000099fc, 0x00001042 },
5921 { 0x0000a1f4, 0x00fffeff },
5922 { 0x0000a1f8, 0x00f5f9ff },
5923 { 0x0000a1fc, 0xb79f6427 },
5924 { 0x0000a208, 0x803e4788 }, 5921 { 0x0000a208, 0x803e4788 },
5925 { 0x0000a210, 0x4080a333 }, 5922 { 0x0000a210, 0x4080a333 },
5926 { 0x0000a214, 0x40206c10 }, 5923 { 0x0000a214, 0x40206c10 },
@@ -5980,7 +5977,7 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
5980 { 0x0000b3f4, 0x00000000 }, 5977 { 0x0000b3f4, 0x00000000 },
5981 { 0x0000a7d8, 0x000003f1 }, 5978 { 0x0000a7d8, 0x000003f1 },
5982 { 0x00007800, 0x00000800 }, 5979 { 0x00007800, 0x00000800 },
5983 { 0x00007804, 0x6c35ffc2 }, 5980 { 0x00007804, 0x6c35ffd2 },
5984 { 0x00007808, 0x6db6c000 }, 5981 { 0x00007808, 0x6db6c000 },
5985 { 0x0000780c, 0x6db6cb30 }, 5982 { 0x0000780c, 0x6db6cb30 },
5986 { 0x00007810, 0x6db6cb6c }, 5983 { 0x00007810, 0x6db6cb6c },
@@ -6000,7 +5997,7 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
6000 { 0x00007848, 0x934934a8 }, 5997 { 0x00007848, 0x934934a8 },
6001 { 0x00007850, 0x00000000 }, 5998 { 0x00007850, 0x00000000 },
6002 { 0x00007854, 0x00000800 }, 5999 { 0x00007854, 0x00000800 },
6003 { 0x00007858, 0x6c35ffc2 }, 6000 { 0x00007858, 0x6c35ffd2 },
6004 { 0x0000785c, 0x6db6c000 }, 6001 { 0x0000785c, 0x6db6c000 },
6005 { 0x00007860, 0x6db6cb30 }, 6002 { 0x00007860, 0x6db6cb30 },
6006 { 0x00007864, 0x6db6cb6c }, 6003 { 0x00007864, 0x6db6cb6c },
@@ -6027,6 +6024,22 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
6027 { 0x000078b8, 0x2a850160 }, 6024 { 0x000078b8, 0x2a850160 },
6028}; 6025};
6029 6026
6027/*
6028 * For Japanese regulatory requirements, 2484 MHz requires the following three
6029 * registers be programmed differently from the channel between 2412 and 2472 MHz.
6030 */
6031static const u_int32_t ar9287Common_normal_cck_fir_coeff_92871_1[][2] = {
6032 { 0x0000a1f4, 0x00fffeff },
6033 { 0x0000a1f8, 0x00f5f9ff },
6034 { 0x0000a1fc, 0xb79f6427 },
6035};
6036
6037static const u_int32_t ar9287Common_japan_2484_cck_fir_coeff_92871_1[][2] = {
6038 { 0x0000a1f4, 0x00000000 },
6039 { 0x0000a1f8, 0xefff0301 },
6040 { 0x0000a1fc, 0xca9228ee },
6041};
6042
6030static const u_int32_t ar9287Modes_tx_gain_9287_1_1[][6] = { 6043static const u_int32_t ar9287Modes_tx_gain_9287_1_1[][6] = {
6031 /* Address 5G-HT20 5G-HT40 2G-HT40 2G-HT20 Turbo */ 6044 /* Address 5G-HT20 5G-HT40 2G-HT40 2G-HT20 Turbo */
6032 { 0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, 6045 { 0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
diff --git a/drivers/net/wireless/ath/ath9k/phy.c b/drivers/net/wireless/ath/ath9k/phy.c
index eec4f1064a68..72a17c43a5a0 100644
--- a/drivers/net/wireless/ath/ath9k/phy.c
+++ b/drivers/net/wireless/ath/ath9k/phy.c
@@ -113,20 +113,31 @@ void ath9k_hw_ar9280_set_channel(struct ath_hw *ah,
113 113
114 if (freq < 4800) { 114 if (freq < 4800) {
115 u32 txctl; 115 u32 txctl;
116 int regWrites = 0;
116 117
117 bMode = 1; 118 bMode = 1;
118 fracMode = 1; 119 fracMode = 1;
119 aModeRefSel = 0; 120 aModeRefSel = 0;
120 channelSel = (freq * 0x10000) / 15; 121 channelSel = (freq * 0x10000) / 15;
121 122
122 txctl = REG_READ(ah, AR_PHY_CCK_TX_CTRL); 123 if (AR_SREV_9287_11_OR_LATER(ah)) {
123 if (freq == 2484) { 124 if (freq == 2484) {
124 125 REG_WRITE_ARRAY(&ah->iniCckfirJapan2484,
125 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, 126 1, regWrites);
126 txctl | AR_PHY_CCK_TX_CTRL_JAPAN); 127 } else {
128 REG_WRITE_ARRAY(&ah->iniCckfirNormal,
129 1, regWrites);
130 }
127 } else { 131 } else {
128 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, 132 txctl = REG_READ(ah, AR_PHY_CCK_TX_CTRL);
129 txctl & ~AR_PHY_CCK_TX_CTRL_JAPAN); 133 if (freq == 2484) {
134 /* Enable channel spreading for channel 14 */
135 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
136 txctl | AR_PHY_CCK_TX_CTRL_JAPAN);
137 } else {
138 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
139 txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN);
140 }
130 } 141 }
131 } else { 142 } else {
132 bMode = 0; 143 bMode = 0;