1 --- a/drivers/net/wireless/ath/ath.h
2 +++ b/drivers/net/wireless/ath/ath.h
3 @@ -71,9 +71,7 @@ struct ath_regulatory {
11 struct reg_dmn_pair_mapping *regpair;
13 --- a/drivers/net/wireless/ath/ath9k/Makefile
14 +++ b/drivers/net/wireless/ath/ath9k/Makefile
15 @@ -21,6 +21,7 @@ ath9k_hw-y:= \
23 --- a/drivers/net/wireless/ath/ath9k/ani.c
24 +++ b/drivers/net/wireless/ath/ath9k/ani.c
25 @@ -504,9 +504,6 @@ static void ath9k_ani_reset_old(struct a
26 ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
27 ATH9K_ANI_CCK_WEAK_SIG_THR);
29 - ath9k_hw_setrxfilter(ah, ath9k_hw_getrxfilter(ah) |
30 - ATH9K_RX_FILTER_PHYERR);
32 ath9k_ani_restart(ah);
35 @@ -527,8 +524,6 @@ static void ath9k_ani_reset_old(struct a
36 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
37 aniState->firstepLevel);
39 - ath9k_hw_setrxfilter(ah, ath9k_hw_getrxfilter(ah) &
40 - ~ATH9K_RX_FILTER_PHYERR);
41 ath9k_ani_restart(ah);
43 ENABLE_REGWRITE_BUFFER(ah);
44 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
45 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
46 @@ -763,10 +763,8 @@ static void ar5008_hw_set_channel_regs(s
47 static int ar5008_hw_process_ini(struct ath_hw *ah,
48 struct ath9k_channel *chan)
50 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
51 struct ath_common *common = ath9k_hw_common(ah);
53 - struct ieee80211_channel *channel = chan->chan;
54 u32 modesIndex, freqIndex;
56 switch (chan->chanmode) {
57 @@ -903,14 +901,7 @@ static int ar5008_hw_process_ini(struct
58 ar5008_hw_set_channel_regs(ah, chan);
59 ar5008_hw_init_chain_masks(ah);
63 - ah->eep_ops->set_txpower(ah, chan,
64 - ath9k_regd_get_ctl(regulatory, chan),
65 - channel->max_antenna_gain * 2,
66 - channel->max_power * 2,
67 - min((u32) MAX_RATE_POWER,
68 - (u32) regulatory->power_limit), false);
69 + ath9k_hw_apply_txpower(ah, chan);
71 /* Write analog registers */
72 if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
73 --- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
74 +++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
75 @@ -24,11 +24,11 @@ static const u32 ar9300_2p2_radio_postam
76 {0x0001609c, 0x0dd08f29, 0x0dd08f29, 0x0b283f31, 0x0b283f31},
77 {0x000160ac, 0xa4653c00, 0xa4653c00, 0x24652800, 0x24652800},
78 {0x000160b0, 0x03284f3e, 0x03284f3e, 0x05d08f20, 0x05d08f20},
79 - {0x0001610c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
80 + {0x0001610c, 0xc8000000, 0xc0000000, 0xc0000000, 0xc0000000},
81 {0x00016140, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
82 - {0x0001650c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
83 + {0x0001650c, 0xc8000000, 0xc0000000, 0xc0000000, 0xc0000000},
84 {0x00016540, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
85 - {0x0001690c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
86 + {0x0001690c, 0xc8000000, 0xc0000000, 0xc0000000, 0xc0000000},
87 {0x00016940, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
90 @@ -190,7 +190,7 @@ static const u32 ar9300_2p2_radio_core[]
91 {0x00016288, 0x05a20408},
92 {0x0001628c, 0x00038c07},
93 {0x00016290, 0x00000004},
94 - {0x00016294, 0x458aa14f},
95 + {0x00016294, 0x458a214f},
96 {0x00016380, 0x00000000},
97 {0x00016384, 0x00000000},
98 {0x00016388, 0x00800700},
99 @@ -835,107 +835,107 @@ static const u32 ar9300_2p2_baseband_cor
101 static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = {
102 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
103 - {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
104 - {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
105 - {0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
106 + {0x0000a2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
107 + {0x0000a2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
108 + {0x0000a2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
109 {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
110 {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
111 {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
112 {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
113 {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
114 {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
115 - {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
116 - {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
117 - {0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402},
118 - {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404},
119 - {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
120 - {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
121 - {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
122 - {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
123 - {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
124 - {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
125 - {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
126 - {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
127 - {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
128 - {0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861},
129 - {0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81},
130 - {0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83},
131 - {0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84},
132 - {0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3},
133 - {0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5},
134 - {0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9},
135 - {0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb},
136 - {0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
137 - {0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
138 - {0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
139 - {0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
140 - {0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
141 - {0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
142 - {0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
143 + {0x0000a510, 0x15000028, 0x15000028, 0x0f000202, 0x0f000202},
144 + {0x0000a514, 0x1b00002b, 0x1b00002b, 0x12000400, 0x12000400},
145 + {0x0000a518, 0x1f020028, 0x1f020028, 0x16000402, 0x16000402},
146 + {0x0000a51c, 0x2502002b, 0x2502002b, 0x19000404, 0x19000404},
147 + {0x0000a520, 0x2a04002a, 0x2a04002a, 0x1c000603, 0x1c000603},
148 + {0x0000a524, 0x2e06002a, 0x2e06002a, 0x21000a02, 0x21000a02},
149 + {0x0000a528, 0x3302202d, 0x3302202d, 0x25000a04, 0x25000a04},
150 + {0x0000a52c, 0x3804202c, 0x3804202c, 0x28000a20, 0x28000a20},
151 + {0x0000a530, 0x3c06202c, 0x3c06202c, 0x2c000e20, 0x2c000e20},
152 + {0x0000a534, 0x4108202d, 0x4108202d, 0x30000e22, 0x30000e22},
153 + {0x0000a538, 0x4506402d, 0x4506402d, 0x34000e24, 0x34000e24},
154 + {0x0000a53c, 0x4906222d, 0x4906222d, 0x38001640, 0x38001640},
155 + {0x0000a540, 0x4d062231, 0x4d062231, 0x3c001660, 0x3c001660},
156 + {0x0000a544, 0x50082231, 0x50082231, 0x3f001861, 0x3f001861},
157 + {0x0000a548, 0x5608422e, 0x5608422e, 0x43001a81, 0x43001a81},
158 + {0x0000a54c, 0x5a08442e, 0x5a08442e, 0x47001a83, 0x47001a83},
159 + {0x0000a550, 0x5e0a4431, 0x5e0a4431, 0x4a001c84, 0x4a001c84},
160 + {0x0000a554, 0x640a4432, 0x640a4432, 0x4e001ce3, 0x4e001ce3},
161 + {0x0000a558, 0x680a4434, 0x680a4434, 0x52001ce5, 0x52001ce5},
162 + {0x0000a55c, 0x6c0a6434, 0x6c0a6434, 0x56001ce9, 0x56001ce9},
163 + {0x0000a560, 0x6f0a6633, 0x6f0a6633, 0x5a001ceb, 0x5a001ceb},
164 + {0x0000a564, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
165 + {0x0000a568, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
166 + {0x0000a56c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
167 + {0x0000a570, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
168 + {0x0000a574, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
169 + {0x0000a578, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
170 + {0x0000a57c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
171 {0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
172 {0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
173 {0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
174 {0x0000a58c, 0x10800023, 0x10800023, 0x0b800200, 0x0b800200},
175 - {0x0000a590, 0x16800220, 0x16800220, 0x0f800202, 0x0f800202},
176 - {0x0000a594, 0x1c800223, 0x1c800223, 0x12800400, 0x12800400},
177 - {0x0000a598, 0x21802220, 0x21802220, 0x16800402, 0x16800402},
178 - {0x0000a59c, 0x27802223, 0x27802223, 0x19800404, 0x19800404},
179 - {0x0000a5a0, 0x2b822220, 0x2b822220, 0x1c800603, 0x1c800603},
180 - {0x0000a5a4, 0x2f822222, 0x2f822222, 0x21800a02, 0x21800a02},
181 - {0x0000a5a8, 0x34822225, 0x34822225, 0x25800a04, 0x25800a04},
182 - {0x0000a5ac, 0x3a82222a, 0x3a82222a, 0x28800a20, 0x28800a20},
183 - {0x0000a5b0, 0x3e82222c, 0x3e82222c, 0x2c800e20, 0x2c800e20},
184 - {0x0000a5b4, 0x4282242a, 0x4282242a, 0x30800e22, 0x30800e22},
185 - {0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24},
186 - {0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640},
187 - {0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660},
188 - {0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861},
189 - {0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81},
190 - {0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83},
191 - {0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84},
192 - {0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3},
193 - {0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5},
194 - {0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9},
195 - {0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb},
196 - {0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
197 - {0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
198 - {0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
199 - {0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
200 - {0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
201 - {0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
202 - {0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
203 + {0x0000a590, 0x15800028, 0x15800028, 0x0f800202, 0x0f800202},
204 + {0x0000a594, 0x1b80002b, 0x1b80002b, 0x12800400, 0x12800400},
205 + {0x0000a598, 0x1f820028, 0x1f820028, 0x16800402, 0x16800402},
206 + {0x0000a59c, 0x2582002b, 0x2582002b, 0x19800404, 0x19800404},
207 + {0x0000a5a0, 0x2a84002a, 0x2a84002a, 0x1c800603, 0x1c800603},
208 + {0x0000a5a4, 0x2e86002a, 0x2e86002a, 0x21800a02, 0x21800a02},
209 + {0x0000a5a8, 0x3382202d, 0x3382202d, 0x25800a04, 0x25800a04},
210 + {0x0000a5ac, 0x3884202c, 0x3884202c, 0x28800a20, 0x28800a20},
211 + {0x0000a5b0, 0x3c86202c, 0x3c86202c, 0x2c800e20, 0x2c800e20},
212 + {0x0000a5b4, 0x4188202d, 0x4188202d, 0x30800e22, 0x30800e22},
213 + {0x0000a5b8, 0x4586402d, 0x4586402d, 0x34800e24, 0x34800e24},
214 + {0x0000a5bc, 0x4986222d, 0x4986222d, 0x38801640, 0x38801640},
215 + {0x0000a5c0, 0x4d862231, 0x4d862231, 0x3c801660, 0x3c801660},
216 + {0x0000a5c4, 0x50882231, 0x50882231, 0x3f801861, 0x3f801861},
217 + {0x0000a5c8, 0x5688422e, 0x5688422e, 0x43801a81, 0x43801a81},
218 + {0x0000a5cc, 0x5a88442e, 0x5a88442e, 0x47801a83, 0x47801a83},
219 + {0x0000a5d0, 0x5e8a4431, 0x5e8a4431, 0x4a801c84, 0x4a801c84},
220 + {0x0000a5d4, 0x648a4432, 0x648a4432, 0x4e801ce3, 0x4e801ce3},
221 + {0x0000a5d8, 0x688a4434, 0x688a4434, 0x52801ce5, 0x52801ce5},
222 + {0x0000a5dc, 0x6c8a6434, 0x6c8a6434, 0x56801ce9, 0x56801ce9},
223 + {0x0000a5e0, 0x6f8a6633, 0x6f8a6633, 0x5a801ceb, 0x5a801ceb},
224 + {0x0000a5e4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
225 + {0x0000a5e8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
226 + {0x0000a5ec, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
227 + {0x0000a5f0, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
228 + {0x0000a5f4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
229 + {0x0000a5f8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
230 + {0x0000a5fc, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
231 {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
232 {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
233 - {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
234 - {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
235 - {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
236 - {0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000},
237 - {0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501},
238 - {0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501},
239 - {0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03},
240 - {0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04},
241 - {0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04},
242 - {0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
243 - {0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
244 - {0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
245 - {0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
246 - {0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
247 - {0x0000b2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
248 - {0x0000b2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
249 - {0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
250 + {0x0000a608, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
251 + {0x0000a60c, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
252 + {0x0000a610, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
253 + {0x0000a614, 0x01804601, 0x01804601, 0x01404000, 0x01404000},
254 + {0x0000a618, 0x01804601, 0x01804601, 0x01404501, 0x01404501},
255 + {0x0000a61c, 0x01804601, 0x01804601, 0x02008501, 0x02008501},
256 + {0x0000a620, 0x03408d02, 0x03408d02, 0x0280ca03, 0x0280ca03},
257 + {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
258 + {0x0000a628, 0x03410d04, 0x03410d04, 0x04014c04, 0x04014c04},
259 + {0x0000a62c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
260 + {0x0000a630, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
261 + {0x0000a634, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
262 + {0x0000a638, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
263 + {0x0000a63c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
264 + {0x0000b2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
265 + {0x0000b2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
266 + {0x0000b2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
267 {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
268 - {0x0000c2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
269 - {0x0000c2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
270 - {0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
271 + {0x0000c2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
272 + {0x0000c2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
273 + {0x0000c2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
274 {0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
275 {0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
276 - {0x00016048, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
277 + {0x00016048, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
278 {0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
279 {0x00016444, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
280 - {0x00016448, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
281 + {0x00016448, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
282 {0x00016468, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
283 {0x00016844, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
284 - {0x00016848, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
285 + {0x00016848, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
286 {0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
289 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
290 +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
294 #include "ar9003_phy.h"
295 +#include "ar9003_rtt.h"
297 -#define MAX_MEASUREMENT 8
298 +#define MAX_MEASUREMENT MAX_IQCAL_MEASUREMENT
299 #define MAX_MAG_DELTA 11
300 #define MAX_PHS_DELTA 10
302 @@ -659,10 +660,12 @@ static void ar9003_hw_detect_outlier(int
304 static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah,
306 - struct coeff *coeff)
307 + struct coeff *coeff,
310 int i, im, nmeasurement;
311 u32 tx_corr_coeff[MAX_MEASUREMENT][AR9300_MAX_CHAINS];
312 + struct ath9k_hw_cal_data *caldata = ah->caldata;
314 memset(tx_corr_coeff, 0, sizeof(tx_corr_coeff));
315 for (i = 0; i < MAX_MEASUREMENT / 2; i++) {
316 @@ -712,7 +715,13 @@ static void ar9003_hw_tx_iqcal_load_avg_
317 REG_RMW_FIELD(ah, tx_corr_coeff[im][i],
318 AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE,
319 coeff->iqc_coeff[0]);
322 + caldata->tx_corr_coeff[im][i] =
323 + coeff->iqc_coeff[0];
326 + caldata->num_measures[i] = nmeasurement;
329 REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_3,
330 @@ -720,8 +729,10 @@ static void ar9003_hw_tx_iqcal_load_avg_
331 REG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0,
332 AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1);
336 + caldata->done_txiqcal_once = is_reusable;
341 static bool ar9003_hw_tx_iq_cal_run(struct ath_hw *ah)
342 @@ -748,7 +759,7 @@ static bool ar9003_hw_tx_iq_cal_run(stru
346 -static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah)
347 +static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah, bool is_reusable)
349 struct ath_common *common = ath9k_hw_common(ah);
350 const u32 txiqcal_status[AR9300_MAX_CHAINS] = {
351 @@ -837,7 +848,8 @@ static void ar9003_hw_tx_iq_cal_post_pro
352 coeff.phs_coeff[i][im] -= 128;
355 - ar9003_hw_tx_iqcal_load_avg_2_passes(ah, num_chains, &coeff);
356 + ar9003_hw_tx_iqcal_load_avg_2_passes(ah, num_chains,
357 + &coeff, is_reusable);
361 @@ -845,11 +857,128 @@ tx_iqcal_fail:
362 ath_dbg(common, ATH_DBG_CALIBRATE, "Tx IQ Cal failed\n");
366 +static void ar9003_hw_tx_iq_cal_reload(struct ath_hw *ah)
368 + struct ath9k_hw_cal_data *caldata = ah->caldata;
369 + u32 tx_corr_coeff[MAX_MEASUREMENT][AR9300_MAX_CHAINS];
372 + memset(tx_corr_coeff, 0, sizeof(tx_corr_coeff));
373 + for (i = 0; i < MAX_MEASUREMENT / 2; i++) {
374 + tx_corr_coeff[i * 2][0] = tx_corr_coeff[(i * 2) + 1][0] =
375 + AR_PHY_TX_IQCAL_CORR_COEFF_B0(i);
376 + if (!AR_SREV_9485(ah)) {
377 + tx_corr_coeff[i * 2][1] =
378 + tx_corr_coeff[(i * 2) + 1][1] =
379 + AR_PHY_TX_IQCAL_CORR_COEFF_B1(i);
381 + tx_corr_coeff[i * 2][2] =
382 + tx_corr_coeff[(i * 2) + 1][2] =
383 + AR_PHY_TX_IQCAL_CORR_COEFF_B2(i);
387 + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
388 + if (!(ah->txchainmask & (1 << i)))
391 + for (im = 0; im < caldata->num_measures[i]; im++) {
393 + REG_RMW_FIELD(ah, tx_corr_coeff[im][i],
394 + AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE,
395 + caldata->tx_corr_coeff[im][i]);
397 + REG_RMW_FIELD(ah, tx_corr_coeff[im][i],
398 + AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE,
399 + caldata->tx_corr_coeff[im][i]);
403 + REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_3,
404 + AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN, 0x1);
405 + REG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0,
406 + AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1);
409 +static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
411 + struct ath9k_rtt_hist *hist = &ah->caldata->rtt_hist;
416 + if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT))
419 + ar9003_hw_rtt_enable(ah);
420 + ar9003_hw_rtt_set_mask(ah, 0x10);
421 + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
422 + if (!(ah->rxchainmask & (1 << i)))
424 + table = &hist->table[i][hist->num_readings][0];
425 + ar9003_hw_rtt_load_hist(ah, i, table);
427 + restore = ar9003_hw_rtt_force_restore(ah);
428 + ar9003_hw_rtt_disable(ah);
433 static bool ar9003_hw_init_cal(struct ath_hw *ah,
434 struct ath9k_channel *chan)
436 struct ath_common *common = ath9k_hw_common(ah);
437 - bool txiqcal_done = false;
438 + struct ath9k_hw_cal_data *caldata = ah->caldata;
439 + bool txiqcal_done = false, txclcal_done = false;
440 + bool is_reusable = true, status = true;
441 + bool run_rtt_cal = false, run_agc_cal;
442 + bool rtt = !!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT);
443 + u32 agc_ctrl = 0, agc_supp_cals = AR_PHY_AGC_CONTROL_OFFSET_CAL |
444 + AR_PHY_AGC_CONTROL_FLTR_CAL |
445 + AR_PHY_AGC_CONTROL_PKDET_CAL;
447 + u32 cl_idx[AR9300_MAX_CHAINS] = { AR_PHY_CL_TAB_0,
452 + if (!ar9003_hw_rtt_restore(ah, chan))
453 + run_rtt_cal = true;
455 + ath_dbg(common, ATH_DBG_CALIBRATE, "RTT restore %s\n",
456 + run_rtt_cal ? "failed" : "succeed");
458 + run_agc_cal = run_rtt_cal;
461 + ar9003_hw_rtt_enable(ah);
462 + ar9003_hw_rtt_set_mask(ah, 0x00);
463 + ar9003_hw_rtt_clear_hist(ah);
466 + if (rtt && !run_rtt_cal) {
467 + agc_ctrl = REG_READ(ah, AR_PHY_AGC_CONTROL);
468 + agc_supp_cals &= agc_ctrl;
469 + agc_ctrl &= ~(AR_PHY_AGC_CONTROL_OFFSET_CAL |
470 + AR_PHY_AGC_CONTROL_FLTR_CAL |
471 + AR_PHY_AGC_CONTROL_PKDET_CAL);
472 + REG_WRITE(ah, AR_PHY_AGC_CONTROL, agc_ctrl);
475 + if (ah->enabled_cals & TX_CL_CAL) {
476 + if (caldata && caldata->done_txclcal_once)
477 + REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL,
478 + AR_PHY_CL_CAL_ENABLE);
480 + REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL,
481 + AR_PHY_CL_CAL_ENABLE);
482 + run_agc_cal = true;
486 + if (!(ah->enabled_cals & TX_IQ_CAL))
487 + goto skip_tx_iqcal;
489 /* Do Tx IQ Calibration */
490 REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_1,
491 @@ -860,30 +989,96 @@ static bool ar9003_hw_init_cal(struct at
492 * For AR9485 or later chips, TxIQ cal runs as part of
495 - if (AR_SREV_9485_OR_LATER(ah))
496 - txiqcal_done = true;
498 - txiqcal_done = ar9003_hw_tx_iq_cal_run(ah);
499 - REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS);
501 - REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
504 - /* Calibrate the AGC */
505 - REG_WRITE(ah, AR_PHY_AGC_CONTROL,
506 - REG_READ(ah, AR_PHY_AGC_CONTROL) |
507 - AR_PHY_AGC_CONTROL_CAL);
509 - /* Poll for offset calibration complete */
510 - if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL,
511 - 0, AH_WAIT_TIMEOUT)) {
512 + if (ah->enabled_cals & TX_IQ_ON_AGC_CAL) {
513 + if (caldata && !caldata->done_txiqcal_once)
514 + REG_SET_BIT(ah, AR_PHY_TX_IQCAL_CONTROL_0,
515 + AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL);
517 + REG_CLR_BIT(ah, AR_PHY_TX_IQCAL_CONTROL_0,
518 + AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL);
519 + txiqcal_done = run_agc_cal = true;
520 + goto skip_tx_iqcal;
521 + } else if (caldata && !caldata->done_txiqcal_once)
522 + run_agc_cal = true;
524 + txiqcal_done = ar9003_hw_tx_iq_cal_run(ah);
525 + REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS);
527 + REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
530 + if (run_agc_cal || !(ah->ah_flags & AH_FASTCC)) {
531 + /* Calibrate the AGC */
532 + REG_WRITE(ah, AR_PHY_AGC_CONTROL,
533 + REG_READ(ah, AR_PHY_AGC_CONTROL) |
534 + AR_PHY_AGC_CONTROL_CAL);
536 + /* Poll for offset calibration complete */
537 + status = ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL,
538 + AR_PHY_AGC_CONTROL_CAL,
539 + 0, AH_WAIT_TIMEOUT);
541 + if (rtt && !run_rtt_cal) {
542 + agc_ctrl |= agc_supp_cals;
543 + REG_WRITE(ah, AR_PHY_AGC_CONTROL, agc_ctrl);
548 + ar9003_hw_rtt_disable(ah);
550 ath_dbg(common, ATH_DBG_CALIBRATE,
551 - "offset calibration failed to complete in 1ms; noisy environment?\n");
552 + "offset calibration failed to complete in 1ms;"
553 + "noisy environment?\n");
558 - ar9003_hw_tx_iq_cal_post_proc(ah);
559 + ar9003_hw_tx_iq_cal_post_proc(ah, is_reusable);
560 + else if (caldata && caldata->done_txiqcal_once)
561 + ar9003_hw_tx_iq_cal_reload(ah);
563 +#define CL_TAB_ENTRY(reg_base) (reg_base + (4 * j))
564 + if (caldata && (ah->enabled_cals & TX_CL_CAL)) {
565 + txclcal_done = !!(REG_READ(ah, AR_PHY_AGC_CONTROL) &
566 + AR_PHY_AGC_CONTROL_CLC_SUCCESS);
567 + if (caldata->done_txclcal_once) {
568 + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
569 + if (!(ah->txchainmask & (1 << i)))
571 + for (j = 0; j < MAX_CL_TAB_ENTRY; j++)
572 + REG_WRITE(ah, CL_TAB_ENTRY(cl_idx[i]),
573 + caldata->tx_clcal[i][j]);
575 + } else if (is_reusable && txclcal_done) {
576 + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
577 + if (!(ah->txchainmask & (1 << i)))
579 + for (j = 0; j < MAX_CL_TAB_ENTRY; j++)
580 + caldata->tx_clcal[i][j] =
582 + CL_TAB_ENTRY(cl_idx[i]));
584 + caldata->done_txclcal_once = true;
590 + struct ath9k_rtt_hist *hist = &ah->caldata->rtt_hist;
591 + if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {
594 + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
595 + if (!(ah->rxchainmask & (1 << i)))
597 + table = &hist->table[i][hist->num_readings][0];
598 + ar9003_hw_rtt_fill_hist(ah, i, table);
602 + ar9003_hw_rtt_disable(ah);
605 ath9k_hw_loadnf(ah, chan);
606 ath9k_hw_start_nfcal(ah, true);
607 @@ -912,8 +1107,8 @@ static bool ar9003_hw_init_cal(struct at
608 if (ah->cal_list_curr)
609 ath9k_hw_reset_calibration(ah, ah->cal_list_curr);
612 - ah->caldata->CalValid = 0;
614 + caldata->CalValid = 0;
618 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
619 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
620 @@ -2995,8 +2995,6 @@ static u32 ath9k_hw_ar9300_get_eeprom(st
621 return get_unaligned_be16(eep->macAddr + 4);
623 return le16_to_cpu(pBase->regDmn[0]);
625 - return le16_to_cpu(pBase->regDmn[1]);
627 return pBase->deviceCap;
629 @@ -3021,6 +3019,10 @@ static u32 ath9k_hw_ar9300_get_eeprom(st
630 return (pBase->miscConfiguration >> 0x3) & 0x1;
631 case EEP_ANT_DIV_CTL1:
632 return eep->base_ext1.ant_div_control;
633 + case EEP_ANTENNA_GAIN_5G:
634 + return eep->modalHeader5G.antennaGain;
635 + case EEP_ANTENNA_GAIN_2G:
636 + return eep->modalHeader2G.antennaGain;
640 @@ -3554,7 +3556,7 @@ static void ar9003_hw_xpa_bias_level_app
642 if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
643 REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias);
644 - else if (AR_SREV_9480(ah))
645 + else if (AR_SREV_9462(ah))
646 REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
648 REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
649 @@ -3633,20 +3635,20 @@ static void ar9003_hw_ant_ctrl_apply(str
651 u32 value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz);
653 - if (AR_SREV_9480(ah)) {
654 - if (AR_SREV_9480_10(ah)) {
655 + if (AR_SREV_9462(ah)) {
656 + if (AR_SREV_9462_10(ah)) {
657 value &= ~AR_SWITCH_TABLE_COM_SPDT;
660 REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
661 - AR_SWITCH_TABLE_COM_AR9480_ALL, value);
662 + AR_SWITCH_TABLE_COM_AR9462_ALL, value);
664 REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
665 AR_SWITCH_TABLE_COM_ALL, value);
669 - * AR9480 defines new switch table for BT/WLAN,
670 + * AR9462 defines new switch table for BT/WLAN,
671 * here's new field name in XXX.ref for both 2G and 5G.
672 * Register: [GLB_CONTROL] GLB_CONTROL (@0x20044)
673 * 15:12 R/W SWITCH_TABLE_COM_SPDT_WLAN_RX
674 @@ -3658,7 +3660,7 @@ static void ar9003_hw_ant_ctrl_apply(str
675 * 7:4 R/W SWITCH_TABLE_COM_SPDT_WLAN_IDLE
676 * SWITCH_TABLE_COM_SPDT_WLAN_IDLE
678 - if (AR_SREV_9480_20_OR_LATER(ah)) {
679 + if (AR_SREV_9462_20_OR_LATER(ah)) {
680 value = ar9003_switch_com_spdt_get(ah, is2ghz);
681 REG_RMW_FIELD(ah, AR_PHY_GLB_CONTROL,
682 AR_SWITCH_TABLE_COM_SPDT_ALL, value);
683 @@ -3907,7 +3909,7 @@ static void ar9003_hw_internal_regulator
684 REG_WRITE(ah, AR_PHY_PMU2, reg_pmu_set);
685 if (!is_pmu_set(ah, AR_PHY_PMU2, reg_pmu_set))
687 - } else if (AR_SREV_9480(ah)) {
688 + } else if (AR_SREV_9462(ah)) {
689 reg_val = ath9k_hw_ar9300_get_eeprom(ah, EEP_SWREG);
690 REG_WRITE(ah, AR_PHY_PMU1, reg_val);
692 @@ -3938,7 +3940,7 @@ static void ar9003_hw_internal_regulator
693 while (!REG_READ_FIELD(ah, AR_PHY_PMU2,
696 - } else if (AR_SREV_9480(ah))
697 + } else if (AR_SREV_9462(ah))
698 REG_RMW_FIELD(ah, AR_PHY_PMU1, AR_PHY_PMU1_PWD, 0x1);
700 reg_val = REG_READ(ah, AR_RTC_SLEEP_CLK) |
701 @@ -4525,7 +4527,7 @@ static int ar9003_hw_power_control_overr
703 REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, tempSlope);
705 - if (AR_SREV_9480_20(ah))
706 + if (AR_SREV_9462_20(ah))
707 REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
708 AR_PHY_TPC_19_B1_ALPHA_THERM, tempSlope);
710 @@ -4764,20 +4766,14 @@ static u16 ar9003_hw_get_max_edge_power(
711 static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
712 struct ath9k_channel *chan,
713 u8 *pPwrArray, u16 cfgCtl,
714 - u8 twiceAntennaReduction,
715 - u8 twiceMaxRegulatoryPower,
716 + u8 antenna_reduction,
719 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
720 struct ath_common *common = ath9k_hw_common(ah);
721 struct ar9300_eeprom *pEepData = &ah->eeprom.ar9300_eep;
722 u16 twiceMaxEdgePower = MAX_RATE_POWER;
723 - static const u16 tpScaleReductionTable[5] = {
724 - 0, 3, 6, 9, MAX_RATE_POWER
727 - int16_t twiceLargestAntenna;
728 - u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
729 + u16 scaledPower = 0, minCtlPower;
730 static const u16 ctlModesFor11a[] = {
731 CTL_11A, CTL_5GHT20, CTL_11A_EXT, CTL_5GHT40
733 @@ -4795,28 +4791,7 @@ static void ar9003_hw_set_power_per_rate
734 bool is2ghz = IS_CHAN_2GHZ(chan);
736 ath9k_hw_get_channel_centers(ah, chan, ¢ers);
738 - /* Compute TxPower reduction due to Antenna Gain */
740 - twiceLargestAntenna = pEepData->modalHeader2G.antennaGain;
742 - twiceLargestAntenna = pEepData->modalHeader5G.antennaGain;
744 - twiceLargestAntenna = (int16_t)min((twiceAntennaReduction) -
745 - twiceLargestAntenna, 0);
748 - * scaledPower is the minimum of the user input power level
749 - * and the regulatory allowed power level
751 - maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
753 - if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX) {
754 - maxRegAllowedPower -=
755 - (tpScaleReductionTable[(regulatory->tp_scale)] * 2);
758 - scaledPower = min(powerLimit, maxRegAllowedPower);
759 + scaledPower = powerLimit - antenna_reduction;
762 * Reduce scaled Power by number of chains active to get
763 @@ -5003,7 +4978,6 @@ static inline u8 mcsidx_to_tgtpwridx(uns
764 static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
765 struct ath9k_channel *chan, u16 cfgCtl,
766 u8 twiceAntennaReduction,
767 - u8 twiceMaxRegulatoryPower,
768 u8 powerLimit, bool test)
770 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
771 @@ -5056,7 +5030,6 @@ static void ath9k_hw_ar9300_set_txpower(
772 ar9003_hw_set_power_per_rate_table(ah, chan,
773 targetPowerValT2, cfgCtl,
774 twiceAntennaReduction,
775 - twiceMaxRegulatoryPower,
778 if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) {
779 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
780 +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
782 #include "ar9330_1p1_initvals.h"
783 #include "ar9330_1p2_initvals.h"
784 #include "ar9580_1p0_initvals.h"
785 -#include "ar9480_1p0_initvals.h"
786 -#include "ar9480_2p0_initvals.h"
787 +#include "ar9462_1p0_initvals.h"
788 +#include "ar9462_2p0_initvals.h"
790 /* General hardware code for the AR9003 hadware family */
793 static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
795 #define PCIE_PLL_ON_CREQ_DIS_L1_2P0 \
796 - ar9480_pciephy_pll_on_clkreq_disable_L1_2p0
797 + ar9462_pciephy_pll_on_clkreq_disable_L1_2p0
799 -#define AR9480_BB_CTX_COEFJ(x) \
800 - ar9480_##x##_baseband_core_txfir_coeff_japan_2484
801 +#define AR9462_BB_CTX_COEFJ(x) \
802 + ar9462_##x##_baseband_core_txfir_coeff_japan_2484
804 -#define AR9480_BBC_TXIFR_COEFFJ \
805 - ar9480_2p0_baseband_core_txfir_coeff_japan_2484
806 +#define AR9462_BBC_TXIFR_COEFFJ \
807 + ar9462_2p0_baseband_core_txfir_coeff_japan_2484
808 if (AR_SREV_9330_11(ah)) {
810 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
811 @@ -264,107 +264,107 @@ static void ar9003_hw_init_mode_regs(str
812 ar9485_1_1_pcie_phy_clkreq_disable_L1,
813 ARRAY_SIZE(ar9485_1_1_pcie_phy_clkreq_disable_L1),
815 - } else if (AR_SREV_9480_10(ah)) {
816 + } else if (AR_SREV_9462_10(ah)) {
817 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
818 - INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9480_1p0_mac_core,
819 - ARRAY_SIZE(ar9480_1p0_mac_core), 2);
820 + INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_1p0_mac_core,
821 + ARRAY_SIZE(ar9462_1p0_mac_core), 2);
822 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
823 - ar9480_1p0_mac_postamble,
824 - ARRAY_SIZE(ar9480_1p0_mac_postamble),
825 + ar9462_1p0_mac_postamble,
826 + ARRAY_SIZE(ar9462_1p0_mac_postamble),
829 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0);
830 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
831 - ar9480_1p0_baseband_core,
832 - ARRAY_SIZE(ar9480_1p0_baseband_core),
833 + ar9462_1p0_baseband_core,
834 + ARRAY_SIZE(ar9462_1p0_baseband_core),
836 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
837 - ar9480_1p0_baseband_postamble,
838 - ARRAY_SIZE(ar9480_1p0_baseband_postamble), 5);
839 + ar9462_1p0_baseband_postamble,
840 + ARRAY_SIZE(ar9462_1p0_baseband_postamble), 5);
842 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
843 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
844 - ar9480_1p0_radio_core,
845 - ARRAY_SIZE(ar9480_1p0_radio_core), 2);
846 + ar9462_1p0_radio_core,
847 + ARRAY_SIZE(ar9462_1p0_radio_core), 2);
848 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
849 - ar9480_1p0_radio_postamble,
850 - ARRAY_SIZE(ar9480_1p0_radio_postamble), 5);
851 + ar9462_1p0_radio_postamble,
852 + ARRAY_SIZE(ar9462_1p0_radio_postamble), 5);
854 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
855 - ar9480_1p0_soc_preamble,
856 - ARRAY_SIZE(ar9480_1p0_soc_preamble), 2);
857 + ar9462_1p0_soc_preamble,
858 + ARRAY_SIZE(ar9462_1p0_soc_preamble), 2);
859 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
860 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST],
861 - ar9480_1p0_soc_postamble,
862 - ARRAY_SIZE(ar9480_1p0_soc_postamble), 5);
863 + ar9462_1p0_soc_postamble,
864 + ARRAY_SIZE(ar9462_1p0_soc_postamble), 5);
866 INIT_INI_ARRAY(&ah->iniModesRxGain,
867 - ar9480_common_rx_gain_table_1p0,
868 - ARRAY_SIZE(ar9480_common_rx_gain_table_1p0), 2);
869 + ar9462_common_rx_gain_table_1p0,
870 + ARRAY_SIZE(ar9462_common_rx_gain_table_1p0), 2);
872 /* Awake -> Sleep Setting */
873 INIT_INI_ARRAY(&ah->iniPcieSerdes,
874 - ar9480_pcie_phy_clkreq_disable_L1_1p0,
875 - ARRAY_SIZE(ar9480_pcie_phy_clkreq_disable_L1_1p0),
876 + ar9462_pcie_phy_clkreq_disable_L1_1p0,
877 + ARRAY_SIZE(ar9462_pcie_phy_clkreq_disable_L1_1p0),
880 /* Sleep -> Awake Setting */
881 INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
882 - ar9480_pcie_phy_clkreq_disable_L1_1p0,
883 - ARRAY_SIZE(ar9480_pcie_phy_clkreq_disable_L1_1p0),
884 + ar9462_pcie_phy_clkreq_disable_L1_1p0,
885 + ARRAY_SIZE(ar9462_pcie_phy_clkreq_disable_L1_1p0),
888 INIT_INI_ARRAY(&ah->iniModesAdditional,
889 - ar9480_modes_fast_clock_1p0,
890 - ARRAY_SIZE(ar9480_modes_fast_clock_1p0), 3);
891 + ar9462_modes_fast_clock_1p0,
892 + ARRAY_SIZE(ar9462_modes_fast_clock_1p0), 3);
893 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
894 - AR9480_BB_CTX_COEFJ(1p0),
895 - ARRAY_SIZE(AR9480_BB_CTX_COEFJ(1p0)), 2);
896 + AR9462_BB_CTX_COEFJ(1p0),
897 + ARRAY_SIZE(AR9462_BB_CTX_COEFJ(1p0)), 2);
899 - } else if (AR_SREV_9480_20(ah)) {
900 + } else if (AR_SREV_9462_20(ah)) {
902 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
903 - INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9480_2p0_mac_core,
904 - ARRAY_SIZE(ar9480_2p0_mac_core), 2);
905 + INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_2p0_mac_core,
906 + ARRAY_SIZE(ar9462_2p0_mac_core), 2);
907 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
908 - ar9480_2p0_mac_postamble,
909 - ARRAY_SIZE(ar9480_2p0_mac_postamble), 5);
910 + ar9462_2p0_mac_postamble,
911 + ARRAY_SIZE(ar9462_2p0_mac_postamble), 5);
913 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0);
914 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
915 - ar9480_2p0_baseband_core,
916 - ARRAY_SIZE(ar9480_2p0_baseband_core), 2);
917 + ar9462_2p0_baseband_core,
918 + ARRAY_SIZE(ar9462_2p0_baseband_core), 2);
919 INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
920 - ar9480_2p0_baseband_postamble,
921 - ARRAY_SIZE(ar9480_2p0_baseband_postamble), 5);
922 + ar9462_2p0_baseband_postamble,
923 + ARRAY_SIZE(ar9462_2p0_baseband_postamble), 5);
925 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
926 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
927 - ar9480_2p0_radio_core,
928 - ARRAY_SIZE(ar9480_2p0_radio_core), 2);
929 + ar9462_2p0_radio_core,
930 + ARRAY_SIZE(ar9462_2p0_radio_core), 2);
931 INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
932 - ar9480_2p0_radio_postamble,
933 - ARRAY_SIZE(ar9480_2p0_radio_postamble), 5);
934 + ar9462_2p0_radio_postamble,
935 + ARRAY_SIZE(ar9462_2p0_radio_postamble), 5);
936 INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant,
937 - ar9480_2p0_radio_postamble_sys2ant,
938 - ARRAY_SIZE(ar9480_2p0_radio_postamble_sys2ant),
939 + ar9462_2p0_radio_postamble_sys2ant,
940 + ARRAY_SIZE(ar9462_2p0_radio_postamble_sys2ant),
943 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
944 - ar9480_2p0_soc_preamble,
945 - ARRAY_SIZE(ar9480_2p0_soc_preamble), 2);
946 + ar9462_2p0_soc_preamble,
947 + ARRAY_SIZE(ar9462_2p0_soc_preamble), 2);
948 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
949 INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST],
950 - ar9480_2p0_soc_postamble,
951 - ARRAY_SIZE(ar9480_2p0_soc_postamble), 5);
952 + ar9462_2p0_soc_postamble,
953 + ARRAY_SIZE(ar9462_2p0_soc_postamble), 5);
955 INIT_INI_ARRAY(&ah->iniModesRxGain,
956 - ar9480_common_rx_gain_table_2p0,
957 - ARRAY_SIZE(ar9480_common_rx_gain_table_2p0), 2);
958 + ar9462_common_rx_gain_table_2p0,
959 + ARRAY_SIZE(ar9462_common_rx_gain_table_2p0), 2);
961 INIT_INI_ARRAY(&ah->ini_BTCOEX_MAX_TXPWR,
962 - ar9480_2p0_BTCOEX_MAX_TXPWR_table,
963 - ARRAY_SIZE(ar9480_2p0_BTCOEX_MAX_TXPWR_table),
964 + ar9462_2p0_BTCOEX_MAX_TXPWR_table,
965 + ARRAY_SIZE(ar9462_2p0_BTCOEX_MAX_TXPWR_table),
968 /* Awake -> Sleep Setting */
969 @@ -380,15 +380,15 @@ static void ar9003_hw_init_mode_regs(str
971 /* Fast clock modal settings */
972 INIT_INI_ARRAY(&ah->iniModesAdditional,
973 - ar9480_modes_fast_clock_2p0,
974 - ARRAY_SIZE(ar9480_modes_fast_clock_2p0), 3);
975 + ar9462_modes_fast_clock_2p0,
976 + ARRAY_SIZE(ar9462_modes_fast_clock_2p0), 3);
978 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
979 - AR9480_BB_CTX_COEFJ(2p0),
980 - ARRAY_SIZE(AR9480_BB_CTX_COEFJ(2p0)), 2);
981 + AR9462_BB_CTX_COEFJ(2p0),
982 + ARRAY_SIZE(AR9462_BB_CTX_COEFJ(2p0)), 2);
984 - INIT_INI_ARRAY(&ah->ini_japan2484, AR9480_BBC_TXIFR_COEFFJ,
985 - ARRAY_SIZE(AR9480_BBC_TXIFR_COEFFJ), 2);
986 + INIT_INI_ARRAY(&ah->ini_japan2484, AR9462_BBC_TXIFR_COEFFJ,
987 + ARRAY_SIZE(AR9462_BBC_TXIFR_COEFFJ), 2);
989 } else if (AR_SREV_9580(ah)) {
991 @@ -537,15 +537,15 @@ static void ar9003_tx_gain_table_mode0(s
992 ar9580_1p0_lowest_ob_db_tx_gain_table,
993 ARRAY_SIZE(ar9580_1p0_lowest_ob_db_tx_gain_table),
995 - else if (AR_SREV_9480_10(ah))
996 + else if (AR_SREV_9462_10(ah))
997 INIT_INI_ARRAY(&ah->iniModesTxGain,
998 - ar9480_modes_low_ob_db_tx_gain_table_1p0,
999 - ARRAY_SIZE(ar9480_modes_low_ob_db_tx_gain_table_1p0),
1000 + ar9462_modes_low_ob_db_tx_gain_table_1p0,
1001 + ARRAY_SIZE(ar9462_modes_low_ob_db_tx_gain_table_1p0),
1003 - else if (AR_SREV_9480_20(ah))
1004 + else if (AR_SREV_9462_20(ah))
1005 INIT_INI_ARRAY(&ah->iniModesTxGain,
1006 - ar9480_modes_low_ob_db_tx_gain_table_2p0,
1007 - ARRAY_SIZE(ar9480_modes_low_ob_db_tx_gain_table_2p0),
1008 + ar9462_modes_low_ob_db_tx_gain_table_2p0,
1009 + ARRAY_SIZE(ar9462_modes_low_ob_db_tx_gain_table_2p0),
1012 INIT_INI_ARRAY(&ah->iniModesTxGain,
1013 @@ -581,15 +581,15 @@ static void ar9003_tx_gain_table_mode1(s
1014 ar9580_1p0_high_ob_db_tx_gain_table,
1015 ARRAY_SIZE(ar9580_1p0_high_ob_db_tx_gain_table),
1017 - else if (AR_SREV_9480_10(ah))
1018 + else if (AR_SREV_9462_10(ah))
1019 INIT_INI_ARRAY(&ah->iniModesTxGain,
1020 - ar9480_modes_high_ob_db_tx_gain_table_1p0,
1021 - ARRAY_SIZE(ar9480_modes_high_ob_db_tx_gain_table_1p0),
1022 + ar9462_modes_high_ob_db_tx_gain_table_1p0,
1023 + ARRAY_SIZE(ar9462_modes_high_ob_db_tx_gain_table_1p0),
1025 - else if (AR_SREV_9480_20(ah))
1026 + else if (AR_SREV_9462_20(ah))
1027 INIT_INI_ARRAY(&ah->iniModesTxGain,
1028 - ar9480_modes_high_ob_db_tx_gain_table_2p0,
1029 - ARRAY_SIZE(ar9480_modes_high_ob_db_tx_gain_table_2p0),
1030 + ar9462_modes_high_ob_db_tx_gain_table_2p0,
1031 + ARRAY_SIZE(ar9462_modes_high_ob_db_tx_gain_table_2p0),
1034 INIT_INI_ARRAY(&ah->iniModesTxGain,
1035 @@ -712,15 +712,15 @@ static void ar9003_rx_gain_table_mode0(s
1036 ar9580_1p0_rx_gain_table,
1037 ARRAY_SIZE(ar9580_1p0_rx_gain_table),
1039 - else if (AR_SREV_9480_10(ah))
1040 + else if (AR_SREV_9462_10(ah))
1041 INIT_INI_ARRAY(&ah->iniModesRxGain,
1042 - ar9480_common_rx_gain_table_1p0,
1043 - ARRAY_SIZE(ar9480_common_rx_gain_table_1p0),
1044 + ar9462_common_rx_gain_table_1p0,
1045 + ARRAY_SIZE(ar9462_common_rx_gain_table_1p0),
1047 - else if (AR_SREV_9480_20(ah))
1048 + else if (AR_SREV_9462_20(ah))
1049 INIT_INI_ARRAY(&ah->iniModesRxGain,
1050 - ar9480_common_rx_gain_table_2p0,
1051 - ARRAY_SIZE(ar9480_common_rx_gain_table_2p0),
1052 + ar9462_common_rx_gain_table_2p0,
1053 + ARRAY_SIZE(ar9462_common_rx_gain_table_2p0),
1056 INIT_INI_ARRAY(&ah->iniModesRxGain,
1057 @@ -751,15 +751,15 @@ static void ar9003_rx_gain_table_mode1(s
1058 ar9485Common_wo_xlna_rx_gain_1_1,
1059 ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1),
1061 - else if (AR_SREV_9480_10(ah))
1062 + else if (AR_SREV_9462_10(ah))
1063 INIT_INI_ARRAY(&ah->iniModesRxGain,
1064 - ar9480_common_wo_xlna_rx_gain_table_1p0,
1065 - ARRAY_SIZE(ar9480_common_wo_xlna_rx_gain_table_1p0),
1066 + ar9462_common_wo_xlna_rx_gain_table_1p0,
1067 + ARRAY_SIZE(ar9462_common_wo_xlna_rx_gain_table_1p0),
1069 - else if (AR_SREV_9480_20(ah))
1070 + else if (AR_SREV_9462_20(ah))
1071 INIT_INI_ARRAY(&ah->iniModesRxGain,
1072 - ar9480_common_wo_xlna_rx_gain_table_2p0,
1073 - ARRAY_SIZE(ar9480_common_wo_xlna_rx_gain_table_2p0),
1074 + ar9462_common_wo_xlna_rx_gain_table_2p0,
1075 + ARRAY_SIZE(ar9462_common_wo_xlna_rx_gain_table_2p0),
1077 else if (AR_SREV_9580(ah))
1078 INIT_INI_ARRAY(&ah->iniModesRxGain,
1079 @@ -775,14 +775,14 @@ static void ar9003_rx_gain_table_mode1(s
1081 static void ar9003_rx_gain_table_mode2(struct ath_hw *ah)
1083 - if (AR_SREV_9480_10(ah))
1084 + if (AR_SREV_9462_10(ah))
1085 INIT_INI_ARRAY(&ah->iniModesRxGain,
1086 - ar9480_common_mixed_rx_gain_table_1p0,
1087 - ARRAY_SIZE(ar9480_common_mixed_rx_gain_table_1p0), 2);
1088 - else if (AR_SREV_9480_20(ah))
1089 + ar9462_common_mixed_rx_gain_table_1p0,
1090 + ARRAY_SIZE(ar9462_common_mixed_rx_gain_table_1p0), 2);
1091 + else if (AR_SREV_9462_20(ah))
1092 INIT_INI_ARRAY(&ah->iniModesRxGain,
1093 - ar9480_common_mixed_rx_gain_table_2p0,
1094 - ARRAY_SIZE(ar9480_common_mixed_rx_gain_table_2p0), 2);
1095 + ar9462_common_mixed_rx_gain_table_2p0,
1096 + ARRAY_SIZE(ar9462_common_mixed_rx_gain_table_2p0), 2);
1099 static void ar9003_rx_gain_table_apply(struct ath_hw *ah)
1100 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
1101 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
1102 @@ -525,8 +525,8 @@ int ath9k_hw_process_rxdesc_edma(struct
1103 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
1104 else if (rxsp->status11 & AR_MichaelErr)
1105 rxs->rs_status |= ATH9K_RXERR_MIC;
1106 - else if (rxsp->status11 & AR_KeyMiss)
1107 - rxs->rs_status |= ATH9K_RXERR_DECRYPT;
1108 + if (rxsp->status11 & AR_KeyMiss)
1109 + rxs->rs_status |= ATH9K_RXERR_KEYMISS;
1113 --- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
1114 +++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
1117 void ar9003_paprd_enable(struct ath_hw *ah, bool val)
1119 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
1120 struct ath9k_channel *chan = ah->curchan;
1121 struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
1123 @@ -54,13 +53,7 @@ void ar9003_paprd_enable(struct ath_hw *
1126 ah->paprd_table_write_done = true;
1128 - ah->eep_ops->set_txpower(ah, chan,
1129 - ath9k_regd_get_ctl(regulatory, chan),
1130 - chan->chan->max_antenna_gain * 2,
1131 - chan->chan->max_power * 2,
1132 - min((u32) MAX_RATE_POWER,
1133 - (u32) regulatory->power_limit), false);
1134 + ath9k_hw_apply_txpower(ah, chan);
1137 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0,
1138 @@ -207,7 +200,7 @@ static int ar9003_paprd_setup_single_tab
1139 AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING, 28);
1140 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
1141 AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE, 1);
1142 - val = AR_SREV_9480(ah) ? 0x91 : 147;
1143 + val = AR_SREV_9462(ah) ? 0x91 : 147;
1144 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL2,
1145 AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN, val);
1146 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
1147 @@ -218,7 +211,7 @@ static int ar9003_paprd_setup_single_tab
1148 AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES, 7);
1149 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
1150 AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL, 1);
1151 - if (AR_SREV_9485(ah) || AR_SREV_9480(ah))
1152 + if (AR_SREV_9485(ah) || AR_SREV_9462(ah))
1153 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
1154 AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP,
1156 @@ -226,7 +219,7 @@ static int ar9003_paprd_setup_single_tab
1157 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
1158 AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP,
1160 - val = AR_SREV_9480(ah) ? -10 : -15;
1161 + val = AR_SREV_9462(ah) ? -10 : -15;
1162 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
1163 AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE,
1165 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
1166 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
1167 @@ -559,7 +559,7 @@ static void ar9003_hw_set_chain_masks(st
1169 if ((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7))
1170 REG_WRITE(ah, AR_SELFGEN_MASK, 0x3);
1171 - else if (AR_SREV_9480(ah))
1172 + else if (AR_SREV_9462(ah))
1173 /* xxx only when MCI support is enabled */
1174 REG_WRITE(ah, AR_SELFGEN_MASK, 0x3);
1176 @@ -631,9 +631,7 @@ static void ar9003_hw_prog_ini(struct at
1177 static int ar9003_hw_process_ini(struct ath_hw *ah,
1178 struct ath9k_channel *chan)
1180 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
1181 unsigned int regWrites = 0, i;
1182 - struct ieee80211_channel *channel = chan->chan;
1185 switch (chan->chanmode) {
1186 @@ -664,7 +662,7 @@ static int ar9003_hw_process_ini(struct
1187 ar9003_hw_prog_ini(ah, &ah->iniMac[i], modesIndex);
1188 ar9003_hw_prog_ini(ah, &ah->iniBB[i], modesIndex);
1189 ar9003_hw_prog_ini(ah, &ah->iniRadio[i], modesIndex);
1190 - if (i == ATH_INI_POST && AR_SREV_9480_20(ah))
1191 + if (i == ATH_INI_POST && AR_SREV_9462_20(ah))
1192 ar9003_hw_prog_ini(ah,
1193 &ah->ini_radio_post_sys2ant,
1195 @@ -687,20 +685,27 @@ static int ar9003_hw_process_ini(struct
1196 if (AR_SREV_9340(ah) && !ah->is_clk_25mhz)
1197 REG_WRITE_ARRAY(&ah->iniModesAdditional_40M, 1, regWrites);
1199 - if (AR_SREV_9480(ah))
1200 + if (AR_SREV_9462(ah))
1201 ar9003_hw_prog_ini(ah, &ah->ini_BTCOEX_MAX_TXPWR, 1);
1203 + ah->modes_index = modesIndex;
1204 ar9003_hw_override_ini(ah);
1205 ar9003_hw_set_channel_regs(ah, chan);
1206 ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
1207 + ath9k_hw_apply_txpower(ah, chan);
1209 - /* Set TX power */
1210 - ah->eep_ops->set_txpower(ah, chan,
1211 - ath9k_regd_get_ctl(regulatory, chan),
1212 - channel->max_antenna_gain * 2,
1213 - channel->max_power * 2,
1214 - min((u32) MAX_RATE_POWER,
1215 - (u32) regulatory->power_limit), false);
1216 + if (AR_SREV_9462(ah)) {
1217 + if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0,
1218 + AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL))
1219 + ah->enabled_cals |= TX_IQ_CAL;
1221 + ah->enabled_cals &= ~TX_IQ_CAL;
1223 + if (REG_READ(ah, AR_PHY_CL_CAL_CTL) & AR_PHY_CL_CAL_ENABLE)
1224 + ah->enabled_cals |= TX_CL_CAL;
1226 + ah->enabled_cals &= ~TX_CL_CAL;
1231 @@ -1256,6 +1261,73 @@ static void ar9003_hw_antdiv_comb_conf_s
1232 REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval);
1235 +static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
1236 + struct ath9k_channel *chan,
1239 + unsigned int regWrites = 0;
1242 + switch (chan->chanmode) {
1244 + case CHANNEL_A_HT20:
1247 + case CHANNEL_A_HT40PLUS:
1248 + case CHANNEL_A_HT40MINUS:
1252 + case CHANNEL_G_HT20:
1256 + case CHANNEL_G_HT40PLUS:
1257 + case CHANNEL_G_HT40MINUS:
1265 + if (modesIndex == ah->modes_index) {
1266 + *ini_reloaded = false;
1270 + ar9003_hw_prog_ini(ah, &ah->iniSOC[ATH_INI_POST], modesIndex);
1271 + ar9003_hw_prog_ini(ah, &ah->iniMac[ATH_INI_POST], modesIndex);
1272 + ar9003_hw_prog_ini(ah, &ah->iniBB[ATH_INI_POST], modesIndex);
1273 + ar9003_hw_prog_ini(ah, &ah->iniRadio[ATH_INI_POST], modesIndex);
1274 + if (AR_SREV_9462_20(ah))
1275 + ar9003_hw_prog_ini(ah,
1276 + &ah->ini_radio_post_sys2ant,
1279 + REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
1282 + * For 5GHz channels requiring Fast Clock, apply
1283 + * different modal values.
1285 + if (IS_CHAN_A_FAST_CLOCK(ah, chan))
1286 + REG_WRITE_ARRAY(&ah->iniModesAdditional, modesIndex, regWrites);
1288 + if (AR_SREV_9330(ah))
1289 + REG_WRITE_ARRAY(&ah->iniModesAdditional, 1, regWrites);
1291 + if (AR_SREV_9340(ah) && !ah->is_clk_25mhz)
1292 + REG_WRITE_ARRAY(&ah->iniModesAdditional_40M, 1, regWrites);
1294 + ah->modes_index = modesIndex;
1295 + *ini_reloaded = true;
1298 + ar9003_hw_set_rfmode(ah, chan);
1302 void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
1304 struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
1305 @@ -1284,6 +1356,7 @@ void ar9003_hw_attach_phy_ops(struct ath
1306 priv_ops->do_getnf = ar9003_hw_do_getnf;
1307 priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs;
1308 priv_ops->set_radar_params = ar9003_hw_set_radar_params;
1309 + priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
1311 ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
1312 ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
1313 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
1314 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
1315 @@ -325,10 +325,10 @@
1317 #define AR_PHY_RX_OCGAIN (AR_AGC_BASE + 0x200)
1319 -#define AR_PHY_CCA_NOM_VAL_9300_2GHZ -110
1320 -#define AR_PHY_CCA_NOM_VAL_9300_5GHZ -115
1321 -#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ -125
1322 -#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ -125
1323 +#define AR_PHY_CCA_NOM_VAL_9300_2GHZ (AR_SREV_9462(ah) ? -127 : -110)
1324 +#define AR_PHY_CCA_NOM_VAL_9300_5GHZ (AR_SREV_9462(ah) ? -127 : -115)
1325 +#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ (AR_SREV_9462(ah) ? -127 : -125)
1326 +#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ (AR_SREV_9462(ah) ? -127 : -125)
1327 #define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -95
1328 #define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -100
1332 #define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300)
1334 +#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + AR_SREV_9485(ah) ? \
1336 #define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + AR_SREV_9485(ah) ? \
1338 #define AR_PHY_TX_IQCAL_START (AR_SM_BASE + AR_SREV_9485(ah) ? \
1340 (AR_SREV_9485(ah) ? \
1341 0x3d0 : 0x450) + ((_i) << 2))
1342 #define AR_PHY_RTT_CTRL (AR_SM_BASE + 0x380)
1343 -#define AR_PHY_RTT_TABLE_SW_INTF_B (AR_SM_BASE + 0x384)
1344 -#define AR_PHY_RTT_TABLE_SW_INTF_1_B0 (AR_SM_BASE + 0x388)
1346 #define AR_PHY_WATCHDOG_STATUS (AR_SM_BASE + 0x5c0)
1347 #define AR_PHY_WATCHDOG_CTL_1 (AR_SM_BASE + 0x5c4)
1349 #define AR_PHY_AIC_CTRL_1_B0 (AR_SM_BASE + 0x4b4)
1350 #define AR_PHY_AIC_CTRL_2_B0 (AR_SM_BASE + 0x4b8)
1351 #define AR_PHY_AIC_CTRL_3_B0 (AR_SM_BASE + 0x4bc)
1352 -#define AR_PHY_AIC_STAT_0_B0 (AR_SM_BASE + (AR_SREV_9480_10(ah) ? \
1353 +#define AR_PHY_AIC_STAT_0_B0 (AR_SM_BASE + (AR_SREV_9462_10(ah) ? \
1355 -#define AR_PHY_AIC_STAT_1_B0 (AR_SM_BASE + (AR_SREV_9480_10(ah) ? \
1356 +#define AR_PHY_AIC_STAT_1_B0 (AR_SM_BASE + (AR_SREV_9462_10(ah) ? \
1358 #define AR_PHY_AIC_CTRL_4_B0 (AR_SM_BASE + 0x4c0)
1359 #define AR_PHY_AIC_STAT_2_B0 (AR_SM_BASE + 0x4cc)
1361 #define AR_PHY_65NM_CH0_RXTX4 0x1610c
1363 #define AR_CH0_TOP (AR_SREV_9300(ah) ? 0x16288 : \
1364 - ((AR_SREV_9480(ah) ? 0x1628c : 0x16280)))
1365 + ((AR_SREV_9462(ah) ? 0x1628c : 0x16280)))
1366 #define AR_CH0_TOP_XPABIASLVL (0x300)
1367 #define AR_CH0_TOP_XPABIASLVL_S (8)
1371 #define AR_SWITCH_TABLE_COM_ALL (0xffff)
1372 #define AR_SWITCH_TABLE_COM_ALL_S (0)
1373 -#define AR_SWITCH_TABLE_COM_AR9480_ALL (0xffffff)
1374 -#define AR_SWITCH_TABLE_COM_AR9480_ALL_S (0)
1375 +#define AR_SWITCH_TABLE_COM_AR9462_ALL (0xffffff)
1376 +#define AR_SWITCH_TABLE_COM_AR9462_ALL_S (0)
1377 #define AR_SWITCH_TABLE_COM_SPDT (0x00f00000)
1378 #define AR_SWITCH_TABLE_COM_SPDT_ALL (0x0000fff0)
1379 #define AR_SWITCH_TABLE_COM_SPDT_ALL_S (4)
1380 @@ -679,11 +679,11 @@
1381 #define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000
1382 #define AR_CH0_XTAL_CAPOUTDAC_S 17
1384 -#define AR_PHY_PMU1 (AR_SREV_9480(ah) ? 0x16340 : 0x16c40)
1385 +#define AR_PHY_PMU1 (AR_SREV_9462(ah) ? 0x16340 : 0x16c40)
1386 #define AR_PHY_PMU1_PWD 0x1
1387 #define AR_PHY_PMU1_PWD_S 0
1389 -#define AR_PHY_PMU2 (AR_SREV_9480(ah) ? 0x16344 : 0x16c44)
1390 +#define AR_PHY_PMU2 (AR_SREV_9462(ah) ? 0x16344 : 0x16c44)
1391 #define AR_PHY_PMU2_PGM 0x00200000
1392 #define AR_PHY_PMU2_PGM_S 21
1394 @@ -823,6 +823,22 @@
1395 #define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x01000000
1396 #define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_S 24
1397 #define AR_PHY_CHANNEL_STATUS_RX_CLEAR 0x00000004
1398 +#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION 0x00000001
1399 +#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION_S 0
1400 +#define AR_PHY_RTT_CTRL_RESTORE_MASK 0x0000007E
1401 +#define AR_PHY_RTT_CTRL_RESTORE_MASK_S 1
1402 +#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE 0x00000080
1403 +#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE_S 7
1404 +#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS 0x00000001
1405 +#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_S 0
1406 +#define AR_PHY_RTT_SW_RTT_TABLE_WRITE 0x00000002
1407 +#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_S 1
1408 +#define AR_PHY_RTT_SW_RTT_TABLE_ADDR 0x0000001C
1409 +#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_S 2
1410 +#define AR_PHY_RTT_SW_RTT_TABLE_DATA 0xFFFFFFF0
1411 +#define AR_PHY_RTT_SW_RTT_TABLE_DATA_S 4
1412 +#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL 0x80000000
1413 +#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL_S 31
1414 #define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT 0x01fc0000
1415 #define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT_S 18
1416 #define AR_PHY_TX_IQCAL_START_DO_CAL 0x00000001
1418 #define AR_PHY_AIC_CTRL_0_B1 (AR_SM1_BASE + 0x4b0)
1419 #define AR_PHY_AIC_CTRL_1_B1 (AR_SM1_BASE + 0x4b4)
1420 #define AR_PHY_AIC_CTRL_2_B1 (AR_SM1_BASE + 0x4b8)
1421 -#define AR_PHY_AIC_STAT_0_B1 (AR_SM1_BASE + (AR_SREV_9480_10(ah) ? \
1422 +#define AR_PHY_AIC_STAT_0_B1 (AR_SM1_BASE + (AR_SREV_9462_10(ah) ? \
1424 -#define AR_PHY_AIC_STAT_1_B1 (AR_SM1_BASE + (AR_SREV_9480_10(ah) ? \
1425 +#define AR_PHY_AIC_STAT_1_B1 (AR_SM1_BASE + (AR_SREV_9462_10(ah) ? \
1427 #define AR_PHY_AIC_CTRL_4_B1 (AR_SM1_BASE + 0x4c0)
1428 #define AR_PHY_AIC_STAT_2_B1 (AR_SM1_BASE + 0x4cc)
1429 @@ -915,6 +931,10 @@
1430 #define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0)
1431 #define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4)
1433 +#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + (i) ? \
1434 + AR_SM1_BASE : AR_SM_BASE)
1435 +#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + (i) ? \
1436 + AR_SM1_BASE : AR_SM_BASE)
1438 * Channel 2 Register Map
1440 @@ -981,7 +1001,7 @@
1441 #define AR_GLB_BASE 0x20000
1442 #define AR_PHY_GLB_CONTROL (AR_GLB_BASE + 0x44)
1443 #define AR_GLB_SCRATCH(_ah) (AR_GLB_BASE + \
1444 - (AR_SREV_9480_20(_ah) ? 0x4c : 0x50))
1445 + (AR_SREV_9462_20(_ah) ? 0x4c : 0x50))
1446 #define AR_GLB_STATUS (AR_GLB_BASE + 0x48)
1450 +++ b/drivers/net/wireless/ath/ath9k/ar9003_rtt.c
1453 + * Copyright (c) 2010-2011 Atheros Communications Inc.
1455 + * Permission to use, copy, modify, and/or distribute this software for any
1456 + * purpose with or without fee is hereby granted, provided that the above
1457 + * copyright notice and this permission notice appear in all copies.
1459 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1460 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1461 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1462 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1463 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1464 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1465 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1469 +#include "ar9003_phy.h"
1471 +#define RTT_RESTORE_TIMEOUT 1000
1472 +#define RTT_ACCESS_TIMEOUT 100
1473 +#define RTT_BAD_VALUE 0x0bad0bad
1476 + * RTT (Radio Retention Table) hardware implementation information
1478 + * There is an internal table (i.e. the rtt) for each chain (or bank).
1479 + * Each table contains 6 entries and each entry is corresponding to
1480 + * a specific calibration parameter as depicted below.
1481 + * 0~2 - DC offset DAC calibration: loop, low, high (offsetI/Q_...)
1482 + * 3 - Filter cal (filterfc)
1483 + * 4 - RX gain settings
1484 + * 5 - Peak detector offset calibration (agc_caldac)
1487 +void ar9003_hw_rtt_enable(struct ath_hw *ah)
1489 + REG_WRITE(ah, AR_PHY_RTT_CTRL, 1);
1492 +void ar9003_hw_rtt_disable(struct ath_hw *ah)
1494 + REG_WRITE(ah, AR_PHY_RTT_CTRL, 0);
1497 +void ar9003_hw_rtt_set_mask(struct ath_hw *ah, u32 rtt_mask)
1499 + REG_RMW_FIELD(ah, AR_PHY_RTT_CTRL,
1500 + AR_PHY_RTT_CTRL_RESTORE_MASK, rtt_mask);
1503 +bool ar9003_hw_rtt_force_restore(struct ath_hw *ah)
1505 + if (!ath9k_hw_wait(ah, AR_PHY_RTT_CTRL,
1506 + AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE,
1507 + 0, RTT_RESTORE_TIMEOUT))
1510 + REG_RMW_FIELD(ah, AR_PHY_RTT_CTRL,
1511 + AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE, 1);
1513 + if (!ath9k_hw_wait(ah, AR_PHY_RTT_CTRL,
1514 + AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE,
1515 + 0, RTT_RESTORE_TIMEOUT))
1521 +static void ar9003_hw_rtt_load_hist_entry(struct ath_hw *ah, u8 chain,
1522 + u32 index, u32 data28)
1526 + val = SM(data28, AR_PHY_RTT_SW_RTT_TABLE_DATA);
1527 + REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain), val);
1529 + val = SM(0, AR_PHY_RTT_SW_RTT_TABLE_ACCESS) |
1530 + SM(1, AR_PHY_RTT_SW_RTT_TABLE_WRITE) |
1531 + SM(index, AR_PHY_RTT_SW_RTT_TABLE_ADDR);
1532 + REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
1535 + val |= SM(1, AR_PHY_RTT_SW_RTT_TABLE_ACCESS);
1536 + REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
1539 + if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain),
1540 + AR_PHY_RTT_SW_RTT_TABLE_ACCESS, 0,
1541 + RTT_ACCESS_TIMEOUT))
1544 + val &= ~SM(1, AR_PHY_RTT_SW_RTT_TABLE_WRITE);
1545 + REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
1548 + ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain),
1549 + AR_PHY_RTT_SW_RTT_TABLE_ACCESS, 0,
1550 + RTT_ACCESS_TIMEOUT);
1553 +void ar9003_hw_rtt_load_hist(struct ath_hw *ah, u8 chain, u32 *table)
1557 + for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++)
1558 + ar9003_hw_rtt_load_hist_entry(ah, chain, i, table[i]);
1561 +static int ar9003_hw_rtt_fill_hist_entry(struct ath_hw *ah, u8 chain, u32 index)
1565 + val = SM(0, AR_PHY_RTT_SW_RTT_TABLE_ACCESS) |
1566 + SM(0, AR_PHY_RTT_SW_RTT_TABLE_WRITE) |
1567 + SM(index, AR_PHY_RTT_SW_RTT_TABLE_ADDR);
1569 + REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
1572 + val |= SM(1, AR_PHY_RTT_SW_RTT_TABLE_ACCESS);
1573 + REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
1576 + if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain),
1577 + AR_PHY_RTT_SW_RTT_TABLE_ACCESS, 0,
1578 + RTT_ACCESS_TIMEOUT))
1579 + return RTT_BAD_VALUE;
1581 + val = REG_READ(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain));
1586 +void ar9003_hw_rtt_fill_hist(struct ath_hw *ah, u8 chain, u32 *table)
1590 + for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++)
1591 + table[i] = ar9003_hw_rtt_fill_hist_entry(ah, chain, i);
1594 +void ar9003_hw_rtt_clear_hist(struct ath_hw *ah)
1598 + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
1599 + if (!(ah->rxchainmask & (1 << i)))
1601 + for (j = 0; j < MAX_RTT_TABLE_ENTRY; j++)
1602 + ar9003_hw_rtt_load_hist_entry(ah, i, j, 0);
1606 +++ b/drivers/net/wireless/ath/ath9k/ar9003_rtt.h
1609 + * Copyright (c) 2010-2011 Atheros Communications Inc.
1611 + * Permission to use, copy, modify, and/or distribute this software for any
1612 + * purpose with or without fee is hereby granted, provided that the above
1613 + * copyright notice and this permission notice appear in all copies.
1615 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1616 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1617 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1618 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1619 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1620 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1621 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1624 +#ifndef AR9003_RTT_H
1625 +#define AR9003_RTT_H
1627 +void ar9003_hw_rtt_enable(struct ath_hw *ah);
1628 +void ar9003_hw_rtt_disable(struct ath_hw *ah);
1629 +void ar9003_hw_rtt_set_mask(struct ath_hw *ah, u32 rtt_mask);
1630 +bool ar9003_hw_rtt_force_restore(struct ath_hw *ah);
1631 +void ar9003_hw_rtt_load_hist(struct ath_hw *ah, u8 chain, u32 *table);
1632 +void ar9003_hw_rtt_fill_hist(struct ath_hw *ah, u8 chain, u32 *table);
1633 +void ar9003_hw_rtt_clear_hist(struct ath_hw *ah);
1637 +++ b/drivers/net/wireless/ath/ath9k/ar9462_1p0_initvals.h
1640 + * Copyright (c) 2010 Atheros Communications Inc.
1642 + * Permission to use, copy, modify, and/or distribute this software for any
1643 + * purpose with or without fee is hereby granted, provided that the above
1644 + * copyright notice and this permission notice appear in all copies.
1646 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1647 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1648 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1649 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1650 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1651 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1652 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1655 +#ifndef INITVALS_9462_1P0_H
1656 +#define INITVALS_9462_1P0_H
1660 +static const u32 ar9462_1p0_mac_core[][2] = {
1661 + /* Addr allmodes */
1662 + {0x00000008, 0x00000000},
1663 + {0x00000030, 0x00060085},
1664 + {0x00000034, 0x00000005},
1665 + {0x00000040, 0x00000000},
1666 + {0x00000044, 0x00000000},
1667 + {0x00000048, 0x00000008},
1668 + {0x0000004c, 0x00000010},
1669 + {0x00000050, 0x00000000},
1670 + {0x00001040, 0x002ffc0f},
1671 + {0x00001044, 0x002ffc0f},
1672 + {0x00001048, 0x002ffc0f},
1673 + {0x0000104c, 0x002ffc0f},
1674 + {0x00001050, 0x002ffc0f},
1675 + {0x00001054, 0x002ffc0f},
1676 + {0x00001058, 0x002ffc0f},
1677 + {0x0000105c, 0x002ffc0f},
1678 + {0x00001060, 0x002ffc0f},
1679 + {0x00001064, 0x002ffc0f},
1680 + {0x000010f0, 0x00000100},
1681 + {0x00001270, 0x00000000},
1682 + {0x000012b0, 0x00000000},
1683 + {0x000012f0, 0x00000000},
1684 + {0x0000143c, 0x00000000},
1685 + {0x0000147c, 0x00000000},
1686 + {0x00001810, 0x0f000003},
1687 + {0x00008000, 0x00000000},
1688 + {0x00008004, 0x00000000},
1689 + {0x00008008, 0x00000000},
1690 + {0x0000800c, 0x00000000},
1691 + {0x00008018, 0x00000000},
1692 + {0x00008020, 0x00000000},
1693 + {0x00008038, 0x00000000},
1694 + {0x0000803c, 0x00080000},
1695 + {0x00008040, 0x00000000},
1696 + {0x00008044, 0x00000000},
1697 + {0x00008048, 0x00000000},
1698 + {0x0000804c, 0xffffffff},
1699 + {0x00008050, 0xffffffff},
1700 + {0x00008054, 0x00000000},
1701 + {0x00008058, 0x00000000},
1702 + {0x0000805c, 0x000fc78f},
1703 + {0x00008060, 0x0000000f},
1704 + {0x00008064, 0x00000000},
1705 + {0x00008070, 0x00000310},
1706 + {0x00008074, 0x00000020},
1707 + {0x00008078, 0x00000000},
1708 + {0x0000809c, 0x0000000f},
1709 + {0x000080a0, 0x00000000},
1710 + {0x000080a4, 0x02ff0000},
1711 + {0x000080a8, 0x0e070605},
1712 + {0x000080ac, 0x0000000d},
1713 + {0x000080b0, 0x00000000},
1714 + {0x000080b4, 0x00000000},
1715 + {0x000080b8, 0x00000000},
1716 + {0x000080bc, 0x00000000},
1717 + {0x000080c0, 0x2a800000},
1718 + {0x000080c4, 0x06900168},
1719 + {0x000080c8, 0x13881c20},
1720 + {0x000080cc, 0x01f40000},
1721 + {0x000080d0, 0x00252500},
1722 + {0x000080d4, 0x00a00005},
1723 + {0x000080d8, 0x00400002},
1724 + {0x000080dc, 0x00000000},
1725 + {0x000080e0, 0xffffffff},
1726 + {0x000080e4, 0x0000ffff},
1727 + {0x000080e8, 0x3f3f3f3f},
1728 + {0x000080ec, 0x00000000},
1729 + {0x000080f0, 0x00000000},
1730 + {0x000080f4, 0x00000000},
1731 + {0x000080fc, 0x00020000},
1732 + {0x00008100, 0x00000000},
1733 + {0x00008108, 0x00000052},
1734 + {0x0000810c, 0x00000000},
1735 + {0x00008110, 0x00000000},
1736 + {0x00008114, 0x000007ff},
1737 + {0x00008118, 0x000000aa},
1738 + {0x0000811c, 0x00003210},
1739 + {0x00008124, 0x00000000},
1740 + {0x00008128, 0x00000000},
1741 + {0x0000812c, 0x00000000},
1742 + {0x00008130, 0x00000000},
1743 + {0x00008134, 0x00000000},
1744 + {0x00008138, 0x00000000},
1745 + {0x0000813c, 0x0000ffff},
1746 + {0x00008144, 0xffffffff},
1747 + {0x00008168, 0x00000000},
1748 + {0x0000816c, 0x00000000},
1749 + {0x00008170, 0x18486e00},
1750 + {0x00008174, 0x33332210},
1751 + {0x00008178, 0x00000000},
1752 + {0x0000817c, 0x00020000},
1753 + {0x000081c4, 0x33332210},
1754 + {0x000081c8, 0x00000000},
1755 + {0x000081cc, 0x00000000},
1756 + {0x000081d4, 0x00000000},
1757 + {0x000081ec, 0x00000000},
1758 + {0x000081f0, 0x00000000},
1759 + {0x000081f4, 0x00000000},
1760 + {0x000081f8, 0x00000000},
1761 + {0x000081fc, 0x00000000},
1762 + {0x00008240, 0x00100000},
1763 + {0x00008244, 0x0010f400},
1764 + {0x00008248, 0x00000800},
1765 + {0x0000824c, 0x0001e800},
1766 + {0x00008250, 0x00000000},
1767 + {0x00008254, 0x00000000},
1768 + {0x00008258, 0x00000000},
1769 + {0x0000825c, 0x40000000},
1770 + {0x00008260, 0x00080922},
1771 + {0x00008264, 0x99c00010},
1772 + {0x00008268, 0xffffffff},
1773 + {0x0000826c, 0x0000ffff},
1774 + {0x00008270, 0x00000000},
1775 + {0x00008274, 0x40000000},
1776 + {0x00008278, 0x003e4180},
1777 + {0x0000827c, 0x00000004},
1778 + {0x00008284, 0x0000002c},
1779 + {0x00008288, 0x0000002c},
1780 + {0x0000828c, 0x000000ff},
1781 + {0x00008294, 0x00000000},
1782 + {0x00008298, 0x00000000},
1783 + {0x0000829c, 0x00000000},
1784 + {0x00008300, 0x00000140},
1785 + {0x00008314, 0x00000000},
1786 + {0x0000831c, 0x0000010d},
1787 + {0x00008328, 0x00000000},
1788 + {0x0000832c, 0x0000001f},
1789 + {0x00008330, 0x00000302},
1790 + {0x00008334, 0x00000700},
1791 + {0x00008338, 0xffff0000},
1792 + {0x0000833c, 0x02400000},
1793 + {0x00008340, 0x000107ff},
1794 + {0x00008344, 0xaa48105b},
1795 + {0x00008348, 0x008f0000},
1796 + {0x0000835c, 0x00000000},
1797 + {0x00008360, 0xffffffff},
1798 + {0x00008364, 0xffffffff},
1799 + {0x00008368, 0x00000000},
1800 + {0x00008370, 0x00000000},
1801 + {0x00008374, 0x000000ff},
1802 + {0x00008378, 0x00000000},
1803 + {0x0000837c, 0x00000000},
1804 + {0x00008380, 0xffffffff},
1805 + {0x00008384, 0xffffffff},
1806 + {0x00008390, 0xffffffff},
1807 + {0x00008394, 0xffffffff},
1808 + {0x00008398, 0x00000000},
1809 + {0x0000839c, 0x00000000},
1810 + {0x000083a4, 0x0000fa14},
1811 + {0x000083a8, 0x000f0c00},
1812 + {0x000083ac, 0x33332210},
1813 + {0x000083b0, 0x33332210},
1814 + {0x000083b4, 0x33332210},
1815 + {0x000083b8, 0x33332210},
1816 + {0x000083bc, 0x00000000},
1817 + {0x000083c0, 0x00000000},
1818 + {0x000083c4, 0x00000000},
1819 + {0x000083c8, 0x00000000},
1820 + {0x000083cc, 0x00000200},
1821 + {0x000083d0, 0x000301ff},
1824 +static const u32 ar9462_1p0_baseband_core_txfir_coeff_japan_2484[][2] = {
1825 + /* Addr allmodes */
1826 + {0x0000a398, 0x00000000},
1827 + {0x0000a39c, 0x6f7f0301},
1828 + {0x0000a3a0, 0xca9228ee},
1831 +static const u32 ar9462_1p0_sys3ant[][2] = {
1832 + /* Addr allmodes */
1833 + {0x00063280, 0x00040807},
1834 + {0x00063284, 0x104ccccc},
1837 +static const u32 ar9462_pcie_phy_clkreq_enable_L1_1p0[][2] = {
1838 + /* Addr allmodes */
1839 + {0x00018c00, 0x10053e5e},
1840 + {0x00018c04, 0x000801d8},
1841 + {0x00018c08, 0x0000580c},
1844 +static const u32 ar9462_1p0_mac_core_emulation[][2] = {
1845 + /* Addr allmodes */
1846 + {0x00000030, 0x00060085},
1847 + {0x00000044, 0x00000008},
1848 + {0x0000805c, 0xffffc7ff},
1849 + {0x00008344, 0xaa4a105b},
1852 +static const u32 ar9462_common_rx_gain_table_ar9280_2p0_1p0[][2] = {
1853 + /* Addr allmodes */
1854 + {0x0000a000, 0x02000101},
1855 + {0x0000a004, 0x02000102},
1856 + {0x0000a008, 0x02000103},
1857 + {0x0000a00c, 0x02000104},
1858 + {0x0000a010, 0x02000200},
1859 + {0x0000a014, 0x02000201},
1860 + {0x0000a018, 0x02000202},
1861 + {0x0000a01c, 0x02000203},
1862 + {0x0000a020, 0x02000204},
1863 + {0x0000a024, 0x02000205},
1864 + {0x0000a028, 0x02000208},
1865 + {0x0000a02c, 0x02000302},
1866 + {0x0000a030, 0x02000303},
1867 + {0x0000a034, 0x02000304},
1868 + {0x0000a038, 0x02000400},
1869 + {0x0000a03c, 0x02010300},
1870 + {0x0000a040, 0x02010301},
1871 + {0x0000a044, 0x02010302},
1872 + {0x0000a048, 0x02000500},
1873 + {0x0000a04c, 0x02010400},
1874 + {0x0000a050, 0x02020300},
1875 + {0x0000a054, 0x02020301},
1876 + {0x0000a058, 0x02020302},
1877 + {0x0000a05c, 0x02020303},
1878 + {0x0000a060, 0x02020400},
1879 + {0x0000a064, 0x02030300},
1880 + {0x0000a068, 0x02030301},
1881 + {0x0000a06c, 0x02030302},
1882 + {0x0000a070, 0x02030303},
1883 + {0x0000a074, 0x02030400},
1884 + {0x0000a078, 0x02040300},
1885 + {0x0000a07c, 0x02040301},
1886 + {0x0000a080, 0x02040302},
1887 + {0x0000a084, 0x02040303},
1888 + {0x0000a088, 0x02030500},
1889 + {0x0000a08c, 0x02040400},
1890 + {0x0000a090, 0x02050203},
1891 + {0x0000a094, 0x02050204},
1892 + {0x0000a098, 0x02050205},
1893 + {0x0000a09c, 0x02040500},
1894 + {0x0000a0a0, 0x02050301},
1895 + {0x0000a0a4, 0x02050302},
1896 + {0x0000a0a8, 0x02050303},
1897 + {0x0000a0ac, 0x02050400},
1898 + {0x0000a0b0, 0x02050401},
1899 + {0x0000a0b4, 0x02050402},
1900 + {0x0000a0b8, 0x02050403},
1901 + {0x0000a0bc, 0x02050500},
1902 + {0x0000a0c0, 0x02050501},
1903 + {0x0000a0c4, 0x02050502},
1904 + {0x0000a0c8, 0x02050503},
1905 + {0x0000a0cc, 0x02050504},
1906 + {0x0000a0d0, 0x02050600},
1907 + {0x0000a0d4, 0x02050601},
1908 + {0x0000a0d8, 0x02050602},
1909 + {0x0000a0dc, 0x02050603},
1910 + {0x0000a0e0, 0x02050604},
1911 + {0x0000a0e4, 0x02050700},
1912 + {0x0000a0e8, 0x02050701},
1913 + {0x0000a0ec, 0x02050702},
1914 + {0x0000a0f0, 0x02050703},
1915 + {0x0000a0f4, 0x02050704},
1916 + {0x0000a0f8, 0x02050705},
1917 + {0x0000a0fc, 0x02050708},
1918 + {0x0000a100, 0x02050709},
1919 + {0x0000a104, 0x0205070a},
1920 + {0x0000a108, 0x0205070b},
1921 + {0x0000a10c, 0x0205070c},
1922 + {0x0000a110, 0x0205070d},
1923 + {0x0000a114, 0x02050710},
1924 + {0x0000a118, 0x02050711},
1925 + {0x0000a11c, 0x02050712},
1926 + {0x0000a120, 0x02050713},
1927 + {0x0000a124, 0x02050714},
1928 + {0x0000a128, 0x02050715},
1929 + {0x0000a12c, 0x02050730},
1930 + {0x0000a130, 0x02050731},
1931 + {0x0000a134, 0x02050732},
1932 + {0x0000a138, 0x02050733},
1933 + {0x0000a13c, 0x02050734},
1934 + {0x0000a140, 0x02050735},
1935 + {0x0000a144, 0x02050750},
1936 + {0x0000a148, 0x02050751},
1937 + {0x0000a14c, 0x02050752},
1938 + {0x0000a150, 0x02050753},
1939 + {0x0000a154, 0x02050754},
1940 + {0x0000a158, 0x02050755},
1941 + {0x0000a15c, 0x02050770},
1942 + {0x0000a160, 0x02050771},
1943 + {0x0000a164, 0x02050772},
1944 + {0x0000a168, 0x02050773},
1945 + {0x0000a16c, 0x02050774},
1946 + {0x0000a170, 0x02050775},
1947 + {0x0000a174, 0x00000776},
1948 + {0x0000a178, 0x00000776},
1949 + {0x0000a17c, 0x00000776},
1950 + {0x0000a180, 0x00000776},
1951 + {0x0000a184, 0x00000776},
1952 + {0x0000a188, 0x00000776},
1953 + {0x0000a18c, 0x00000776},
1954 + {0x0000a190, 0x00000776},
1955 + {0x0000a194, 0x00000776},
1956 + {0x0000a198, 0x00000776},
1957 + {0x0000a19c, 0x00000776},
1958 + {0x0000a1a0, 0x00000776},
1959 + {0x0000a1a4, 0x00000776},
1960 + {0x0000a1a8, 0x00000776},
1961 + {0x0000a1ac, 0x00000776},
1962 + {0x0000a1b0, 0x00000776},
1963 + {0x0000a1b4, 0x00000776},
1964 + {0x0000a1b8, 0x00000776},
1965 + {0x0000a1bc, 0x00000776},
1966 + {0x0000a1c0, 0x00000776},
1967 + {0x0000a1c4, 0x00000776},
1968 + {0x0000a1c8, 0x00000776},
1969 + {0x0000a1cc, 0x00000776},
1970 + {0x0000a1d0, 0x00000776},
1971 + {0x0000a1d4, 0x00000776},
1972 + {0x0000a1d8, 0x00000776},
1973 + {0x0000a1dc, 0x00000776},
1974 + {0x0000a1e0, 0x00000776},
1975 + {0x0000a1e4, 0x00000776},
1976 + {0x0000a1e8, 0x00000776},
1977 + {0x0000a1ec, 0x00000776},
1978 + {0x0000a1f0, 0x00000776},
1979 + {0x0000a1f4, 0x00000776},
1980 + {0x0000a1f8, 0x00000776},
1981 + {0x0000a1fc, 0x00000776},
1982 + {0x0000b000, 0x02000101},
1983 + {0x0000b004, 0x02000102},
1984 + {0x0000b008, 0x02000103},
1985 + {0x0000b00c, 0x02000104},
1986 + {0x0000b010, 0x02000200},
1987 + {0x0000b014, 0x02000201},
1988 + {0x0000b018, 0x02000202},
1989 + {0x0000b01c, 0x02000203},
1990 + {0x0000b020, 0x02000204},
1991 + {0x0000b024, 0x02000205},
1992 + {0x0000b028, 0x02000208},
1993 + {0x0000b02c, 0x02000302},
1994 + {0x0000b030, 0x02000303},
1995 + {0x0000b034, 0x02000304},
1996 + {0x0000b038, 0x02000400},
1997 + {0x0000b03c, 0x02010300},
1998 + {0x0000b040, 0x02010301},
1999 + {0x0000b044, 0x02010302},
2000 + {0x0000b048, 0x02000500},
2001 + {0x0000b04c, 0x02010400},
2002 + {0x0000b050, 0x02020300},
2003 + {0x0000b054, 0x02020301},
2004 + {0x0000b058, 0x02020302},
2005 + {0x0000b05c, 0x02020303},
2006 + {0x0000b060, 0x02020400},
2007 + {0x0000b064, 0x02030300},
2008 + {0x0000b068, 0x02030301},
2009 + {0x0000b06c, 0x02030302},
2010 + {0x0000b070, 0x02030303},
2011 + {0x0000b074, 0x02030400},
2012 + {0x0000b078, 0x02040300},
2013 + {0x0000b07c, 0x02040301},
2014 + {0x0000b080, 0x02040302},
2015 + {0x0000b084, 0x02040303},
2016 + {0x0000b088, 0x02030500},
2017 + {0x0000b08c, 0x02040400},
2018 + {0x0000b090, 0x02050203},
2019 + {0x0000b094, 0x02050204},
2020 + {0x0000b098, 0x02050205},
2021 + {0x0000b09c, 0x02040500},
2022 + {0x0000b0a0, 0x02050301},
2023 + {0x0000b0a4, 0x02050302},
2024 + {0x0000b0a8, 0x02050303},
2025 + {0x0000b0ac, 0x02050400},
2026 + {0x0000b0b0, 0x02050401},
2027 + {0x0000b0b4, 0x02050402},
2028 + {0x0000b0b8, 0x02050403},
2029 + {0x0000b0bc, 0x02050500},
2030 + {0x0000b0c0, 0x02050501},
2031 + {0x0000b0c4, 0x02050502},
2032 + {0x0000b0c8, 0x02050503},
2033 + {0x0000b0cc, 0x02050504},
2034 + {0x0000b0d0, 0x02050600},
2035 + {0x0000b0d4, 0x02050601},
2036 + {0x0000b0d8, 0x02050602},
2037 + {0x0000b0dc, 0x02050603},
2038 + {0x0000b0e0, 0x02050604},
2039 + {0x0000b0e4, 0x02050700},
2040 + {0x0000b0e8, 0x02050701},
2041 + {0x0000b0ec, 0x02050702},
2042 + {0x0000b0f0, 0x02050703},
2043 + {0x0000b0f4, 0x02050704},
2044 + {0x0000b0f8, 0x02050705},
2045 + {0x0000b0fc, 0x02050708},
2046 + {0x0000b100, 0x02050709},
2047 + {0x0000b104, 0x0205070a},
2048 + {0x0000b108, 0x0205070b},
2049 + {0x0000b10c, 0x0205070c},
2050 + {0x0000b110, 0x0205070d},
2051 + {0x0000b114, 0x02050710},
2052 + {0x0000b118, 0x02050711},
2053 + {0x0000b11c, 0x02050712},
2054 + {0x0000b120, 0x02050713},
2055 + {0x0000b124, 0x02050714},
2056 + {0x0000b128, 0x02050715},
2057 + {0x0000b12c, 0x02050730},
2058 + {0x0000b130, 0x02050731},
2059 + {0x0000b134, 0x02050732},
2060 + {0x0000b138, 0x02050733},
2061 + {0x0000b13c, 0x02050734},
2062 + {0x0000b140, 0x02050735},
2063 + {0x0000b144, 0x02050750},
2064 + {0x0000b148, 0x02050751},
2065 + {0x0000b14c, 0x02050752},
2066 + {0x0000b150, 0x02050753},
2067 + {0x0000b154, 0x02050754},
2068 + {0x0000b158, 0x02050755},
2069 + {0x0000b15c, 0x02050770},
2070 + {0x0000b160, 0x02050771},
2071 + {0x0000b164, 0x02050772},
2072 + {0x0000b168, 0x02050773},
2073 + {0x0000b16c, 0x02050774},
2074 + {0x0000b170, 0x02050775},
2075 + {0x0000b174, 0x00000776},
2076 + {0x0000b178, 0x00000776},
2077 + {0x0000b17c, 0x00000776},
2078 + {0x0000b180, 0x00000776},
2079 + {0x0000b184, 0x00000776},
2080 + {0x0000b188, 0x00000776},
2081 + {0x0000b18c, 0x00000776},
2082 + {0x0000b190, 0x00000776},
2083 + {0x0000b194, 0x00000776},
2084 + {0x0000b198, 0x00000776},
2085 + {0x0000b19c, 0x00000776},
2086 + {0x0000b1a0, 0x00000776},
2087 + {0x0000b1a4, 0x00000776},
2088 + {0x0000b1a8, 0x00000776},
2089 + {0x0000b1ac, 0x00000776},
2090 + {0x0000b1b0, 0x00000776},
2091 + {0x0000b1b4, 0x00000776},
2092 + {0x0000b1b8, 0x00000776},
2093 + {0x0000b1bc, 0x00000776},
2094 + {0x0000b1c0, 0x00000776},
2095 + {0x0000b1c4, 0x00000776},
2096 + {0x0000b1c8, 0x00000776},
2097 + {0x0000b1cc, 0x00000776},
2098 + {0x0000b1d0, 0x00000776},
2099 + {0x0000b1d4, 0x00000776},
2100 + {0x0000b1d8, 0x00000776},
2101 + {0x0000b1dc, 0x00000776},
2102 + {0x0000b1e0, 0x00000776},
2103 + {0x0000b1e4, 0x00000776},
2104 + {0x0000b1e8, 0x00000776},
2105 + {0x0000b1ec, 0x00000776},
2106 + {0x0000b1f0, 0x00000776},
2107 + {0x0000b1f4, 0x00000776},
2108 + {0x0000b1f8, 0x00000776},
2109 + {0x0000b1fc, 0x00000776},
2112 +static const u32 ar9200_ar9280_2p0_radio_core_1p0[][2] = {
2113 + /* Addr allmodes */
2114 + {0x00007800, 0x00040000},
2115 + {0x00007804, 0xdb005012},
2116 + {0x00007808, 0x04924914},
2117 + {0x0000780c, 0x21084210},
2118 + {0x00007810, 0x6d801300},
2119 + {0x00007814, 0x0019beff},
2120 + {0x00007818, 0x07e41000},
2121 + {0x0000781c, 0x00392000},
2122 + {0x00007820, 0x92592480},
2123 + {0x00007824, 0x00040000},
2124 + {0x00007828, 0xdb005012},
2125 + {0x0000782c, 0x04924914},
2126 + {0x00007830, 0x21084210},
2127 + {0x00007834, 0x6d801300},
2128 + {0x00007838, 0x0019beff},
2129 + {0x0000783c, 0x07e40000},
2130 + {0x00007840, 0x00392000},
2131 + {0x00007844, 0x92592480},
2132 + {0x00007848, 0x00100000},
2133 + {0x0000784c, 0x773f0567},
2134 + {0x00007850, 0x54214514},
2135 + {0x00007854, 0x12035828},
2136 + {0x00007858, 0x92592692},
2137 + {0x0000785c, 0x00000000},
2138 + {0x00007860, 0x56400000},
2139 + {0x00007864, 0x0a8e370e},
2140 + {0x00007868, 0xc0102850},
2141 + {0x0000786c, 0x812d4000},
2142 + {0x00007870, 0x807ec400},
2143 + {0x00007874, 0x001b6db0},
2144 + {0x00007878, 0x00376b63},
2145 + {0x0000787c, 0x06db6db6},
2146 + {0x00007880, 0x006d8000},
2147 + {0x00007884, 0xffeffffe},
2148 + {0x00007888, 0xffeffffe},
2149 + {0x0000788c, 0x00010000},
2150 + {0x00007890, 0x02060aeb},
2151 + {0x00007894, 0x5a108000},
2154 +static const u32 ar9462_1p0_baseband_postamble_emulation[][5] = {
2155 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2156 + {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2157 + {0x00009e3c, 0xcf946221, 0xcf946221, 0xcf946221, 0xcf946221},
2158 + {0x00009e44, 0x005c0000, 0x005c0000, 0x005c0000, 0x005c0000},
2159 + {0x0000a258, 0x02020200, 0x02020200, 0x02020200, 0x02020200},
2160 + {0x0000a25c, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
2161 + {0x0000a28c, 0x00011111, 0x00011111, 0x00011111, 0x00011111},
2162 + {0x0000a2c4, 0x00148d18, 0x00148d18, 0x00148d20, 0x00148d20},
2163 + {0x0000a2d8, 0xf999a800, 0xf999a800, 0xf999a80c, 0xf999a80c},
2164 + {0x0000a50c, 0x0000c00a, 0x0000c00a, 0x0000c00a, 0x0000c00a},
2165 + {0x0000a538, 0x00038e8c, 0x00038e8c, 0x00038e8c, 0x00038e8c},
2166 + {0x0000a53c, 0x0003cecc, 0x0003cecc, 0x0003cecc, 0x0003cecc},
2167 + {0x0000a540, 0x00040ed4, 0x00040ed4, 0x00040ed4, 0x00040ed4},
2168 + {0x0000a544, 0x00044edc, 0x00044edc, 0x00044edc, 0x00044edc},
2169 + {0x0000a548, 0x00048ede, 0x00048ede, 0x00048ede, 0x00048ede},
2170 + {0x0000a54c, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e},
2171 + {0x0000a550, 0x00050f5e, 0x00050f5e, 0x00050f5e, 0x00050f5e},
2172 + {0x0000a554, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e},
2173 + {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2176 +static const u32 ar9462_pcie_phy_pll_on_clkreq_disable_L1_1p0[][2] = {
2177 + /* Addr allmodes */
2178 + {0x00018c00, 0x10012e5e},
2179 + {0x00018c04, 0x000801d8},
2180 + {0x00018c08, 0x0000580c},
2183 +static const u32 ar9462_common_rx_gain_table_1p0[][2] = {
2184 + /* Addr allmodes */
2185 + {0x0000a000, 0x00010000},
2186 + {0x0000a004, 0x00030002},
2187 + {0x0000a008, 0x00050004},
2188 + {0x0000a00c, 0x00810080},
2189 + {0x0000a010, 0x00830082},
2190 + {0x0000a014, 0x01810180},
2191 + {0x0000a018, 0x01830182},
2192 + {0x0000a01c, 0x01850184},
2193 + {0x0000a020, 0x01890188},
2194 + {0x0000a024, 0x018b018a},
2195 + {0x0000a028, 0x018d018c},
2196 + {0x0000a02c, 0x01910190},
2197 + {0x0000a030, 0x01930192},
2198 + {0x0000a034, 0x01950194},
2199 + {0x0000a038, 0x038a0196},
2200 + {0x0000a03c, 0x038c038b},
2201 + {0x0000a040, 0x0390038d},
2202 + {0x0000a044, 0x03920391},
2203 + {0x0000a048, 0x03940393},
2204 + {0x0000a04c, 0x03960395},
2205 + {0x0000a050, 0x00000000},
2206 + {0x0000a054, 0x00000000},
2207 + {0x0000a058, 0x00000000},
2208 + {0x0000a05c, 0x00000000},
2209 + {0x0000a060, 0x00000000},
2210 + {0x0000a064, 0x00000000},
2211 + {0x0000a068, 0x00000000},
2212 + {0x0000a06c, 0x00000000},
2213 + {0x0000a070, 0x00000000},
2214 + {0x0000a074, 0x00000000},
2215 + {0x0000a078, 0x00000000},
2216 + {0x0000a07c, 0x00000000},
2217 + {0x0000a080, 0x22222229},
2218 + {0x0000a084, 0x1d1d1d1d},
2219 + {0x0000a088, 0x1d1d1d1d},
2220 + {0x0000a08c, 0x1d1d1d1d},
2221 + {0x0000a090, 0x171d1d1d},
2222 + {0x0000a094, 0x11111717},
2223 + {0x0000a098, 0x00030311},
2224 + {0x0000a09c, 0x00000000},
2225 + {0x0000a0a0, 0x00000000},
2226 + {0x0000a0a4, 0x00000000},
2227 + {0x0000a0a8, 0x00000000},
2228 + {0x0000a0ac, 0x00000000},
2229 + {0x0000a0b0, 0x00000000},
2230 + {0x0000a0b4, 0x00000000},
2231 + {0x0000a0b8, 0x00000000},
2232 + {0x0000a0bc, 0x00000000},
2233 + {0x0000a0c0, 0x001f0000},
2234 + {0x0000a0c4, 0x01000101},
2235 + {0x0000a0c8, 0x011e011f},
2236 + {0x0000a0cc, 0x011c011d},
2237 + {0x0000a0d0, 0x02030204},
2238 + {0x0000a0d4, 0x02010202},
2239 + {0x0000a0d8, 0x021f0200},
2240 + {0x0000a0dc, 0x0302021e},
2241 + {0x0000a0e0, 0x03000301},
2242 + {0x0000a0e4, 0x031e031f},
2243 + {0x0000a0e8, 0x0402031d},
2244 + {0x0000a0ec, 0x04000401},
2245 + {0x0000a0f0, 0x041e041f},
2246 + {0x0000a0f4, 0x0502041d},
2247 + {0x0000a0f8, 0x05000501},
2248 + {0x0000a0fc, 0x051e051f},
2249 + {0x0000a100, 0x06010602},
2250 + {0x0000a104, 0x061f0600},
2251 + {0x0000a108, 0x061d061e},
2252 + {0x0000a10c, 0x07020703},
2253 + {0x0000a110, 0x07000701},
2254 + {0x0000a114, 0x00000000},
2255 + {0x0000a118, 0x00000000},
2256 + {0x0000a11c, 0x00000000},
2257 + {0x0000a120, 0x00000000},
2258 + {0x0000a124, 0x00000000},
2259 + {0x0000a128, 0x00000000},
2260 + {0x0000a12c, 0x00000000},
2261 + {0x0000a130, 0x00000000},
2262 + {0x0000a134, 0x00000000},
2263 + {0x0000a138, 0x00000000},
2264 + {0x0000a13c, 0x00000000},
2265 + {0x0000a140, 0x001f0000},
2266 + {0x0000a144, 0x01000101},
2267 + {0x0000a148, 0x011e011f},
2268 + {0x0000a14c, 0x011c011d},
2269 + {0x0000a150, 0x02030204},
2270 + {0x0000a154, 0x02010202},
2271 + {0x0000a158, 0x021f0200},
2272 + {0x0000a15c, 0x0302021e},
2273 + {0x0000a160, 0x03000301},
2274 + {0x0000a164, 0x031e031f},
2275 + {0x0000a168, 0x0402031d},
2276 + {0x0000a16c, 0x04000401},
2277 + {0x0000a170, 0x041e041f},
2278 + {0x0000a174, 0x0502041d},
2279 + {0x0000a178, 0x05000501},
2280 + {0x0000a17c, 0x051e051f},
2281 + {0x0000a180, 0x06010602},
2282 + {0x0000a184, 0x061f0600},
2283 + {0x0000a188, 0x061d061e},
2284 + {0x0000a18c, 0x07020703},
2285 + {0x0000a190, 0x07000701},
2286 + {0x0000a194, 0x00000000},
2287 + {0x0000a198, 0x00000000},
2288 + {0x0000a19c, 0x00000000},
2289 + {0x0000a1a0, 0x00000000},
2290 + {0x0000a1a4, 0x00000000},
2291 + {0x0000a1a8, 0x00000000},
2292 + {0x0000a1ac, 0x00000000},
2293 + {0x0000a1b0, 0x00000000},
2294 + {0x0000a1b4, 0x00000000},
2295 + {0x0000a1b8, 0x00000000},
2296 + {0x0000a1bc, 0x00000000},
2297 + {0x0000a1c0, 0x00000000},
2298 + {0x0000a1c4, 0x00000000},
2299 + {0x0000a1c8, 0x00000000},
2300 + {0x0000a1cc, 0x00000000},
2301 + {0x0000a1d0, 0x00000000},
2302 + {0x0000a1d4, 0x00000000},
2303 + {0x0000a1d8, 0x00000000},
2304 + {0x0000a1dc, 0x00000000},
2305 + {0x0000a1e0, 0x00000000},
2306 + {0x0000a1e4, 0x00000000},
2307 + {0x0000a1e8, 0x00000000},
2308 + {0x0000a1ec, 0x00000000},
2309 + {0x0000a1f0, 0x00000396},
2310 + {0x0000a1f4, 0x00000396},
2311 + {0x0000a1f8, 0x00000396},
2312 + {0x0000a1fc, 0x00000196},
2313 + {0x0000b000, 0x00010000},
2314 + {0x0000b004, 0x00030002},
2315 + {0x0000b008, 0x00050004},
2316 + {0x0000b00c, 0x00810080},
2317 + {0x0000b010, 0x00830082},
2318 + {0x0000b014, 0x01810180},
2319 + {0x0000b018, 0x01830182},
2320 + {0x0000b01c, 0x01850184},
2321 + {0x0000b020, 0x02810280},
2322 + {0x0000b024, 0x02830282},
2323 + {0x0000b028, 0x02850284},
2324 + {0x0000b02c, 0x02890288},
2325 + {0x0000b030, 0x028b028a},
2326 + {0x0000b034, 0x0388028c},
2327 + {0x0000b038, 0x038a0389},
2328 + {0x0000b03c, 0x038c038b},
2329 + {0x0000b040, 0x0390038d},
2330 + {0x0000b044, 0x03920391},
2331 + {0x0000b048, 0x03940393},
2332 + {0x0000b04c, 0x03960395},
2333 + {0x0000b050, 0x00000000},
2334 + {0x0000b054, 0x00000000},
2335 + {0x0000b058, 0x00000000},
2336 + {0x0000b05c, 0x00000000},
2337 + {0x0000b060, 0x00000000},
2338 + {0x0000b064, 0x00000000},
2339 + {0x0000b068, 0x00000000},
2340 + {0x0000b06c, 0x00000000},
2341 + {0x0000b070, 0x00000000},
2342 + {0x0000b074, 0x00000000},
2343 + {0x0000b078, 0x00000000},
2344 + {0x0000b07c, 0x00000000},
2345 + {0x0000b080, 0x2a2d2f32},
2346 + {0x0000b084, 0x21232328},
2347 + {0x0000b088, 0x19191c1e},
2348 + {0x0000b08c, 0x12141417},
2349 + {0x0000b090, 0x07070e0e},
2350 + {0x0000b094, 0x03030305},
2351 + {0x0000b098, 0x00000003},
2352 + {0x0000b09c, 0x00000000},
2353 + {0x0000b0a0, 0x00000000},
2354 + {0x0000b0a4, 0x00000000},
2355 + {0x0000b0a8, 0x00000000},
2356 + {0x0000b0ac, 0x00000000},
2357 + {0x0000b0b0, 0x00000000},
2358 + {0x0000b0b4, 0x00000000},
2359 + {0x0000b0b8, 0x00000000},
2360 + {0x0000b0bc, 0x00000000},
2361 + {0x0000b0c0, 0x003f0020},
2362 + {0x0000b0c4, 0x00400041},
2363 + {0x0000b0c8, 0x0140005f},
2364 + {0x0000b0cc, 0x0160015f},
2365 + {0x0000b0d0, 0x017e017f},
2366 + {0x0000b0d4, 0x02410242},
2367 + {0x0000b0d8, 0x025f0240},
2368 + {0x0000b0dc, 0x027f0260},
2369 + {0x0000b0e0, 0x0341027e},
2370 + {0x0000b0e4, 0x035f0340},
2371 + {0x0000b0e8, 0x037f0360},
2372 + {0x0000b0ec, 0x04400441},
2373 + {0x0000b0f0, 0x0460045f},
2374 + {0x0000b0f4, 0x0541047f},
2375 + {0x0000b0f8, 0x055f0540},
2376 + {0x0000b0fc, 0x057f0560},
2377 + {0x0000b100, 0x06400641},
2378 + {0x0000b104, 0x0660065f},
2379 + {0x0000b108, 0x067e067f},
2380 + {0x0000b10c, 0x07410742},
2381 + {0x0000b110, 0x075f0740},
2382 + {0x0000b114, 0x077f0760},
2383 + {0x0000b118, 0x07800781},
2384 + {0x0000b11c, 0x07a0079f},
2385 + {0x0000b120, 0x07c107bf},
2386 + {0x0000b124, 0x000007c0},
2387 + {0x0000b128, 0x00000000},
2388 + {0x0000b12c, 0x00000000},
2389 + {0x0000b130, 0x00000000},
2390 + {0x0000b134, 0x00000000},
2391 + {0x0000b138, 0x00000000},
2392 + {0x0000b13c, 0x00000000},
2393 + {0x0000b140, 0x003f0020},
2394 + {0x0000b144, 0x00400041},
2395 + {0x0000b148, 0x0140005f},
2396 + {0x0000b14c, 0x0160015f},
2397 + {0x0000b150, 0x017e017f},
2398 + {0x0000b154, 0x02410242},
2399 + {0x0000b158, 0x025f0240},
2400 + {0x0000b15c, 0x027f0260},
2401 + {0x0000b160, 0x0341027e},
2402 + {0x0000b164, 0x035f0340},
2403 + {0x0000b168, 0x037f0360},
2404 + {0x0000b16c, 0x04400441},
2405 + {0x0000b170, 0x0460045f},
2406 + {0x0000b174, 0x0541047f},
2407 + {0x0000b178, 0x055f0540},
2408 + {0x0000b17c, 0x057f0560},
2409 + {0x0000b180, 0x06400641},
2410 + {0x0000b184, 0x0660065f},
2411 + {0x0000b188, 0x067e067f},
2412 + {0x0000b18c, 0x07410742},
2413 + {0x0000b190, 0x075f0740},
2414 + {0x0000b194, 0x077f0760},
2415 + {0x0000b198, 0x07800781},
2416 + {0x0000b19c, 0x07a0079f},
2417 + {0x0000b1a0, 0x07c107bf},
2418 + {0x0000b1a4, 0x000007c0},
2419 + {0x0000b1a8, 0x00000000},
2420 + {0x0000b1ac, 0x00000000},
2421 + {0x0000b1b0, 0x00000000},
2422 + {0x0000b1b4, 0x00000000},
2423 + {0x0000b1b8, 0x00000000},
2424 + {0x0000b1bc, 0x00000000},
2425 + {0x0000b1c0, 0x00000000},
2426 + {0x0000b1c4, 0x00000000},
2427 + {0x0000b1c8, 0x00000000},
2428 + {0x0000b1cc, 0x00000000},
2429 + {0x0000b1d0, 0x00000000},
2430 + {0x0000b1d4, 0x00000000},
2431 + {0x0000b1d8, 0x00000000},
2432 + {0x0000b1dc, 0x00000000},
2433 + {0x0000b1e0, 0x00000000},
2434 + {0x0000b1e4, 0x00000000},
2435 + {0x0000b1e8, 0x00000000},
2436 + {0x0000b1ec, 0x00000000},
2437 + {0x0000b1f0, 0x00000396},
2438 + {0x0000b1f4, 0x00000396},
2439 + {0x0000b1f8, 0x00000396},
2440 + {0x0000b1fc, 0x00000196},
2443 +static const u32 ar9462_modes_high_ob_db_tx_gain_table_1p0[][5] = {
2444 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2445 + {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
2446 + {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
2447 + {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
2448 + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
2449 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
2450 + {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
2451 + {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002},
2452 + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
2453 + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
2454 + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
2455 + {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
2456 + {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
2457 + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
2458 + {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
2459 + {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
2460 + {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
2461 + {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
2462 + {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20},
2463 + {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22},
2464 + {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24},
2465 + {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640},
2466 + {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660},
2467 + {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861},
2468 + {0x0000a548, 0x53025eb2, 0x53025eb2, 0x3e001a81, 0x3e001a81},
2469 + {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
2470 + {0x0000a550, 0x5f025ef6, 0x5f025ef6, 0x44001c84, 0x44001c84},
2471 + {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3},
2472 + {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5},
2473 + {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9},
2474 + {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb},
2475 + {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2476 + {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2477 + {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2478 + {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2479 + {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2480 + {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2481 + {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
2482 + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2483 + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2484 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2485 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2486 + {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
2487 + {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
2488 + {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
2489 + {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
2490 + {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
2491 + {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
2492 + {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
2493 + {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
2494 + {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
2495 + {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
2496 + {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
2497 + {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
2498 + {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
2499 + {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
2500 + {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
2501 + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
2502 + {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
2503 + {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060},
2504 + {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
2505 + {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
2508 +static const u32 ar9462_common_wo_xlna_rx_gain_table_1p0[][2] = {
2509 + /* Addr allmodes */
2510 + {0x0000a000, 0x00010000},
2511 + {0x0000a004, 0x00030002},
2512 + {0x0000a008, 0x00050004},
2513 + {0x0000a00c, 0x00810080},
2514 + {0x0000a010, 0x00830082},
2515 + {0x0000a014, 0x01810180},
2516 + {0x0000a018, 0x01830182},
2517 + {0x0000a01c, 0x01850184},
2518 + {0x0000a020, 0x01890188},
2519 + {0x0000a024, 0x018b018a},
2520 + {0x0000a028, 0x018d018c},
2521 + {0x0000a02c, 0x03820190},
2522 + {0x0000a030, 0x03840383},
2523 + {0x0000a034, 0x03880385},
2524 + {0x0000a038, 0x038a0389},
2525 + {0x0000a03c, 0x038c038b},
2526 + {0x0000a040, 0x0390038d},
2527 + {0x0000a044, 0x03920391},
2528 + {0x0000a048, 0x03940393},
2529 + {0x0000a04c, 0x03960395},
2530 + {0x0000a050, 0x00000000},
2531 + {0x0000a054, 0x00000000},
2532 + {0x0000a058, 0x00000000},
2533 + {0x0000a05c, 0x00000000},
2534 + {0x0000a060, 0x00000000},
2535 + {0x0000a064, 0x00000000},
2536 + {0x0000a068, 0x00000000},
2537 + {0x0000a06c, 0x00000000},
2538 + {0x0000a070, 0x00000000},
2539 + {0x0000a074, 0x00000000},
2540 + {0x0000a078, 0x00000000},
2541 + {0x0000a07c, 0x00000000},
2542 + {0x0000a080, 0x29292929},
2543 + {0x0000a084, 0x29292929},
2544 + {0x0000a088, 0x29292929},
2545 + {0x0000a08c, 0x29292929},
2546 + {0x0000a090, 0x22292929},
2547 + {0x0000a094, 0x1d1d2222},
2548 + {0x0000a098, 0x0c111117},
2549 + {0x0000a09c, 0x00030303},
2550 + {0x0000a0a0, 0x00000000},
2551 + {0x0000a0a4, 0x00000000},
2552 + {0x0000a0a8, 0x00000000},
2553 + {0x0000a0ac, 0x00000000},
2554 + {0x0000a0b0, 0x00000000},
2555 + {0x0000a0b4, 0x00000000},
2556 + {0x0000a0b8, 0x00000000},
2557 + {0x0000a0bc, 0x00000000},
2558 + {0x0000a0c0, 0x001f0000},
2559 + {0x0000a0c4, 0x01000101},
2560 + {0x0000a0c8, 0x011e011f},
2561 + {0x0000a0cc, 0x011c011d},
2562 + {0x0000a0d0, 0x02030204},
2563 + {0x0000a0d4, 0x02010202},
2564 + {0x0000a0d8, 0x021f0200},
2565 + {0x0000a0dc, 0x0302021e},
2566 + {0x0000a0e0, 0x03000301},
2567 + {0x0000a0e4, 0x031e031f},
2568 + {0x0000a0e8, 0x0402031d},
2569 + {0x0000a0ec, 0x04000401},
2570 + {0x0000a0f0, 0x041e041f},
2571 + {0x0000a0f4, 0x0502041d},
2572 + {0x0000a0f8, 0x05000501},
2573 + {0x0000a0fc, 0x051e051f},
2574 + {0x0000a100, 0x06010602},
2575 + {0x0000a104, 0x061f0600},
2576 + {0x0000a108, 0x061d061e},
2577 + {0x0000a10c, 0x07020703},
2578 + {0x0000a110, 0x07000701},
2579 + {0x0000a114, 0x00000000},
2580 + {0x0000a118, 0x00000000},
2581 + {0x0000a11c, 0x00000000},
2582 + {0x0000a120, 0x00000000},
2583 + {0x0000a124, 0x00000000},
2584 + {0x0000a128, 0x00000000},
2585 + {0x0000a12c, 0x00000000},
2586 + {0x0000a130, 0x00000000},
2587 + {0x0000a134, 0x00000000},
2588 + {0x0000a138, 0x00000000},
2589 + {0x0000a13c, 0x00000000},
2590 + {0x0000a140, 0x001f0000},
2591 + {0x0000a144, 0x01000101},
2592 + {0x0000a148, 0x011e011f},
2593 + {0x0000a14c, 0x011c011d},
2594 + {0x0000a150, 0x02030204},
2595 + {0x0000a154, 0x02010202},
2596 + {0x0000a158, 0x021f0200},
2597 + {0x0000a15c, 0x0302021e},
2598 + {0x0000a160, 0x03000301},
2599 + {0x0000a164, 0x031e031f},
2600 + {0x0000a168, 0x0402031d},
2601 + {0x0000a16c, 0x04000401},
2602 + {0x0000a170, 0x041e041f},
2603 + {0x0000a174, 0x0502041d},
2604 + {0x0000a178, 0x05000501},
2605 + {0x0000a17c, 0x051e051f},
2606 + {0x0000a180, 0x06010602},
2607 + {0x0000a184, 0x061f0600},
2608 + {0x0000a188, 0x061d061e},
2609 + {0x0000a18c, 0x07020703},
2610 + {0x0000a190, 0x07000701},
2611 + {0x0000a194, 0x00000000},
2612 + {0x0000a198, 0x00000000},
2613 + {0x0000a19c, 0x00000000},
2614 + {0x0000a1a0, 0x00000000},
2615 + {0x0000a1a4, 0x00000000},
2616 + {0x0000a1a8, 0x00000000},
2617 + {0x0000a1ac, 0x00000000},
2618 + {0x0000a1b0, 0x00000000},
2619 + {0x0000a1b4, 0x00000000},
2620 + {0x0000a1b8, 0x00000000},
2621 + {0x0000a1bc, 0x00000000},
2622 + {0x0000a1c0, 0x00000000},
2623 + {0x0000a1c4, 0x00000000},
2624 + {0x0000a1c8, 0x00000000},
2625 + {0x0000a1cc, 0x00000000},
2626 + {0x0000a1d0, 0x00000000},
2627 + {0x0000a1d4, 0x00000000},
2628 + {0x0000a1d8, 0x00000000},
2629 + {0x0000a1dc, 0x00000000},
2630 + {0x0000a1e0, 0x00000000},
2631 + {0x0000a1e4, 0x00000000},
2632 + {0x0000a1e8, 0x00000000},
2633 + {0x0000a1ec, 0x00000000},
2634 + {0x0000a1f0, 0x00000396},
2635 + {0x0000a1f4, 0x00000396},
2636 + {0x0000a1f8, 0x00000396},
2637 + {0x0000a1fc, 0x00000196},
2638 + {0x0000b000, 0x00010000},
2639 + {0x0000b004, 0x00030002},
2640 + {0x0000b008, 0x00050004},
2641 + {0x0000b00c, 0x00810080},
2642 + {0x0000b010, 0x00830082},
2643 + {0x0000b014, 0x01810180},
2644 + {0x0000b018, 0x01830182},
2645 + {0x0000b01c, 0x01850184},
2646 + {0x0000b020, 0x02810280},
2647 + {0x0000b024, 0x02830282},
2648 + {0x0000b028, 0x02850284},
2649 + {0x0000b02c, 0x02890288},
2650 + {0x0000b030, 0x028b028a},
2651 + {0x0000b034, 0x0388028c},
2652 + {0x0000b038, 0x038a0389},
2653 + {0x0000b03c, 0x038c038b},
2654 + {0x0000b040, 0x0390038d},
2655 + {0x0000b044, 0x03920391},
2656 + {0x0000b048, 0x03940393},
2657 + {0x0000b04c, 0x03960395},
2658 + {0x0000b050, 0x00000000},
2659 + {0x0000b054, 0x00000000},
2660 + {0x0000b058, 0x00000000},
2661 + {0x0000b05c, 0x00000000},
2662 + {0x0000b060, 0x00000000},
2663 + {0x0000b064, 0x00000000},
2664 + {0x0000b068, 0x00000000},
2665 + {0x0000b06c, 0x00000000},
2666 + {0x0000b070, 0x00000000},
2667 + {0x0000b074, 0x00000000},
2668 + {0x0000b078, 0x00000000},
2669 + {0x0000b07c, 0x00000000},
2670 + {0x0000b080, 0x32323232},
2671 + {0x0000b084, 0x2f2f3232},
2672 + {0x0000b088, 0x23282a2d},
2673 + {0x0000b08c, 0x1c1e2123},
2674 + {0x0000b090, 0x14171919},
2675 + {0x0000b094, 0x0e0e1214},
2676 + {0x0000b098, 0x03050707},
2677 + {0x0000b09c, 0x00030303},
2678 + {0x0000b0a0, 0x00000000},
2679 + {0x0000b0a4, 0x00000000},
2680 + {0x0000b0a8, 0x00000000},
2681 + {0x0000b0ac, 0x00000000},
2682 + {0x0000b0b0, 0x00000000},
2683 + {0x0000b0b4, 0x00000000},
2684 + {0x0000b0b8, 0x00000000},
2685 + {0x0000b0bc, 0x00000000},
2686 + {0x0000b0c0, 0x003f0020},
2687 + {0x0000b0c4, 0x00400041},
2688 + {0x0000b0c8, 0x0140005f},
2689 + {0x0000b0cc, 0x0160015f},
2690 + {0x0000b0d0, 0x017e017f},
2691 + {0x0000b0d4, 0x02410242},
2692 + {0x0000b0d8, 0x025f0240},
2693 + {0x0000b0dc, 0x027f0260},
2694 + {0x0000b0e0, 0x0341027e},
2695 + {0x0000b0e4, 0x035f0340},
2696 + {0x0000b0e8, 0x037f0360},
2697 + {0x0000b0ec, 0x04400441},
2698 + {0x0000b0f0, 0x0460045f},
2699 + {0x0000b0f4, 0x0541047f},
2700 + {0x0000b0f8, 0x055f0540},
2701 + {0x0000b0fc, 0x057f0560},
2702 + {0x0000b100, 0x06400641},
2703 + {0x0000b104, 0x0660065f},
2704 + {0x0000b108, 0x067e067f},
2705 + {0x0000b10c, 0x07410742},
2706 + {0x0000b110, 0x075f0740},
2707 + {0x0000b114, 0x077f0760},
2708 + {0x0000b118, 0x07800781},
2709 + {0x0000b11c, 0x07a0079f},
2710 + {0x0000b120, 0x07c107bf},
2711 + {0x0000b124, 0x000007c0},
2712 + {0x0000b128, 0x00000000},
2713 + {0x0000b12c, 0x00000000},
2714 + {0x0000b130, 0x00000000},
2715 + {0x0000b134, 0x00000000},
2716 + {0x0000b138, 0x00000000},
2717 + {0x0000b13c, 0x00000000},
2718 + {0x0000b140, 0x003f0020},
2719 + {0x0000b144, 0x00400041},
2720 + {0x0000b148, 0x0140005f},
2721 + {0x0000b14c, 0x0160015f},
2722 + {0x0000b150, 0x017e017f},
2723 + {0x0000b154, 0x02410242},
2724 + {0x0000b158, 0x025f0240},
2725 + {0x0000b15c, 0x027f0260},
2726 + {0x0000b160, 0x0341027e},
2727 + {0x0000b164, 0x035f0340},
2728 + {0x0000b168, 0x037f0360},
2729 + {0x0000b16c, 0x04400441},
2730 + {0x0000b170, 0x0460045f},
2731 + {0x0000b174, 0x0541047f},
2732 + {0x0000b178, 0x055f0540},
2733 + {0x0000b17c, 0x057f0560},
2734 + {0x0000b180, 0x06400641},
2735 + {0x0000b184, 0x0660065f},
2736 + {0x0000b188, 0x067e067f},
2737 + {0x0000b18c, 0x07410742},
2738 + {0x0000b190, 0x075f0740},
2739 + {0x0000b194, 0x077f0760},
2740 + {0x0000b198, 0x07800781},
2741 + {0x0000b19c, 0x07a0079f},
2742 + {0x0000b1a0, 0x07c107bf},
2743 + {0x0000b1a4, 0x000007c0},
2744 + {0x0000b1a8, 0x00000000},
2745 + {0x0000b1ac, 0x00000000},
2746 + {0x0000b1b0, 0x00000000},
2747 + {0x0000b1b4, 0x00000000},
2748 + {0x0000b1b8, 0x00000000},
2749 + {0x0000b1bc, 0x00000000},
2750 + {0x0000b1c0, 0x00000000},
2751 + {0x0000b1c4, 0x00000000},
2752 + {0x0000b1c8, 0x00000000},
2753 + {0x0000b1cc, 0x00000000},
2754 + {0x0000b1d0, 0x00000000},
2755 + {0x0000b1d4, 0x00000000},
2756 + {0x0000b1d8, 0x00000000},
2757 + {0x0000b1dc, 0x00000000},
2758 + {0x0000b1e0, 0x00000000},
2759 + {0x0000b1e4, 0x00000000},
2760 + {0x0000b1e8, 0x00000000},
2761 + {0x0000b1ec, 0x00000000},
2762 + {0x0000b1f0, 0x00000396},
2763 + {0x0000b1f4, 0x00000396},
2764 + {0x0000b1f8, 0x00000396},
2765 + {0x0000b1fc, 0x00000196},
2768 +static const u32 ar9462_1p0_mac_postamble[][5] = {
2769 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2770 + {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
2771 + {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
2772 + {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38},
2773 + {0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00},
2774 + {0x0000801c, 0x128d8027, 0x128d804f, 0x12e00057, 0x12e0002b},
2775 + {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810},
2776 + {0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a},
2777 + {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440},
2780 +static const u32 ar9462_1p0_mac_postamble_emulation[][5] = {
2781 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2782 + {0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8},
2783 + {0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017},
2786 +static const u32 ar9462_1p0_tx_gain_table_baseband_postamble_emulation[][5] = {
2787 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2788 + {0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5},
2789 + {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2790 + {0x0000a504, 0x00004002, 0x00004002, 0x00004002, 0x00004002},
2791 + {0x0000a508, 0x00008004, 0x00008004, 0x00008004, 0x00008004},
2792 + {0x0000a510, 0x0001000c, 0x0001000c, 0x0001000c, 0x0001000c},
2793 + {0x0000a514, 0x0001420b, 0x0001420b, 0x0001420b, 0x0001420b},
2794 + {0x0000a518, 0x0001824a, 0x0001824a, 0x0001824a, 0x0001824a},
2795 + {0x0000a51c, 0x0001c44a, 0x0001c44a, 0x0001c44a, 0x0001c44a},
2796 + {0x0000a520, 0x0002064a, 0x0002064a, 0x0002064a, 0x0002064a},
2797 + {0x0000a524, 0x0002484a, 0x0002484a, 0x0002484a, 0x0002484a},
2798 + {0x0000a528, 0x00028a4a, 0x00028a4a, 0x00028a4a, 0x00028a4a},
2799 + {0x0000a52c, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a},
2800 + {0x0000a530, 0x00030e4a, 0x00030e4a, 0x00030e4a, 0x00030e4a},
2801 + {0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a},
2804 +static const u32 ar9462_1p0_radio_postamble[][5] = {
2805 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2806 + {0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524},
2807 + {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24646c08, 0x24646c08},
2808 + {0x000160b0, 0x01d67f70, 0x01d67f70, 0x01d67f70, 0x01d67f70},
2809 + {0x0001610c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
2810 + {0x00016140, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
2811 + {0x0001650c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
2812 + {0x00016540, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
2815 +static const u32 ar9462_1p0_soc_postamble_emulation[][5] = {
2816 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2817 + {0x00007010, 0x00001133, 0x00001133, 0x00001133, 0x00001133},
2820 +static const u32 ar9462_1p0_baseband_core[][2] = {
2821 + /* Addr allmodes */
2822 + {0x00009800, 0xafe68e30},
2823 + {0x00009804, 0xfd14e000},
2824 + {0x00009808, 0x9c0a9f6b},
2825 + {0x0000980c, 0x04900000},
2826 + {0x00009814, 0x9280c00a},
2827 + {0x00009818, 0x00000000},
2828 + {0x0000981c, 0x00020028},
2829 + {0x00009834, 0x6400a290},
2830 + {0x00009838, 0x0108ecff},
2831 + {0x0000983c, 0x0d000600},
2832 + {0x00009880, 0x201fff00},
2833 + {0x00009884, 0x00001042},
2834 + {0x000098a4, 0x00200400},
2835 + {0x000098b0, 0x32840bbe},
2836 + {0x000098d0, 0x004b6a8e},
2837 + {0x000098d4, 0x00000820},
2838 + {0x000098dc, 0x00000000},
2839 + {0x000098e4, 0x01ffffff},
2840 + {0x000098e8, 0x01ffffff},
2841 + {0x000098ec, 0x01ffffff},
2842 + {0x000098f0, 0x00000000},
2843 + {0x000098f4, 0x00000000},
2844 + {0x00009c04, 0xff55ff55},
2845 + {0x00009c08, 0x0320ff55},
2846 + {0x00009c0c, 0x00000000},
2847 + {0x00009c10, 0x00000000},
2848 + {0x00009c14, 0x00046384},
2849 + {0x00009c18, 0x05b6b440},
2850 + {0x00009c1c, 0x00b6b440},
2851 + {0x00009d00, 0xc080a333},
2852 + {0x00009d04, 0x40206c10},
2853 + {0x00009d08, 0x009c4060},
2854 + {0x00009d0c, 0x9883800a},
2855 + {0x00009d10, 0x01834061},
2856 + {0x00009d14, 0x00c0040b},
2857 + {0x00009d18, 0x00000000},
2858 + {0x00009e08, 0x0038230c},
2859 + {0x00009e24, 0x990bb514},
2860 + {0x00009e28, 0x0c6f0000},
2861 + {0x00009e30, 0x06336f77},
2862 + {0x00009e34, 0x6af6532f},
2863 + {0x00009e38, 0x0cc80c00},
2864 + {0x00009e40, 0x0d261820},
2865 + {0x00009e4c, 0x00001004},
2866 + {0x00009e50, 0x00ff03f1},
2867 + {0x00009e54, 0x64c355c7},
2868 + {0x00009e58, 0xfd897735},
2869 + {0x00009e5c, 0xe9198724},
2870 + {0x00009fc0, 0x803e4788},
2871 + {0x00009fc4, 0x0001efb5},
2872 + {0x00009fcc, 0x40000014},
2873 + {0x00009fd0, 0x01193b93},
2874 + {0x0000a20c, 0x00000000},
2875 + {0x0000a220, 0x00000000},
2876 + {0x0000a224, 0x00000000},
2877 + {0x0000a228, 0x10002310},
2878 + {0x0000a23c, 0x00000000},
2879 + {0x0000a244, 0x0c000000},
2880 + {0x0000a2a0, 0x00000001},
2881 + {0x0000a2c0, 0x00000001},
2882 + {0x0000a2c8, 0x00000000},
2883 + {0x0000a2cc, 0x18c43433},
2884 + {0x0000a2d4, 0x00000000},
2885 + {0x0000a2ec, 0x00000000},
2886 + {0x0000a2f0, 0x00000000},
2887 + {0x0000a2f4, 0x00000000},
2888 + {0x0000a2f8, 0x00000000},
2889 + {0x0000a344, 0x00000000},
2890 + {0x0000a34c, 0x00000000},
2891 + {0x0000a350, 0x0000a000},
2892 + {0x0000a364, 0x00000000},
2893 + {0x0000a370, 0x00000000},
2894 + {0x0000a390, 0x00000001},
2895 + {0x0000a394, 0x00000444},
2896 + {0x0000a398, 0x001f0e0f},
2897 + {0x0000a39c, 0x0075393f},
2898 + {0x0000a3a0, 0xb79f6427},
2899 + {0x0000a3a4, 0x00000000},
2900 + {0x0000a3a8, 0xaaaaaaaa},
2901 + {0x0000a3ac, 0x3c466478},
2902 + {0x0000a3c0, 0x20202020},
2903 + {0x0000a3c4, 0x22222220},
2904 + {0x0000a3c8, 0x20200020},
2905 + {0x0000a3cc, 0x20202020},
2906 + {0x0000a3d0, 0x20202020},
2907 + {0x0000a3d4, 0x20202020},
2908 + {0x0000a3d8, 0x20202020},
2909 + {0x0000a3dc, 0x20202020},
2910 + {0x0000a3e0, 0x20202020},
2911 + {0x0000a3e4, 0x20202020},
2912 + {0x0000a3e8, 0x20202020},
2913 + {0x0000a3ec, 0x20202020},
2914 + {0x0000a3f0, 0x00000000},
2915 + {0x0000a3f4, 0x00000006},
2916 + {0x0000a3f8, 0x0c9bd380},
2917 + {0x0000a3fc, 0x000f0f01},
2918 + {0x0000a400, 0x8fa91f01},
2919 + {0x0000a404, 0x00000000},
2920 + {0x0000a408, 0x0e79e5c6},
2921 + {0x0000a40c, 0x00820820},
2922 + {0x0000a414, 0x1ce739ce},
2923 + {0x0000a418, 0x2d001dce},
2924 + {0x0000a41c, 0x1ce739ce},
2925 + {0x0000a420, 0x000001ce},
2926 + {0x0000a424, 0x1ce739ce},
2927 + {0x0000a428, 0x000001ce},
2928 + {0x0000a42c, 0x1ce739ce},
2929 + {0x0000a430, 0x1ce739ce},
2930 + {0x0000a434, 0x00000000},
2931 + {0x0000a438, 0x00001801},
2932 + {0x0000a43c, 0x00100000},
2933 + {0x0000a440, 0x00000000},
2934 + {0x0000a444, 0x00000000},
2935 + {0x0000a448, 0x05000080},
2936 + {0x0000a44c, 0x00000001},
2937 + {0x0000a450, 0x00010000},
2938 + {0x0000a458, 0x00000000},
2939 + {0x0000a644, 0xbfad9d74},
2940 + {0x0000a648, 0x0048060a},
2941 + {0x0000a64c, 0x00003c37},
2942 + {0x0000a670, 0x03020100},
2943 + {0x0000a674, 0x09080504},
2944 + {0x0000a678, 0x0d0c0b0a},
2945 + {0x0000a67c, 0x13121110},
2946 + {0x0000a680, 0x31301514},
2947 + {0x0000a684, 0x35343332},
2948 + {0x0000a688, 0x00000036},
2949 + {0x0000a690, 0x00000838},
2950 + {0x0000a6b0, 0x0000000a},
2951 + {0x0000a6b4, 0x28f12c01},
2952 + {0x0000a7c0, 0x00000000},
2953 + {0x0000a7c4, 0xfffffffc},
2954 + {0x0000a7c8, 0x00000000},
2955 + {0x0000a7cc, 0x00000000},
2956 + {0x0000a7d0, 0x00000000},
2957 + {0x0000a7d4, 0x00000004},
2958 + {0x0000a7dc, 0x00000001},
2959 + {0x0000a8d0, 0x004b6a8e},
2960 + {0x0000a8d4, 0x00000820},
2961 + {0x0000a8dc, 0x00000000},
2962 + {0x0000a8f0, 0x00000000},
2963 + {0x0000a8f4, 0x00000000},
2964 + {0x0000b2d0, 0x00000080},
2965 + {0x0000b2d4, 0x00000000},
2966 + {0x0000b2ec, 0x00000000},
2967 + {0x0000b2f0, 0x00000000},
2968 + {0x0000b2f4, 0x00000000},
2969 + {0x0000b2f8, 0x00000000},
2970 + {0x0000b408, 0x0e79e5c0},
2971 + {0x0000b40c, 0x00820820},
2972 + {0x0000b420, 0x00000000},
2973 + {0x0000b6b0, 0x0000000a},
2974 + {0x0000b6b4, 0x00c00001},
2977 +static const u32 ar9462_1p0_baseband_postamble[][5] = {
2978 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
2979 + {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
2980 + {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e},
2981 + {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0},
2982 + {0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x06903881},
2983 + {0x0000982c, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4},
2984 + {0x00009830, 0x0000059c, 0x0000059c, 0x0000119c, 0x0000119c},
2985 + {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4},
2986 + {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0},
2987 + {0x00009e04, 0x001c2020, 0x001c2020, 0x001c2020, 0x001c2020},
2988 + {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2},
2989 + {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec84d2e},
2990 + {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3379605e, 0x33795d5e},
2991 + {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
2992 + {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c},
2993 + {0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce},
2994 + {0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021},
2995 + {0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c782},
2996 + {0x00009e44, 0x02321e27, 0x02321e27, 0x02291e27, 0x02291e27},
2997 + {0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012},
2998 + {0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000},
2999 + {0x0000a204, 0x0131b7c0, 0x0131b7c4, 0x0131b7c4, 0x0131b7c0},
3000 + {0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004},
3001 + {0x0000a22c, 0x01026a2f, 0x01026a27, 0x01026a2f, 0x01026a2f},
3002 + {0x0000a230, 0x0000400a, 0x00004014, 0x00004016, 0x0000400b},
3003 + {0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff},
3004 + {0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018},
3005 + {0x0000a250, 0x00000000, 0x00000000, 0x00000210, 0x00000108},
3006 + {0x0000a254, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898},
3007 + {0x0000a258, 0x02020002, 0x02020002, 0x02020002, 0x02020002},
3008 + {0x0000a25c, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e},
3009 + {0x0000a260, 0x0a021501, 0x0a021501, 0x3a021501, 0x3a021501},
3010 + {0x0000a264, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
3011 + {0x0000a280, 0x00000007, 0x00000007, 0x0000000b, 0x0000000b},
3012 + {0x0000a284, 0x00000000, 0x00000000, 0x00000150, 0x00000150},
3013 + {0x0000a288, 0x00000110, 0x00000110, 0x00100110, 0x00100110},
3014 + {0x0000a28c, 0x00022222, 0x00022222, 0x00022222, 0x00022222},
3015 + {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18},
3016 + {0x0000a2d0, 0x00041981, 0x00041981, 0x00041981, 0x00041982},
3017 + {0x0000a2d8, 0x7999a83b, 0x7999a83b, 0x7999a83b, 0x7999a83b},
3018 + {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3019 + {0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
3020 + {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000},
3021 + {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3022 + {0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
3023 + {0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce},
3024 + {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
3027 +static const u32 ar9462_modes_fast_clock_1p0[][3] = {
3028 + /* Addr 5G_HT20 5G_HT40 */
3029 + {0x00001030, 0x00000268, 0x000004d0},
3030 + {0x00001070, 0x0000018c, 0x00000318},
3031 + {0x000010b0, 0x00000fd0, 0x00001fa0},
3032 + {0x00008014, 0x044c044c, 0x08980898},
3033 + {0x0000801c, 0x148ec02b, 0x148ec057},
3034 + {0x00008318, 0x000044c0, 0x00008980},
3035 + {0x00009e00, 0x0372131c, 0x0372131c},
3036 + {0x0000a230, 0x0000400b, 0x00004016},
3037 + {0x0000a254, 0x00000898, 0x00001130},
3040 +static const u32 ar9462_modes_low_ob_db_tx_gain_table_1p0[][5] = {
3041 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
3042 + {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
3043 + {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
3044 + {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
3045 + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
3046 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
3047 + {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3048 + {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
3049 + {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
3050 + {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
3051 + {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
3052 + {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
3053 + {0x0000a518, 0x21020220, 0x21020220, 0x16000402, 0x16000402},
3054 + {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404},
3055 + {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
3056 + {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
3057 + {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
3058 + {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
3059 + {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
3060 + {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
3061 + {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
3062 + {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
3063 + {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
3064 + {0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861},
3065 + {0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81},
3066 + {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x47001a83, 0x47001a83},
3067 + {0x0000a550, 0x61042a6c, 0x61042a6c, 0x4a001c84, 0x4a001c84},
3068 + {0x0000a554, 0x66062a6c, 0x66062a6c, 0x4e001ce3, 0x4e001ce3},
3069 + {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x52001ce5, 0x52001ce5},
3070 + {0x0000a55c, 0x7006308c, 0x7006308c, 0x56001ce9, 0x56001ce9},
3071 + {0x0000a560, 0x730a308a, 0x730a308a, 0x5a001ceb, 0x5a001ceb},
3072 + {0x0000a564, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3073 + {0x0000a568, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3074 + {0x0000a56c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3075 + {0x0000a570, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3076 + {0x0000a574, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3077 + {0x0000a578, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3078 + {0x0000a57c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
3079 + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3080 + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3081 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3082 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3083 + {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3084 + {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
3085 + {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
3086 + {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
3087 + {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
3088 + {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
3089 + {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
3090 + {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
3091 + {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
3092 + {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
3093 + {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
3094 + {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
3095 + {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
3096 + {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
3097 + {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
3098 + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
3099 + {0x00016044, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
3100 + {0x00016048, 0x64992060, 0x64992060, 0x64992060, 0x64992060},
3101 + {0x00016444, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
3102 + {0x00016448, 0x64992000, 0x64992000, 0x64992000, 0x64992000},
3105 +static const u32 ar9462_1p0_soc_postamble[][5] = {
3106 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
3107 + {0x00007010, 0x00002233, 0x00002233, 0x00002233, 0x00002233},
3110 +static const u32 ar9462_common_mixed_rx_gain_table_1p0[][2] = {
3111 + /* Addr allmodes */
3112 + {0x0000a000, 0x00010000},
3113 + {0x0000a004, 0x00030002},
3114 + {0x0000a008, 0x00050004},
3115 + {0x0000a00c, 0x00810080},
3116 + {0x0000a010, 0x00830082},
3117 + {0x0000a014, 0x01810180},
3118 + {0x0000a018, 0x01830182},
3119 + {0x0000a01c, 0x01850184},
3120 + {0x0000a020, 0x01890188},
3121 + {0x0000a024, 0x018b018a},
3122 + {0x0000a028, 0x018d018c},
3123 + {0x0000a02c, 0x03820190},
3124 + {0x0000a030, 0x03840383},
3125 + {0x0000a034, 0x03880385},
3126 + {0x0000a038, 0x038a0389},
3127 + {0x0000a03c, 0x038c038b},
3128 + {0x0000a040, 0x0390038d},
3129 + {0x0000a044, 0x03920391},
3130 + {0x0000a048, 0x03940393},
3131 + {0x0000a04c, 0x03960395},
3132 + {0x0000a050, 0x00000000},
3133 + {0x0000a054, 0x00000000},
3134 + {0x0000a058, 0x00000000},
3135 + {0x0000a05c, 0x00000000},
3136 + {0x0000a060, 0x00000000},
3137 + {0x0000a064, 0x00000000},
3138 + {0x0000a068, 0x00000000},
3139 + {0x0000a06c, 0x00000000},
3140 + {0x0000a070, 0x00000000},
3141 + {0x0000a074, 0x00000000},
3142 + {0x0000a078, 0x00000000},
3143 + {0x0000a07c, 0x00000000},
3144 + {0x0000a080, 0x29292929},
3145 + {0x0000a084, 0x29292929},
3146 + {0x0000a088, 0x29292929},
3147 + {0x0000a08c, 0x29292929},
3148 + {0x0000a090, 0x22292929},
3149 + {0x0000a094, 0x1d1d2222},
3150 + {0x0000a098, 0x0c111117},
3151 + {0x0000a09c, 0x00030303},
3152 + {0x0000a0a0, 0x00000000},
3153 + {0x0000a0a4, 0x00000000},
3154 + {0x0000a0a8, 0x00000000},
3155 + {0x0000a0ac, 0x00000000},
3156 + {0x0000a0b0, 0x00000000},
3157 + {0x0000a0b4, 0x00000000},
3158 + {0x0000a0b8, 0x00000000},
3159 + {0x0000a0bc, 0x00000000},
3160 + {0x0000a0c0, 0x001f0000},
3161 + {0x0000a0c4, 0x01000101},
3162 + {0x0000a0c8, 0x011e011f},
3163 + {0x0000a0cc, 0x011c011d},
3164 + {0x0000a0d0, 0x02030204},
3165 + {0x0000a0d4, 0x02010202},
3166 + {0x0000a0d8, 0x021f0200},
3167 + {0x0000a0dc, 0x0302021e},
3168 + {0x0000a0e0, 0x03000301},
3169 + {0x0000a0e4, 0x031e031f},
3170 + {0x0000a0e8, 0x0402031d},
3171 + {0x0000a0ec, 0x04000401},
3172 + {0x0000a0f0, 0x041e041f},
3173 + {0x0000a0f4, 0x0502041d},
3174 + {0x0000a0f8, 0x05000501},
3175 + {0x0000a0fc, 0x051e051f},
3176 + {0x0000a100, 0x06010602},
3177 + {0x0000a104, 0x061f0600},
3178 + {0x0000a108, 0x061d061e},
3179 + {0x0000a10c, 0x07020703},
3180 + {0x0000a110, 0x07000701},
3181 + {0x0000a114, 0x00000000},
3182 + {0x0000a118, 0x00000000},
3183 + {0x0000a11c, 0x00000000},
3184 + {0x0000a120, 0x00000000},
3185 + {0x0000a124, 0x00000000},
3186 + {0x0000a128, 0x00000000},
3187 + {0x0000a12c, 0x00000000},
3188 + {0x0000a130, 0x00000000},
3189 + {0x0000a134, 0x00000000},
3190 + {0x0000a138, 0x00000000},
3191 + {0x0000a13c, 0x00000000},
3192 + {0x0000a140, 0x001f0000},
3193 + {0x0000a144, 0x01000101},
3194 + {0x0000a148, 0x011e011f},
3195 + {0x0000a14c, 0x011c011d},
3196 + {0x0000a150, 0x02030204},
3197 + {0x0000a154, 0x02010202},
3198 + {0x0000a158, 0x021f0200},
3199 + {0x0000a15c, 0x0302021e},
3200 + {0x0000a160, 0x03000301},
3201 + {0x0000a164, 0x031e031f},
3202 + {0x0000a168, 0x0402031d},
3203 + {0x0000a16c, 0x04000401},
3204 + {0x0000a170, 0x041e041f},
3205 + {0x0000a174, 0x0502041d},
3206 + {0x0000a178, 0x05000501},
3207 + {0x0000a17c, 0x051e051f},
3208 + {0x0000a180, 0x06010602},
3209 + {0x0000a184, 0x061f0600},
3210 + {0x0000a188, 0x061d061e},
3211 + {0x0000a18c, 0x07020703},
3212 + {0x0000a190, 0x07000701},
3213 + {0x0000a194, 0x00000000},
3214 + {0x0000a198, 0x00000000},
3215 + {0x0000a19c, 0x00000000},
3216 + {0x0000a1a0, 0x00000000},
3217 + {0x0000a1a4, 0x00000000},
3218 + {0x0000a1a8, 0x00000000},
3219 + {0x0000a1ac, 0x00000000},
3220 + {0x0000a1b0, 0x00000000},
3221 + {0x0000a1b4, 0x00000000},
3222 + {0x0000a1b8, 0x00000000},
3223 + {0x0000a1bc, 0x00000000},
3224 + {0x0000a1c0, 0x00000000},
3225 + {0x0000a1c4, 0x00000000},
3226 + {0x0000a1c8, 0x00000000},
3227 + {0x0000a1cc, 0x00000000},
3228 + {0x0000a1d0, 0x00000000},
3229 + {0x0000a1d4, 0x00000000},
3230 + {0x0000a1d8, 0x00000000},
3231 + {0x0000a1dc, 0x00000000},
3232 + {0x0000a1e0, 0x00000000},
3233 + {0x0000a1e4, 0x00000000},
3234 + {0x0000a1e8, 0x00000000},
3235 + {0x0000a1ec, 0x00000000},
3236 + {0x0000a1f0, 0x00000396},
3237 + {0x0000a1f4, 0x00000396},
3238 + {0x0000a1f8, 0x00000396},
3239 + {0x0000a1fc, 0x00000196},
3240 + {0x0000b000, 0x00010000},
3241 + {0x0000b004, 0x00030002},
3242 + {0x0000b008, 0x00050004},
3243 + {0x0000b00c, 0x00810080},
3244 + {0x0000b010, 0x00830082},
3245 + {0x0000b014, 0x01810180},
3246 + {0x0000b018, 0x01830182},
3247 + {0x0000b01c, 0x01850184},
3248 + {0x0000b020, 0x02810280},
3249 + {0x0000b024, 0x02830282},
3250 + {0x0000b028, 0x02850284},
3251 + {0x0000b02c, 0x02890288},
3252 + {0x0000b030, 0x028b028a},
3253 + {0x0000b034, 0x0388028c},
3254 + {0x0000b038, 0x038a0389},
3255 + {0x0000b03c, 0x038c038b},
3256 + {0x0000b040, 0x0390038d},
3257 + {0x0000b044, 0x03920391},
3258 + {0x0000b048, 0x03940393},
3259 + {0x0000b04c, 0x03960395},
3260 + {0x0000b050, 0x00000000},
3261 + {0x0000b054, 0x00000000},
3262 + {0x0000b058, 0x00000000},
3263 + {0x0000b05c, 0x00000000},
3264 + {0x0000b060, 0x00000000},
3265 + {0x0000b064, 0x00000000},
3266 + {0x0000b068, 0x00000000},
3267 + {0x0000b06c, 0x00000000},
3268 + {0x0000b070, 0x00000000},
3269 + {0x0000b074, 0x00000000},
3270 + {0x0000b078, 0x00000000},
3271 + {0x0000b07c, 0x00000000},
3272 + {0x0000b080, 0x2a2d2f32},
3273 + {0x0000b084, 0x21232328},
3274 + {0x0000b088, 0x19191c1e},
3275 + {0x0000b08c, 0x12141417},
3276 + {0x0000b090, 0x07070e0e},
3277 + {0x0000b094, 0x03030305},
3278 + {0x0000b098, 0x00000003},
3279 + {0x0000b09c, 0x00000000},
3280 + {0x0000b0a0, 0x00000000},
3281 + {0x0000b0a4, 0x00000000},
3282 + {0x0000b0a8, 0x00000000},
3283 + {0x0000b0ac, 0x00000000},
3284 + {0x0000b0b0, 0x00000000},
3285 + {0x0000b0b4, 0x00000000},
3286 + {0x0000b0b8, 0x00000000},
3287 + {0x0000b0bc, 0x00000000},
3288 + {0x0000b0c0, 0x003f0020},
3289 + {0x0000b0c4, 0x00400041},
3290 + {0x0000b0c8, 0x0140005f},
3291 + {0x0000b0cc, 0x0160015f},
3292 + {0x0000b0d0, 0x017e017f},
3293 + {0x0000b0d4, 0x02410242},
3294 + {0x0000b0d8, 0x025f0240},
3295 + {0x0000b0dc, 0x027f0260},
3296 + {0x0000b0e0, 0x0341027e},
3297 + {0x0000b0e4, 0x035f0340},
3298 + {0x0000b0e8, 0x037f0360},
3299 + {0x0000b0ec, 0x04400441},
3300 + {0x0000b0f0, 0x0460045f},
3301 + {0x0000b0f4, 0x0541047f},
3302 + {0x0000b0f8, 0x055f0540},
3303 + {0x0000b0fc, 0x057f0560},
3304 + {0x0000b100, 0x06400641},
3305 + {0x0000b104, 0x0660065f},
3306 + {0x0000b108, 0x067e067f},
3307 + {0x0000b10c, 0x07410742},
3308 + {0x0000b110, 0x075f0740},
3309 + {0x0000b114, 0x077f0760},
3310 + {0x0000b118, 0x07800781},
3311 + {0x0000b11c, 0x07a0079f},
3312 + {0x0000b120, 0x07c107bf},
3313 + {0x0000b124, 0x000007c0},
3314 + {0x0000b128, 0x00000000},
3315 + {0x0000b12c, 0x00000000},
3316 + {0x0000b130, 0x00000000},
3317 + {0x0000b134, 0x00000000},
3318 + {0x0000b138, 0x00000000},
3319 + {0x0000b13c, 0x00000000},
3320 + {0x0000b140, 0x003f0020},
3321 + {0x0000b144, 0x00400041},
3322 + {0x0000b148, 0x0140005f},
3323 + {0x0000b14c, 0x0160015f},
3324 + {0x0000b150, 0x017e017f},
3325 + {0x0000b154, 0x02410242},
3326 + {0x0000b158, 0x025f0240},
3327 + {0x0000b15c, 0x027f0260},
3328 + {0x0000b160, 0x0341027e},
3329 + {0x0000b164, 0x035f0340},
3330 + {0x0000b168, 0x037f0360},
3331 + {0x0000b16c, 0x04400441},
3332 + {0x0000b170, 0x0460045f},
3333 + {0x0000b174, 0x0541047f},
3334 + {0x0000b178, 0x055f0540},
3335 + {0x0000b17c, 0x057f0560},
3336 + {0x0000b180, 0x06400641},
3337 + {0x0000b184, 0x0660065f},
3338 + {0x0000b188, 0x067e067f},
3339 + {0x0000b18c, 0x07410742},
3340 + {0x0000b190, 0x075f0740},
3341 + {0x0000b194, 0x077f0760},
3342 + {0x0000b198, 0x07800781},
3343 + {0x0000b19c, 0x07a0079f},
3344 + {0x0000b1a0, 0x07c107bf},
3345 + {0x0000b1a4, 0x000007c0},
3346 + {0x0000b1a8, 0x00000000},
3347 + {0x0000b1ac, 0x00000000},
3348 + {0x0000b1b0, 0x00000000},
3349 + {0x0000b1b4, 0x00000000},
3350 + {0x0000b1b8, 0x00000000},
3351 + {0x0000b1bc, 0x00000000},
3352 + {0x0000b1c0, 0x00000000},
3353 + {0x0000b1c4, 0x00000000},
3354 + {0x0000b1c8, 0x00000000},
3355 + {0x0000b1cc, 0x00000000},
3356 + {0x0000b1d0, 0x00000000},
3357 + {0x0000b1d4, 0x00000000},
3358 + {0x0000b1d8, 0x00000000},
3359 + {0x0000b1dc, 0x00000000},
3360 + {0x0000b1e0, 0x00000000},
3361 + {0x0000b1e4, 0x00000000},
3362 + {0x0000b1e8, 0x00000000},
3363 + {0x0000b1ec, 0x00000000},
3364 + {0x0000b1f0, 0x00000396},
3365 + {0x0000b1f4, 0x00000396},
3366 + {0x0000b1f8, 0x00000396},
3367 + {0x0000b1fc, 0x00000196},
3370 +static const u32 ar9462_pcie_phy_clkreq_disable_L1_1p0[][2] = {
3371 + /* Addr allmodes */
3372 + {0x00018c00, 0x10013e5e},
3373 + {0x00018c04, 0x000801d8},
3374 + {0x00018c08, 0x0000580c},
3377 +static const u32 ar9462_1p0_baseband_core_emulation[][2] = {
3378 + /* Addr allmodes */
3379 + {0x00009800, 0xafa68e30},
3380 + {0x00009884, 0x00002842},
3381 + {0x00009c04, 0xff55ff55},
3382 + {0x00009c08, 0x0320ff55},
3383 + {0x00009e50, 0x00000000},
3384 + {0x00009fcc, 0x00000014},
3385 + {0x0000a344, 0x00000010},
3386 + {0x0000a398, 0x00000000},
3387 + {0x0000a39c, 0x71733d01},
3388 + {0x0000a3a0, 0xd0ad5c12},
3389 + {0x0000a3c0, 0x22222220},
3390 + {0x0000a3c4, 0x22222222},
3391 + {0x0000a404, 0x00418a11},
3392 + {0x0000a418, 0x050001ce},
3393 + {0x0000a438, 0x00001800},
3394 + {0x0000a458, 0x01444452},
3395 + {0x0000a644, 0x3fad9d74},
3396 + {0x0000a690, 0x00000038},
3399 +static const u32 ar9462_1p0_radio_core[][2] = {
3400 + /* Addr allmodes */
3401 + {0x00016000, 0x36db6db6},
3402 + {0x00016004, 0x6db6db40},
3403 + {0x00016008, 0x73f00000},
3404 + {0x0001600c, 0x00000000},
3405 + {0x00016010, 0x6d820001},
3406 + {0x00016040, 0x7f80fff8},
3407 + {0x0001604c, 0x2699e04f},
3408 + {0x00016050, 0x6db6db6c},
3409 + {0x00016054, 0x6db60000},
3410 + {0x00016058, 0x6c200000},
3411 + {0x00016080, 0x00040000},
3412 + {0x00016084, 0x9a68048c},
3413 + {0x00016088, 0x54214514},
3414 + {0x0001608c, 0x12030409},
3415 + {0x00016090, 0x24926490},
3416 + {0x00016098, 0xd2888888},
3417 + {0x000160a0, 0x0a108ffe},
3418 + {0x000160a4, 0x812fc490},
3419 + {0x000160a8, 0x423c8000},
3420 + {0x000160b4, 0x92000000},
3421 + {0x000160b8, 0x0285dddc},
3422 + {0x000160bc, 0x02908888},
3423 + {0x000160c0, 0x00adb6d0},
3424 + {0x000160c4, 0x6db6db60},
3425 + {0x000160c8, 0x6db6db6c},
3426 + {0x000160cc, 0x0de6c1b0},
3427 + {0x00016100, 0x3fffbe04},
3428 + {0x00016104, 0xfff80000},
3429 + {0x00016108, 0x00200400},
3430 + {0x00016110, 0x00000000},
3431 + {0x00016144, 0x02084080},
3432 + {0x00016148, 0x000080c0},
3433 + {0x00016280, 0x050a0001},
3434 + {0x00016284, 0x3d841400},
3435 + {0x00016288, 0x00000000},
3436 + {0x0001628c, 0xe3000000},
3437 + {0x00016290, 0xa1005080},
3438 + {0x00016294, 0x00000020},
3439 + {0x00016298, 0x50a02900},
3440 + {0x00016340, 0x121e4276},
3441 + {0x00016344, 0x00300000},
3442 + {0x00016400, 0x36db6db6},
3443 + {0x00016404, 0x6db6db40},
3444 + {0x00016408, 0x73f00000},
3445 + {0x0001640c, 0x00000000},
3446 + {0x00016410, 0x6c800001},
3447 + {0x00016440, 0x7f80fff8},
3448 + {0x0001644c, 0x4699e04f},
3449 + {0x00016450, 0x6db6db6c},
3450 + {0x00016454, 0x6db60000},
3451 + {0x00016500, 0x3fffbe04},
3452 + {0x00016504, 0xfff80000},
3453 + {0x00016508, 0x00200400},
3454 + {0x00016510, 0x00000000},
3455 + {0x00016544, 0x02084080},
3456 + {0x00016548, 0x000080c0},
3459 +static const u32 ar9462_1p0_soc_preamble[][2] = {
3460 + /* Addr allmodes */
3461 + {0x00007020, 0x00000000},
3462 + {0x00007034, 0x00000002},
3463 + {0x00007038, 0x000004c2},
3466 +static const u32 ar9462_1p0_sys2ant[][2] = {
3467 + /* Addr allmodes */
3468 + {0x00063120, 0x00801980},
3471 +#endif /* INITVALS_9462_1P0_H */
3473 +++ b/drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h
3476 + * Copyright (c) 2010 Atheros Communications Inc.
3478 + * Permission to use, copy, modify, and/or distribute this software for any
3479 + * purpose with or without fee is hereby granted, provided that the above
3480 + * copyright notice and this permission notice appear in all copies.
3482 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3483 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3484 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3485 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3486 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3487 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3488 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3491 +#ifndef INITVALS_9462_2P0_H
3492 +#define INITVALS_9462_2P0_H
3496 +static const u32 ar9462_modes_fast_clock_2p0[][3] = {
3497 + /* Addr 5G_HT20 5G_HT40 */
3498 + {0x00001030, 0x00000268, 0x000004d0},
3499 + {0x00001070, 0x0000018c, 0x00000318},
3500 + {0x000010b0, 0x00000fd0, 0x00001fa0},
3501 + {0x00008014, 0x044c044c, 0x08980898},
3502 + {0x0000801c, 0x148ec02b, 0x148ec057},
3503 + {0x00008318, 0x000044c0, 0x00008980},
3504 + {0x00009e00, 0x0372131c, 0x0372131c},
3505 + {0x0000a230, 0x0000400b, 0x00004016},
3506 + {0x0000a254, 0x00000898, 0x00001130},
3509 +static const u32 ar9462_pciephy_clkreq_enable_L1_2p0[][2] = {
3510 + /* Addr allmodes */
3511 + {0x00018c00, 0x18253ede},
3512 + {0x00018c04, 0x000801d8},
3513 + {0x00018c08, 0x0003580c},
3516 +static const u32 ar9462_2p0_baseband_postamble[][5] = {
3517 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
3518 + {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
3519 + {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e},
3520 + {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0},
3521 + {0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x06903881},
3522 + {0x0000982c, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4},
3523 + {0x00009830, 0x0000059c, 0x0000059c, 0x0000119c, 0x0000119c},
3524 + {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4},
3525 + {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0},
3526 + {0x00009e04, 0x001c2020, 0x001c2020, 0x001c2020, 0x001c2020},
3527 + {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2},
3528 + {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec84d2e},
3529 + {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3039605e, 0x33795d5e},
3530 + {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3531 + {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c},
3532 + {0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce},
3533 + {0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021},
3534 + {0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c782},
3535 + {0x00009e44, 0xfe321e27, 0xfe321e27, 0xfe291e27, 0xfe291e27},
3536 + {0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012},
3537 + {0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000},
3538 + {0x0000a204, 0x013187c0, 0x013187c4, 0x013187c4, 0x013187c0},
3539 + {0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004},
3540 + {0x0000a22c, 0x01026a2f, 0x01026a27, 0x01026a2f, 0x01026a2f},
3541 + {0x0000a230, 0x0000400a, 0x00004014, 0x00004016, 0x0000400b},
3542 + {0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff},
3543 + {0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018},
3544 + {0x0000a250, 0x00000000, 0x00000000, 0x00000210, 0x00000108},
3545 + {0x0000a254, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898},
3546 + {0x0000a258, 0x02020002, 0x02020002, 0x02020002, 0x02020002},
3547 + {0x0000a25c, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e},
3548 + {0x0000a260, 0x0a021501, 0x0a021501, 0x3a021501, 0x3a021501},
3549 + {0x0000a264, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
3550 + {0x0000a280, 0x00000007, 0x00000007, 0x0000000b, 0x0000000b},
3551 + {0x0000a284, 0x00000000, 0x00000000, 0x00000150, 0x00000150},
3552 + {0x0000a288, 0x00000110, 0x00000110, 0x00000110, 0x00000110},
3553 + {0x0000a28c, 0x00022222, 0x00022222, 0x00022222, 0x00022222},
3554 + {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18},
3555 + {0x0000a2d0, 0x00041981, 0x00041981, 0x00041981, 0x00041982},
3556 + {0x0000a2d8, 0x7999a83b, 0x7999a83b, 0x7999a83b, 0x7999a83b},
3557 + {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3558 + {0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
3559 + {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000},
3560 + {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
3561 + {0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
3562 + {0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce},
3563 + {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
3566 +static const u32 ar9462_2p0_mac_core_emulation[][2] = {
3567 + /* Addr allmodes */
3568 + {0x00000030, 0x000e0085},
3569 + {0x00000044, 0x00000008},
3570 + {0x0000805c, 0xffffc7ff},
3571 + {0x00008344, 0xaa4a105b},
3574 +static const u32 ar9462_common_rx_gain_table_2p0[][2] = {
3575 + /* Addr allmodes */
3576 + {0x0000a000, 0x00010000},
3577 + {0x0000a004, 0x00030002},
3578 + {0x0000a008, 0x00050004},
3579 + {0x0000a00c, 0x00810080},
3580 + {0x0000a010, 0x00830082},
3581 + {0x0000a014, 0x01810180},
3582 + {0x0000a018, 0x01830182},
3583 + {0x0000a01c, 0x01850184},
3584 + {0x0000a020, 0x01890188},
3585 + {0x0000a024, 0x018b018a},
3586 + {0x0000a028, 0x018d018c},
3587 + {0x0000a02c, 0x01910190},
3588 + {0x0000a030, 0x01930192},
3589 + {0x0000a034, 0x01950194},
3590 + {0x0000a038, 0x038a0196},
3591 + {0x0000a03c, 0x038c038b},
3592 + {0x0000a040, 0x0390038d},
3593 + {0x0000a044, 0x03920391},
3594 + {0x0000a048, 0x03940393},
3595 + {0x0000a04c, 0x03960395},
3596 + {0x0000a050, 0x00000000},
3597 + {0x0000a054, 0x00000000},
3598 + {0x0000a058, 0x00000000},
3599 + {0x0000a05c, 0x00000000},
3600 + {0x0000a060, 0x00000000},
3601 + {0x0000a064, 0x00000000},
3602 + {0x0000a068, 0x00000000},
3603 + {0x0000a06c, 0x00000000},
3604 + {0x0000a070, 0x00000000},
3605 + {0x0000a074, 0x00000000},
3606 + {0x0000a078, 0x00000000},
3607 + {0x0000a07c, 0x00000000},
3608 + {0x0000a080, 0x22222229},
3609 + {0x0000a084, 0x1d1d1d1d},
3610 + {0x0000a088, 0x1d1d1d1d},
3611 + {0x0000a08c, 0x1d1d1d1d},
3612 + {0x0000a090, 0x171d1d1d},
3613 + {0x0000a094, 0x11111717},
3614 + {0x0000a098, 0x00030311},
3615 + {0x0000a09c, 0x00000000},
3616 + {0x0000a0a0, 0x00000000},
3617 + {0x0000a0a4, 0x00000000},
3618 + {0x0000a0a8, 0x00000000},
3619 + {0x0000a0ac, 0x00000000},
3620 + {0x0000a0b0, 0x00000000},
3621 + {0x0000a0b4, 0x00000000},
3622 + {0x0000a0b8, 0x00000000},
3623 + {0x0000a0bc, 0x00000000},
3624 + {0x0000a0c0, 0x001f0000},
3625 + {0x0000a0c4, 0x01000101},
3626 + {0x0000a0c8, 0x011e011f},
3627 + {0x0000a0cc, 0x011c011d},
3628 + {0x0000a0d0, 0x02030204},
3629 + {0x0000a0d4, 0x02010202},
3630 + {0x0000a0d8, 0x021f0200},
3631 + {0x0000a0dc, 0x0302021e},
3632 + {0x0000a0e0, 0x03000301},
3633 + {0x0000a0e4, 0x031e031f},
3634 + {0x0000a0e8, 0x0402031d},
3635 + {0x0000a0ec, 0x04000401},
3636 + {0x0000a0f0, 0x041e041f},
3637 + {0x0000a0f4, 0x0502041d},
3638 + {0x0000a0f8, 0x05000501},
3639 + {0x0000a0fc, 0x051e051f},
3640 + {0x0000a100, 0x06010602},
3641 + {0x0000a104, 0x061f0600},
3642 + {0x0000a108, 0x061d061e},
3643 + {0x0000a10c, 0x07020703},
3644 + {0x0000a110, 0x07000701},
3645 + {0x0000a114, 0x00000000},
3646 + {0x0000a118, 0x00000000},
3647 + {0x0000a11c, 0x00000000},
3648 + {0x0000a120, 0x00000000},
3649 + {0x0000a124, 0x00000000},
3650 + {0x0000a128, 0x00000000},
3651 + {0x0000a12c, 0x00000000},
3652 + {0x0000a130, 0x00000000},
3653 + {0x0000a134, 0x00000000},
3654 + {0x0000a138, 0x00000000},
3655 + {0x0000a13c, 0x00000000},
3656 + {0x0000a140, 0x001f0000},
3657 + {0x0000a144, 0x01000101},
3658 + {0x0000a148, 0x011e011f},
3659 + {0x0000a14c, 0x011c011d},
3660 + {0x0000a150, 0x02030204},
3661 + {0x0000a154, 0x02010202},
3662 + {0x0000a158, 0x021f0200},
3663 + {0x0000a15c, 0x0302021e},
3664 + {0x0000a160, 0x03000301},
3665 + {0x0000a164, 0x031e031f},
3666 + {0x0000a168, 0x0402031d},
3667 + {0x0000a16c, 0x04000401},
3668 + {0x0000a170, 0x041e041f},
3669 + {0x0000a174, 0x0502041d},
3670 + {0x0000a178, 0x05000501},
3671 + {0x0000a17c, 0x051e051f},
3672 + {0x0000a180, 0x06010602},
3673 + {0x0000a184, 0x061f0600},
3674 + {0x0000a188, 0x061d061e},
3675 + {0x0000a18c, 0x07020703},
3676 + {0x0000a190, 0x07000701},
3677 + {0x0000a194, 0x00000000},
3678 + {0x0000a198, 0x00000000},
3679 + {0x0000a19c, 0x00000000},
3680 + {0x0000a1a0, 0x00000000},
3681 + {0x0000a1a4, 0x00000000},
3682 + {0x0000a1a8, 0x00000000},
3683 + {0x0000a1ac, 0x00000000},
3684 + {0x0000a1b0, 0x00000000},
3685 + {0x0000a1b4, 0x00000000},
3686 + {0x0000a1b8, 0x00000000},
3687 + {0x0000a1bc, 0x00000000},
3688 + {0x0000a1c0, 0x00000000},
3689 + {0x0000a1c4, 0x00000000},
3690 + {0x0000a1c8, 0x00000000},
3691 + {0x0000a1cc, 0x00000000},
3692 + {0x0000a1d0, 0x00000000},
3693 + {0x0000a1d4, 0x00000000},
3694 + {0x0000a1d8, 0x00000000},
3695 + {0x0000a1dc, 0x00000000},
3696 + {0x0000a1e0, 0x00000000},
3697 + {0x0000a1e4, 0x00000000},
3698 + {0x0000a1e8, 0x00000000},
3699 + {0x0000a1ec, 0x00000000},
3700 + {0x0000a1f0, 0x00000396},
3701 + {0x0000a1f4, 0x00000396},
3702 + {0x0000a1f8, 0x00000396},
3703 + {0x0000a1fc, 0x00000196},
3704 + {0x0000b000, 0x00010000},
3705 + {0x0000b004, 0x00030002},
3706 + {0x0000b008, 0x00050004},
3707 + {0x0000b00c, 0x00810080},
3708 + {0x0000b010, 0x00830082},
3709 + {0x0000b014, 0x01810180},
3710 + {0x0000b018, 0x01830182},
3711 + {0x0000b01c, 0x01850184},
3712 + {0x0000b020, 0x02810280},
3713 + {0x0000b024, 0x02830282},
3714 + {0x0000b028, 0x02850284},
3715 + {0x0000b02c, 0x02890288},
3716 + {0x0000b030, 0x028b028a},
3717 + {0x0000b034, 0x0388028c},
3718 + {0x0000b038, 0x038a0389},
3719 + {0x0000b03c, 0x038c038b},
3720 + {0x0000b040, 0x0390038d},
3721 + {0x0000b044, 0x03920391},
3722 + {0x0000b048, 0x03940393},
3723 + {0x0000b04c, 0x03960395},
3724 + {0x0000b050, 0x00000000},
3725 + {0x0000b054, 0x00000000},
3726 + {0x0000b058, 0x00000000},
3727 + {0x0000b05c, 0x00000000},
3728 + {0x0000b060, 0x00000000},
3729 + {0x0000b064, 0x00000000},
3730 + {0x0000b068, 0x00000000},
3731 + {0x0000b06c, 0x00000000},
3732 + {0x0000b070, 0x00000000},
3733 + {0x0000b074, 0x00000000},
3734 + {0x0000b078, 0x00000000},
3735 + {0x0000b07c, 0x00000000},
3736 + {0x0000b080, 0x2a2d2f32},
3737 + {0x0000b084, 0x21232328},
3738 + {0x0000b088, 0x19191c1e},
3739 + {0x0000b08c, 0x12141417},
3740 + {0x0000b090, 0x07070e0e},
3741 + {0x0000b094, 0x03030305},
3742 + {0x0000b098, 0x00000003},
3743 + {0x0000b09c, 0x00000000},
3744 + {0x0000b0a0, 0x00000000},
3745 + {0x0000b0a4, 0x00000000},
3746 + {0x0000b0a8, 0x00000000},
3747 + {0x0000b0ac, 0x00000000},
3748 + {0x0000b0b0, 0x00000000},
3749 + {0x0000b0b4, 0x00000000},
3750 + {0x0000b0b8, 0x00000000},
3751 + {0x0000b0bc, 0x00000000},
3752 + {0x0000b0c0, 0x003f0020},
3753 + {0x0000b0c4, 0x00400041},
3754 + {0x0000b0c8, 0x0140005f},
3755 + {0x0000b0cc, 0x0160015f},
3756 + {0x0000b0d0, 0x017e017f},
3757 + {0x0000b0d4, 0x02410242},
3758 + {0x0000b0d8, 0x025f0240},
3759 + {0x0000b0dc, 0x027f0260},
3760 + {0x0000b0e0, 0x0341027e},
3761 + {0x0000b0e4, 0x035f0340},
3762 + {0x0000b0e8, 0x037f0360},
3763 + {0x0000b0ec, 0x04400441},
3764 + {0x0000b0f0, 0x0460045f},
3765 + {0x0000b0f4, 0x0541047f},
3766 + {0x0000b0f8, 0x055f0540},
3767 + {0x0000b0fc, 0x057f0560},
3768 + {0x0000b100, 0x06400641},
3769 + {0x0000b104, 0x0660065f},
3770 + {0x0000b108, 0x067e067f},
3771 + {0x0000b10c, 0x07410742},
3772 + {0x0000b110, 0x075f0740},
3773 + {0x0000b114, 0x077f0760},
3774 + {0x0000b118, 0x07800781},
3775 + {0x0000b11c, 0x07a0079f},
3776 + {0x0000b120, 0x07c107bf},
3777 + {0x0000b124, 0x000007c0},
3778 + {0x0000b128, 0x00000000},
3779 + {0x0000b12c, 0x00000000},
3780 + {0x0000b130, 0x00000000},
3781 + {0x0000b134, 0x00000000},
3782 + {0x0000b138, 0x00000000},
3783 + {0x0000b13c, 0x00000000},
3784 + {0x0000b140, 0x003f0020},
3785 + {0x0000b144, 0x00400041},
3786 + {0x0000b148, 0x0140005f},
3787 + {0x0000b14c, 0x0160015f},
3788 + {0x0000b150, 0x017e017f},
3789 + {0x0000b154, 0x02410242},
3790 + {0x0000b158, 0x025f0240},
3791 + {0x0000b15c, 0x027f0260},
3792 + {0x0000b160, 0x0341027e},
3793 + {0x0000b164, 0x035f0340},
3794 + {0x0000b168, 0x037f0360},
3795 + {0x0000b16c, 0x04400441},
3796 + {0x0000b170, 0x0460045f},
3797 + {0x0000b174, 0x0541047f},
3798 + {0x0000b178, 0x055f0540},
3799 + {0x0000b17c, 0x057f0560},
3800 + {0x0000b180, 0x06400641},
3801 + {0x0000b184, 0x0660065f},
3802 + {0x0000b188, 0x067e067f},
3803 + {0x0000b18c, 0x07410742},
3804 + {0x0000b190, 0x075f0740},
3805 + {0x0000b194, 0x077f0760},
3806 + {0x0000b198, 0x07800781},
3807 + {0x0000b19c, 0x07a0079f},
3808 + {0x0000b1a0, 0x07c107bf},
3809 + {0x0000b1a4, 0x000007c0},
3810 + {0x0000b1a8, 0x00000000},
3811 + {0x0000b1ac, 0x00000000},
3812 + {0x0000b1b0, 0x00000000},
3813 + {0x0000b1b4, 0x00000000},
3814 + {0x0000b1b8, 0x00000000},
3815 + {0x0000b1bc, 0x00000000},
3816 + {0x0000b1c0, 0x00000000},
3817 + {0x0000b1c4, 0x00000000},
3818 + {0x0000b1c8, 0x00000000},
3819 + {0x0000b1cc, 0x00000000},
3820 + {0x0000b1d0, 0x00000000},
3821 + {0x0000b1d4, 0x00000000},
3822 + {0x0000b1d8, 0x00000000},
3823 + {0x0000b1dc, 0x00000000},
3824 + {0x0000b1e0, 0x00000000},
3825 + {0x0000b1e4, 0x00000000},
3826 + {0x0000b1e8, 0x00000000},
3827 + {0x0000b1ec, 0x00000000},
3828 + {0x0000b1f0, 0x00000396},
3829 + {0x0000b1f4, 0x00000396},
3830 + {0x0000b1f8, 0x00000396},
3831 + {0x0000b1fc, 0x00000196},
3834 +static const u32 ar9462_pciephy_clkreq_disable_L1_2p0[][2] = {
3835 + /* Addr allmodes */
3836 + {0x00018c00, 0x18213ede},
3837 + {0x00018c04, 0x000801d8},
3838 + {0x00018c08, 0x0003580c},
3841 +static const u32 ar9462_pciephy_pll_on_clkreq_disable_L1_2p0[][2] = {
3842 + /* Addr allmodes */
3843 + {0x00018c00, 0x18212ede},
3844 + {0x00018c04, 0x000801d8},
3845 + {0x00018c08, 0x0003580c},
3848 +static const u32 ar9462_2p0_sys3ant[][2] = {
3849 + /* Addr allmodes */
3850 + {0x00063280, 0x00040807},
3851 + {0x00063284, 0x104ccccc},
3854 +static const u32 ar9462_common_rx_gain_table_ar9280_2p0[][2] = {
3855 + /* Addr allmodes */
3856 + {0x0000a000, 0x02000101},
3857 + {0x0000a004, 0x02000102},
3858 + {0x0000a008, 0x02000103},
3859 + {0x0000a00c, 0x02000104},
3860 + {0x0000a010, 0x02000200},
3861 + {0x0000a014, 0x02000201},
3862 + {0x0000a018, 0x02000202},
3863 + {0x0000a01c, 0x02000203},
3864 + {0x0000a020, 0x02000204},
3865 + {0x0000a024, 0x02000205},
3866 + {0x0000a028, 0x02000208},
3867 + {0x0000a02c, 0x02000302},
3868 + {0x0000a030, 0x02000303},
3869 + {0x0000a034, 0x02000304},
3870 + {0x0000a038, 0x02000400},
3871 + {0x0000a03c, 0x02010300},
3872 + {0x0000a040, 0x02010301},
3873 + {0x0000a044, 0x02010302},
3874 + {0x0000a048, 0x02000500},
3875 + {0x0000a04c, 0x02010400},
3876 + {0x0000a050, 0x02020300},
3877 + {0x0000a054, 0x02020301},
3878 + {0x0000a058, 0x02020302},
3879 + {0x0000a05c, 0x02020303},
3880 + {0x0000a060, 0x02020400},
3881 + {0x0000a064, 0x02030300},
3882 + {0x0000a068, 0x02030301},
3883 + {0x0000a06c, 0x02030302},
3884 + {0x0000a070, 0x02030303},
3885 + {0x0000a074, 0x02030400},
3886 + {0x0000a078, 0x02040300},
3887 + {0x0000a07c, 0x02040301},
3888 + {0x0000a080, 0x02040302},
3889 + {0x0000a084, 0x02040303},
3890 + {0x0000a088, 0x02030500},
3891 + {0x0000a08c, 0x02040400},
3892 + {0x0000a090, 0x02050203},
3893 + {0x0000a094, 0x02050204},
3894 + {0x0000a098, 0x02050205},
3895 + {0x0000a09c, 0x02040500},
3896 + {0x0000a0a0, 0x02050301},
3897 + {0x0000a0a4, 0x02050302},
3898 + {0x0000a0a8, 0x02050303},
3899 + {0x0000a0ac, 0x02050400},
3900 + {0x0000a0b0, 0x02050401},
3901 + {0x0000a0b4, 0x02050402},
3902 + {0x0000a0b8, 0x02050403},
3903 + {0x0000a0bc, 0x02050500},
3904 + {0x0000a0c0, 0x02050501},
3905 + {0x0000a0c4, 0x02050502},
3906 + {0x0000a0c8, 0x02050503},
3907 + {0x0000a0cc, 0x02050504},
3908 + {0x0000a0d0, 0x02050600},
3909 + {0x0000a0d4, 0x02050601},
3910 + {0x0000a0d8, 0x02050602},
3911 + {0x0000a0dc, 0x02050603},
3912 + {0x0000a0e0, 0x02050604},
3913 + {0x0000a0e4, 0x02050700},
3914 + {0x0000a0e8, 0x02050701},
3915 + {0x0000a0ec, 0x02050702},
3916 + {0x0000a0f0, 0x02050703},
3917 + {0x0000a0f4, 0x02050704},
3918 + {0x0000a0f8, 0x02050705},
3919 + {0x0000a0fc, 0x02050708},
3920 + {0x0000a100, 0x02050709},
3921 + {0x0000a104, 0x0205070a},
3922 + {0x0000a108, 0x0205070b},
3923 + {0x0000a10c, 0x0205070c},
3924 + {0x0000a110, 0x0205070d},
3925 + {0x0000a114, 0x02050710},
3926 + {0x0000a118, 0x02050711},
3927 + {0x0000a11c, 0x02050712},
3928 + {0x0000a120, 0x02050713},
3929 + {0x0000a124, 0x02050714},
3930 + {0x0000a128, 0x02050715},
3931 + {0x0000a12c, 0x02050730},
3932 + {0x0000a130, 0x02050731},
3933 + {0x0000a134, 0x02050732},
3934 + {0x0000a138, 0x02050733},
3935 + {0x0000a13c, 0x02050734},
3936 + {0x0000a140, 0x02050735},
3937 + {0x0000a144, 0x02050750},
3938 + {0x0000a148, 0x02050751},
3939 + {0x0000a14c, 0x02050752},
3940 + {0x0000a150, 0x02050753},
3941 + {0x0000a154, 0x02050754},
3942 + {0x0000a158, 0x02050755},
3943 + {0x0000a15c, 0x02050770},
3944 + {0x0000a160, 0x02050771},
3945 + {0x0000a164, 0x02050772},
3946 + {0x0000a168, 0x02050773},
3947 + {0x0000a16c, 0x02050774},
3948 + {0x0000a170, 0x02050775},
3949 + {0x0000a174, 0x00000776},
3950 + {0x0000a178, 0x00000776},
3951 + {0x0000a17c, 0x00000776},
3952 + {0x0000a180, 0x00000776},
3953 + {0x0000a184, 0x00000776},
3954 + {0x0000a188, 0x00000776},
3955 + {0x0000a18c, 0x00000776},
3956 + {0x0000a190, 0x00000776},
3957 + {0x0000a194, 0x00000776},
3958 + {0x0000a198, 0x00000776},
3959 + {0x0000a19c, 0x00000776},
3960 + {0x0000a1a0, 0x00000776},
3961 + {0x0000a1a4, 0x00000776},
3962 + {0x0000a1a8, 0x00000776},
3963 + {0x0000a1ac, 0x00000776},
3964 + {0x0000a1b0, 0x00000776},
3965 + {0x0000a1b4, 0x00000776},
3966 + {0x0000a1b8, 0x00000776},
3967 + {0x0000a1bc, 0x00000776},
3968 + {0x0000a1c0, 0x00000776},
3969 + {0x0000a1c4, 0x00000776},
3970 + {0x0000a1c8, 0x00000776},
3971 + {0x0000a1cc, 0x00000776},
3972 + {0x0000a1d0, 0x00000776},
3973 + {0x0000a1d4, 0x00000776},
3974 + {0x0000a1d8, 0x00000776},
3975 + {0x0000a1dc, 0x00000776},
3976 + {0x0000a1e0, 0x00000776},
3977 + {0x0000a1e4, 0x00000776},
3978 + {0x0000a1e8, 0x00000776},
3979 + {0x0000a1ec, 0x00000776},
3980 + {0x0000a1f0, 0x00000776},
3981 + {0x0000a1f4, 0x00000776},
3982 + {0x0000a1f8, 0x00000776},
3983 + {0x0000a1fc, 0x00000776},
3984 + {0x0000b000, 0x02000101},
3985 + {0x0000b004, 0x02000102},
3986 + {0x0000b008, 0x02000103},
3987 + {0x0000b00c, 0x02000104},
3988 + {0x0000b010, 0x02000200},
3989 + {0x0000b014, 0x02000201},
3990 + {0x0000b018, 0x02000202},
3991 + {0x0000b01c, 0x02000203},
3992 + {0x0000b020, 0x02000204},
3993 + {0x0000b024, 0x02000205},
3994 + {0x0000b028, 0x02000208},
3995 + {0x0000b02c, 0x02000302},
3996 + {0x0000b030, 0x02000303},
3997 + {0x0000b034, 0x02000304},
3998 + {0x0000b038, 0x02000400},
3999 + {0x0000b03c, 0x02010300},
4000 + {0x0000b040, 0x02010301},
4001 + {0x0000b044, 0x02010302},
4002 + {0x0000b048, 0x02000500},
4003 + {0x0000b04c, 0x02010400},
4004 + {0x0000b050, 0x02020300},
4005 + {0x0000b054, 0x02020301},
4006 + {0x0000b058, 0x02020302},
4007 + {0x0000b05c, 0x02020303},
4008 + {0x0000b060, 0x02020400},
4009 + {0x0000b064, 0x02030300},
4010 + {0x0000b068, 0x02030301},
4011 + {0x0000b06c, 0x02030302},
4012 + {0x0000b070, 0x02030303},
4013 + {0x0000b074, 0x02030400},
4014 + {0x0000b078, 0x02040300},
4015 + {0x0000b07c, 0x02040301},
4016 + {0x0000b080, 0x02040302},
4017 + {0x0000b084, 0x02040303},
4018 + {0x0000b088, 0x02030500},
4019 + {0x0000b08c, 0x02040400},
4020 + {0x0000b090, 0x02050203},
4021 + {0x0000b094, 0x02050204},
4022 + {0x0000b098, 0x02050205},
4023 + {0x0000b09c, 0x02040500},
4024 + {0x0000b0a0, 0x02050301},
4025 + {0x0000b0a4, 0x02050302},
4026 + {0x0000b0a8, 0x02050303},
4027 + {0x0000b0ac, 0x02050400},
4028 + {0x0000b0b0, 0x02050401},
4029 + {0x0000b0b4, 0x02050402},
4030 + {0x0000b0b8, 0x02050403},
4031 + {0x0000b0bc, 0x02050500},
4032 + {0x0000b0c0, 0x02050501},
4033 + {0x0000b0c4, 0x02050502},
4034 + {0x0000b0c8, 0x02050503},
4035 + {0x0000b0cc, 0x02050504},
4036 + {0x0000b0d0, 0x02050600},
4037 + {0x0000b0d4, 0x02050601},
4038 + {0x0000b0d8, 0x02050602},
4039 + {0x0000b0dc, 0x02050603},
4040 + {0x0000b0e0, 0x02050604},
4041 + {0x0000b0e4, 0x02050700},
4042 + {0x0000b0e8, 0x02050701},
4043 + {0x0000b0ec, 0x02050702},
4044 + {0x0000b0f0, 0x02050703},
4045 + {0x0000b0f4, 0x02050704},
4046 + {0x0000b0f8, 0x02050705},
4047 + {0x0000b0fc, 0x02050708},
4048 + {0x0000b100, 0x02050709},
4049 + {0x0000b104, 0x0205070a},
4050 + {0x0000b108, 0x0205070b},
4051 + {0x0000b10c, 0x0205070c},
4052 + {0x0000b110, 0x0205070d},
4053 + {0x0000b114, 0x02050710},
4054 + {0x0000b118, 0x02050711},
4055 + {0x0000b11c, 0x02050712},
4056 + {0x0000b120, 0x02050713},
4057 + {0x0000b124, 0x02050714},
4058 + {0x0000b128, 0x02050715},
4059 + {0x0000b12c, 0x02050730},
4060 + {0x0000b130, 0x02050731},
4061 + {0x0000b134, 0x02050732},
4062 + {0x0000b138, 0x02050733},
4063 + {0x0000b13c, 0x02050734},
4064 + {0x0000b140, 0x02050735},
4065 + {0x0000b144, 0x02050750},
4066 + {0x0000b148, 0x02050751},
4067 + {0x0000b14c, 0x02050752},
4068 + {0x0000b150, 0x02050753},
4069 + {0x0000b154, 0x02050754},
4070 + {0x0000b158, 0x02050755},
4071 + {0x0000b15c, 0x02050770},
4072 + {0x0000b160, 0x02050771},
4073 + {0x0000b164, 0x02050772},
4074 + {0x0000b168, 0x02050773},
4075 + {0x0000b16c, 0x02050774},
4076 + {0x0000b170, 0x02050775},
4077 + {0x0000b174, 0x00000776},
4078 + {0x0000b178, 0x00000776},
4079 + {0x0000b17c, 0x00000776},
4080 + {0x0000b180, 0x00000776},
4081 + {0x0000b184, 0x00000776},
4082 + {0x0000b188, 0x00000776},
4083 + {0x0000b18c, 0x00000776},
4084 + {0x0000b190, 0x00000776},
4085 + {0x0000b194, 0x00000776},
4086 + {0x0000b198, 0x00000776},
4087 + {0x0000b19c, 0x00000776},
4088 + {0x0000b1a0, 0x00000776},
4089 + {0x0000b1a4, 0x00000776},
4090 + {0x0000b1a8, 0x00000776},
4091 + {0x0000b1ac, 0x00000776},
4092 + {0x0000b1b0, 0x00000776},
4093 + {0x0000b1b4, 0x00000776},
4094 + {0x0000b1b8, 0x00000776},
4095 + {0x0000b1bc, 0x00000776},
4096 + {0x0000b1c0, 0x00000776},
4097 + {0x0000b1c4, 0x00000776},
4098 + {0x0000b1c8, 0x00000776},
4099 + {0x0000b1cc, 0x00000776},
4100 + {0x0000b1d0, 0x00000776},
4101 + {0x0000b1d4, 0x00000776},
4102 + {0x0000b1d8, 0x00000776},
4103 + {0x0000b1dc, 0x00000776},
4104 + {0x0000b1e0, 0x00000776},
4105 + {0x0000b1e4, 0x00000776},
4106 + {0x0000b1e8, 0x00000776},
4107 + {0x0000b1ec, 0x00000776},
4108 + {0x0000b1f0, 0x00000776},
4109 + {0x0000b1f4, 0x00000776},
4110 + {0x0000b1f8, 0x00000776},
4111 + {0x0000b1fc, 0x00000776},
4114 +static const u32 ar9200_ar9280_2p0_radio_core[][2] = {
4115 + /* Addr allmodes */
4116 + {0x00007800, 0x00040000},
4117 + {0x00007804, 0xdb005012},
4118 + {0x00007808, 0x04924914},
4119 + {0x0000780c, 0x21084210},
4120 + {0x00007810, 0x6d801300},
4121 + {0x00007814, 0x0019beff},
4122 + {0x00007818, 0x07e41000},
4123 + {0x0000781c, 0x00392000},
4124 + {0x00007820, 0x92592480},
4125 + {0x00007824, 0x00040000},
4126 + {0x00007828, 0xdb005012},
4127 + {0x0000782c, 0x04924914},
4128 + {0x00007830, 0x21084210},
4129 + {0x00007834, 0x6d801300},
4130 + {0x00007838, 0x0019beff},
4131 + {0x0000783c, 0x07e40000},
4132 + {0x00007840, 0x00392000},
4133 + {0x00007844, 0x92592480},
4134 + {0x00007848, 0x00100000},
4135 + {0x0000784c, 0x773f0567},
4136 + {0x00007850, 0x54214514},
4137 + {0x00007854, 0x12035828},
4138 + {0x00007858, 0x92592692},
4139 + {0x0000785c, 0x00000000},
4140 + {0x00007860, 0x56400000},
4141 + {0x00007864, 0x0a8e370e},
4142 + {0x00007868, 0xc0102850},
4143 + {0x0000786c, 0x812d4000},
4144 + {0x00007870, 0x807ec400},
4145 + {0x00007874, 0x001b6db0},
4146 + {0x00007878, 0x00376b63},
4147 + {0x0000787c, 0x06db6db6},
4148 + {0x00007880, 0x006d8000},
4149 + {0x00007884, 0xffeffffe},
4150 + {0x00007888, 0xffeffffe},
4151 + {0x0000788c, 0x00010000},
4152 + {0x00007890, 0x02060aeb},
4153 + {0x00007894, 0x5a108000},
4156 +static const u32 ar9462_2p0_mac_postamble_emulation[][5] = {
4157 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4158 + {0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8},
4159 + {0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017},
4162 +static const u32 ar9462_2p0_radio_postamble_sys3ant[][5] = {
4163 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4164 + {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808},
4165 + {0x00016140, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
4166 + {0x00016540, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
4169 +static const u32 ar9462_2p0_baseband_postamble_emulation[][5] = {
4170 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4171 + {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4172 + {0x00009e3c, 0xcf946221, 0xcf946221, 0xcf946221, 0xcf946221},
4173 + {0x00009e44, 0xfc5c0000, 0xfc5c0000, 0xfc5c0000, 0xfc5c0000},
4174 + {0x0000a258, 0x02020200, 0x02020200, 0x02020200, 0x02020200},
4175 + {0x0000a25c, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
4176 + {0x0000a28c, 0x00011111, 0x00011111, 0x00011111, 0x00011111},
4177 + {0x0000a2c4, 0x00148d18, 0x00148d18, 0x00148d20, 0x00148d20},
4178 + {0x0000a2d8, 0xf999a800, 0xf999a800, 0xf999a80c, 0xf999a80c},
4179 + {0x0000a50c, 0x0000c00a, 0x0000c00a, 0x0000c00a, 0x0000c00a},
4180 + {0x0000a538, 0x00038e8c, 0x00038e8c, 0x00038e8c, 0x00038e8c},
4181 + {0x0000a53c, 0x0003cecc, 0x0003cecc, 0x0003cecc, 0x0003cecc},
4182 + {0x0000a540, 0x00040ed4, 0x00040ed4, 0x00040ed4, 0x00040ed4},
4183 + {0x0000a544, 0x00044edc, 0x00044edc, 0x00044edc, 0x00044edc},
4184 + {0x0000a548, 0x00048ede, 0x00048ede, 0x00048ede, 0x00048ede},
4185 + {0x0000a54c, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e},
4186 + {0x0000a550, 0x00050f5e, 0x00050f5e, 0x00050f5e, 0x00050f5e},
4187 + {0x0000a554, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e},
4188 + {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4191 +static const u32 ar9462_2p0_radio_postamble_sys2ant[][5] = {
4192 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4193 + {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808},
4194 + {0x00016140, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
4195 + {0x00016540, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
4198 +static const u32 ar9462_common_wo_xlna_rx_gain_table_2p0[][2] = {
4199 + /* Addr allmodes */
4200 + {0x0000a000, 0x00010000},
4201 + {0x0000a004, 0x00030002},
4202 + {0x0000a008, 0x00050004},
4203 + {0x0000a00c, 0x00810080},
4204 + {0x0000a010, 0x00830082},
4205 + {0x0000a014, 0x01810180},
4206 + {0x0000a018, 0x01830182},
4207 + {0x0000a01c, 0x01850184},
4208 + {0x0000a020, 0x01890188},
4209 + {0x0000a024, 0x018b018a},
4210 + {0x0000a028, 0x018d018c},
4211 + {0x0000a02c, 0x03820190},
4212 + {0x0000a030, 0x03840383},
4213 + {0x0000a034, 0x03880385},
4214 + {0x0000a038, 0x038a0389},
4215 + {0x0000a03c, 0x038c038b},
4216 + {0x0000a040, 0x0390038d},
4217 + {0x0000a044, 0x03920391},
4218 + {0x0000a048, 0x03940393},
4219 + {0x0000a04c, 0x03960395},
4220 + {0x0000a050, 0x00000000},
4221 + {0x0000a054, 0x00000000},
4222 + {0x0000a058, 0x00000000},
4223 + {0x0000a05c, 0x00000000},
4224 + {0x0000a060, 0x00000000},
4225 + {0x0000a064, 0x00000000},
4226 + {0x0000a068, 0x00000000},
4227 + {0x0000a06c, 0x00000000},
4228 + {0x0000a070, 0x00000000},
4229 + {0x0000a074, 0x00000000},
4230 + {0x0000a078, 0x00000000},
4231 + {0x0000a07c, 0x00000000},
4232 + {0x0000a080, 0x29292929},
4233 + {0x0000a084, 0x29292929},
4234 + {0x0000a088, 0x29292929},
4235 + {0x0000a08c, 0x29292929},
4236 + {0x0000a090, 0x22292929},
4237 + {0x0000a094, 0x1d1d2222},
4238 + {0x0000a098, 0x0c111117},
4239 + {0x0000a09c, 0x00030303},
4240 + {0x0000a0a0, 0x00000000},
4241 + {0x0000a0a4, 0x00000000},
4242 + {0x0000a0a8, 0x00000000},
4243 + {0x0000a0ac, 0x00000000},
4244 + {0x0000a0b0, 0x00000000},
4245 + {0x0000a0b4, 0x00000000},
4246 + {0x0000a0b8, 0x00000000},
4247 + {0x0000a0bc, 0x00000000},
4248 + {0x0000a0c0, 0x001f0000},
4249 + {0x0000a0c4, 0x01000101},
4250 + {0x0000a0c8, 0x011e011f},
4251 + {0x0000a0cc, 0x011c011d},
4252 + {0x0000a0d0, 0x02030204},
4253 + {0x0000a0d4, 0x02010202},
4254 + {0x0000a0d8, 0x021f0200},
4255 + {0x0000a0dc, 0x0302021e},
4256 + {0x0000a0e0, 0x03000301},
4257 + {0x0000a0e4, 0x031e031f},
4258 + {0x0000a0e8, 0x0402031d},
4259 + {0x0000a0ec, 0x04000401},
4260 + {0x0000a0f0, 0x041e041f},
4261 + {0x0000a0f4, 0x0502041d},
4262 + {0x0000a0f8, 0x05000501},
4263 + {0x0000a0fc, 0x051e051f},
4264 + {0x0000a100, 0x06010602},
4265 + {0x0000a104, 0x061f0600},
4266 + {0x0000a108, 0x061d061e},
4267 + {0x0000a10c, 0x07020703},
4268 + {0x0000a110, 0x07000701},
4269 + {0x0000a114, 0x00000000},
4270 + {0x0000a118, 0x00000000},
4271 + {0x0000a11c, 0x00000000},
4272 + {0x0000a120, 0x00000000},
4273 + {0x0000a124, 0x00000000},
4274 + {0x0000a128, 0x00000000},
4275 + {0x0000a12c, 0x00000000},
4276 + {0x0000a130, 0x00000000},
4277 + {0x0000a134, 0x00000000},
4278 + {0x0000a138, 0x00000000},
4279 + {0x0000a13c, 0x00000000},
4280 + {0x0000a140, 0x001f0000},
4281 + {0x0000a144, 0x01000101},
4282 + {0x0000a148, 0x011e011f},
4283 + {0x0000a14c, 0x011c011d},
4284 + {0x0000a150, 0x02030204},
4285 + {0x0000a154, 0x02010202},
4286 + {0x0000a158, 0x021f0200},
4287 + {0x0000a15c, 0x0302021e},
4288 + {0x0000a160, 0x03000301},
4289 + {0x0000a164, 0x031e031f},
4290 + {0x0000a168, 0x0402031d},
4291 + {0x0000a16c, 0x04000401},
4292 + {0x0000a170, 0x041e041f},
4293 + {0x0000a174, 0x0502041d},
4294 + {0x0000a178, 0x05000501},
4295 + {0x0000a17c, 0x051e051f},
4296 + {0x0000a180, 0x06010602},
4297 + {0x0000a184, 0x061f0600},
4298 + {0x0000a188, 0x061d061e},
4299 + {0x0000a18c, 0x07020703},
4300 + {0x0000a190, 0x07000701},
4301 + {0x0000a194, 0x00000000},
4302 + {0x0000a198, 0x00000000},
4303 + {0x0000a19c, 0x00000000},
4304 + {0x0000a1a0, 0x00000000},
4305 + {0x0000a1a4, 0x00000000},
4306 + {0x0000a1a8, 0x00000000},
4307 + {0x0000a1ac, 0x00000000},
4308 + {0x0000a1b0, 0x00000000},
4309 + {0x0000a1b4, 0x00000000},
4310 + {0x0000a1b8, 0x00000000},
4311 + {0x0000a1bc, 0x00000000},
4312 + {0x0000a1c0, 0x00000000},
4313 + {0x0000a1c4, 0x00000000},
4314 + {0x0000a1c8, 0x00000000},
4315 + {0x0000a1cc, 0x00000000},
4316 + {0x0000a1d0, 0x00000000},
4317 + {0x0000a1d4, 0x00000000},
4318 + {0x0000a1d8, 0x00000000},
4319 + {0x0000a1dc, 0x00000000},
4320 + {0x0000a1e0, 0x00000000},
4321 + {0x0000a1e4, 0x00000000},
4322 + {0x0000a1e8, 0x00000000},
4323 + {0x0000a1ec, 0x00000000},
4324 + {0x0000a1f0, 0x00000396},
4325 + {0x0000a1f4, 0x00000396},
4326 + {0x0000a1f8, 0x00000396},
4327 + {0x0000a1fc, 0x00000196},
4328 + {0x0000b000, 0x00010000},
4329 + {0x0000b004, 0x00030002},
4330 + {0x0000b008, 0x00050004},
4331 + {0x0000b00c, 0x00810080},
4332 + {0x0000b010, 0x00830082},
4333 + {0x0000b014, 0x01810180},
4334 + {0x0000b018, 0x01830182},
4335 + {0x0000b01c, 0x01850184},
4336 + {0x0000b020, 0x02810280},
4337 + {0x0000b024, 0x02830282},
4338 + {0x0000b028, 0x02850284},
4339 + {0x0000b02c, 0x02890288},
4340 + {0x0000b030, 0x028b028a},
4341 + {0x0000b034, 0x0388028c},
4342 + {0x0000b038, 0x038a0389},
4343 + {0x0000b03c, 0x038c038b},
4344 + {0x0000b040, 0x0390038d},
4345 + {0x0000b044, 0x03920391},
4346 + {0x0000b048, 0x03940393},
4347 + {0x0000b04c, 0x03960395},
4348 + {0x0000b050, 0x00000000},
4349 + {0x0000b054, 0x00000000},
4350 + {0x0000b058, 0x00000000},
4351 + {0x0000b05c, 0x00000000},
4352 + {0x0000b060, 0x00000000},
4353 + {0x0000b064, 0x00000000},
4354 + {0x0000b068, 0x00000000},
4355 + {0x0000b06c, 0x00000000},
4356 + {0x0000b070, 0x00000000},
4357 + {0x0000b074, 0x00000000},
4358 + {0x0000b078, 0x00000000},
4359 + {0x0000b07c, 0x00000000},
4360 + {0x0000b080, 0x32323232},
4361 + {0x0000b084, 0x2f2f3232},
4362 + {0x0000b088, 0x23282a2d},
4363 + {0x0000b08c, 0x1c1e2123},
4364 + {0x0000b090, 0x14171919},
4365 + {0x0000b094, 0x0e0e1214},
4366 + {0x0000b098, 0x03050707},
4367 + {0x0000b09c, 0x00030303},
4368 + {0x0000b0a0, 0x00000000},
4369 + {0x0000b0a4, 0x00000000},
4370 + {0x0000b0a8, 0x00000000},
4371 + {0x0000b0ac, 0x00000000},
4372 + {0x0000b0b0, 0x00000000},
4373 + {0x0000b0b4, 0x00000000},
4374 + {0x0000b0b8, 0x00000000},
4375 + {0x0000b0bc, 0x00000000},
4376 + {0x0000b0c0, 0x003f0020},
4377 + {0x0000b0c4, 0x00400041},
4378 + {0x0000b0c8, 0x0140005f},
4379 + {0x0000b0cc, 0x0160015f},
4380 + {0x0000b0d0, 0x017e017f},
4381 + {0x0000b0d4, 0x02410242},
4382 + {0x0000b0d8, 0x025f0240},
4383 + {0x0000b0dc, 0x027f0260},
4384 + {0x0000b0e0, 0x0341027e},
4385 + {0x0000b0e4, 0x035f0340},
4386 + {0x0000b0e8, 0x037f0360},
4387 + {0x0000b0ec, 0x04400441},
4388 + {0x0000b0f0, 0x0460045f},
4389 + {0x0000b0f4, 0x0541047f},
4390 + {0x0000b0f8, 0x055f0540},
4391 + {0x0000b0fc, 0x057f0560},
4392 + {0x0000b100, 0x06400641},
4393 + {0x0000b104, 0x0660065f},
4394 + {0x0000b108, 0x067e067f},
4395 + {0x0000b10c, 0x07410742},
4396 + {0x0000b110, 0x075f0740},
4397 + {0x0000b114, 0x077f0760},
4398 + {0x0000b118, 0x07800781},
4399 + {0x0000b11c, 0x07a0079f},
4400 + {0x0000b120, 0x07c107bf},
4401 + {0x0000b124, 0x000007c0},
4402 + {0x0000b128, 0x00000000},
4403 + {0x0000b12c, 0x00000000},
4404 + {0x0000b130, 0x00000000},
4405 + {0x0000b134, 0x00000000},
4406 + {0x0000b138, 0x00000000},
4407 + {0x0000b13c, 0x00000000},
4408 + {0x0000b140, 0x003f0020},
4409 + {0x0000b144, 0x00400041},
4410 + {0x0000b148, 0x0140005f},
4411 + {0x0000b14c, 0x0160015f},
4412 + {0x0000b150, 0x017e017f},
4413 + {0x0000b154, 0x02410242},
4414 + {0x0000b158, 0x025f0240},
4415 + {0x0000b15c, 0x027f0260},
4416 + {0x0000b160, 0x0341027e},
4417 + {0x0000b164, 0x035f0340},
4418 + {0x0000b168, 0x037f0360},
4419 + {0x0000b16c, 0x04400441},
4420 + {0x0000b170, 0x0460045f},
4421 + {0x0000b174, 0x0541047f},
4422 + {0x0000b178, 0x055f0540},
4423 + {0x0000b17c, 0x057f0560},
4424 + {0x0000b180, 0x06400641},
4425 + {0x0000b184, 0x0660065f},
4426 + {0x0000b188, 0x067e067f},
4427 + {0x0000b18c, 0x07410742},
4428 + {0x0000b190, 0x075f0740},
4429 + {0x0000b194, 0x077f0760},
4430 + {0x0000b198, 0x07800781},
4431 + {0x0000b19c, 0x07a0079f},
4432 + {0x0000b1a0, 0x07c107bf},
4433 + {0x0000b1a4, 0x000007c0},
4434 + {0x0000b1a8, 0x00000000},
4435 + {0x0000b1ac, 0x00000000},
4436 + {0x0000b1b0, 0x00000000},
4437 + {0x0000b1b4, 0x00000000},
4438 + {0x0000b1b8, 0x00000000},
4439 + {0x0000b1bc, 0x00000000},
4440 + {0x0000b1c0, 0x00000000},
4441 + {0x0000b1c4, 0x00000000},
4442 + {0x0000b1c8, 0x00000000},
4443 + {0x0000b1cc, 0x00000000},
4444 + {0x0000b1d0, 0x00000000},
4445 + {0x0000b1d4, 0x00000000},
4446 + {0x0000b1d8, 0x00000000},
4447 + {0x0000b1dc, 0x00000000},
4448 + {0x0000b1e0, 0x00000000},
4449 + {0x0000b1e4, 0x00000000},
4450 + {0x0000b1e8, 0x00000000},
4451 + {0x0000b1ec, 0x00000000},
4452 + {0x0000b1f0, 0x00000396},
4453 + {0x0000b1f4, 0x00000396},
4454 + {0x0000b1f8, 0x00000396},
4455 + {0x0000b1fc, 0x00000196},
4458 +static const u32 ar9462_2p0_baseband_core_txfir_coeff_japan_2484[][2] = {
4459 + /* Addr allmodes */
4460 + {0x0000a398, 0x00000000},
4461 + {0x0000a39c, 0x6f7f0301},
4462 + {0x0000a3a0, 0xca9228ee},
4465 +static const u32 ar9462_modes_low_ob_db_tx_gain_table_2p0[][5] = {
4466 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4467 + {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002},
4468 + {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
4469 + {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
4470 + {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
4471 + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
4472 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
4473 + {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4474 + {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4475 + {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
4476 + {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
4477 + {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
4478 + {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
4479 + {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
4480 + {0x0000a518, 0x21020220, 0x21020220, 0x16000402, 0x16000402},
4481 + {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404},
4482 + {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
4483 + {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
4484 + {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
4485 + {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
4486 + {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
4487 + {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
4488 + {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
4489 + {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
4490 + {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
4491 + {0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861},
4492 + {0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81},
4493 + {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x47001a83, 0x47001a83},
4494 + {0x0000a550, 0x61042a6c, 0x61042a6c, 0x4a001c84, 0x4a001c84},
4495 + {0x0000a554, 0x66062a6c, 0x66062a6c, 0x4e001ce3, 0x4e001ce3},
4496 + {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x52001ce5, 0x52001ce5},
4497 + {0x0000a55c, 0x7006308c, 0x7006308c, 0x56001ce9, 0x56001ce9},
4498 + {0x0000a560, 0x730a308a, 0x730a308a, 0x5a001ceb, 0x5a001ceb},
4499 + {0x0000a564, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4500 + {0x0000a568, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4501 + {0x0000a56c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4502 + {0x0000a570, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4503 + {0x0000a574, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4504 + {0x0000a578, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4505 + {0x0000a57c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
4506 + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4507 + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4508 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4509 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4510 + {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4511 + {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
4512 + {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
4513 + {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
4514 + {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
4515 + {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
4516 + {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
4517 + {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
4518 + {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
4519 + {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
4520 + {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
4521 + {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
4522 + {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
4523 + {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
4524 + {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
4525 + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
4526 + {0x00016044, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
4527 + {0x00016048, 0x64992060, 0x64992060, 0x64992060, 0x64992060},
4528 + {0x00016054, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
4529 + {0x00016444, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
4530 + {0x00016448, 0x64992000, 0x64992000, 0x64992000, 0x64992000},
4531 + {0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
4534 +static const u32 ar9462_2p0_soc_postamble[][5] = {
4535 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4536 + {0x00007010, 0x00002233, 0x00002233, 0x00002233, 0x00002233},
4539 +static const u32 ar9462_2p0_baseband_core[][2] = {
4540 + /* Addr allmodes */
4541 + {0x00009800, 0xafe68e30},
4542 + {0x00009804, 0xfd14e000},
4543 + {0x00009808, 0x9c0a9f6b},
4544 + {0x0000980c, 0x04900000},
4545 + {0x00009814, 0x9280c00a},
4546 + {0x00009818, 0x00000000},
4547 + {0x0000981c, 0x00020028},
4548 + {0x00009834, 0x6400a290},
4549 + {0x00009838, 0x0108ecff},
4550 + {0x0000983c, 0x0d000600},
4551 + {0x00009880, 0x201fff00},
4552 + {0x00009884, 0x00001042},
4553 + {0x000098a4, 0x00200400},
4554 + {0x000098b0, 0x32440bbe},
4555 + {0x000098d0, 0x004b6a8e},
4556 + {0x000098d4, 0x00000820},
4557 + {0x000098dc, 0x00000000},
4558 + {0x000098e4, 0x01ffffff},
4559 + {0x000098e8, 0x01ffffff},
4560 + {0x000098ec, 0x01ffffff},
4561 + {0x000098f0, 0x00000000},
4562 + {0x000098f4, 0x00000000},
4563 + {0x00009bf0, 0x80000000},
4564 + {0x00009c04, 0xff55ff55},
4565 + {0x00009c08, 0x0320ff55},
4566 + {0x00009c0c, 0x00000000},
4567 + {0x00009c10, 0x00000000},
4568 + {0x00009c14, 0x00046384},
4569 + {0x00009c18, 0x05b6b440},
4570 + {0x00009c1c, 0x00b6b440},
4571 + {0x00009d00, 0xc080a333},
4572 + {0x00009d04, 0x40206c10},
4573 + {0x00009d08, 0x009c4060},
4574 + {0x00009d0c, 0x9883800a},
4575 + {0x00009d10, 0x01834061},
4576 + {0x00009d14, 0x00c0040b},
4577 + {0x00009d18, 0x00000000},
4578 + {0x00009e08, 0x0038230c},
4579 + {0x00009e24, 0x990bb515},
4580 + {0x00009e28, 0x0c6f0000},
4581 + {0x00009e30, 0x06336f77},
4582 + {0x00009e34, 0x6af6532f},
4583 + {0x00009e38, 0x0cc80c00},
4584 + {0x00009e40, 0x0d261820},
4585 + {0x00009e4c, 0x00001004},
4586 + {0x00009e50, 0x00ff03f1},
4587 + {0x00009e54, 0xe4c355c7},
4588 + {0x00009e58, 0xfd897735},
4589 + {0x00009e5c, 0xe9198724},
4590 + {0x00009fc0, 0x803e4788},
4591 + {0x00009fc4, 0x0001efb5},
4592 + {0x00009fcc, 0x40000014},
4593 + {0x00009fd0, 0x01193b93},
4594 + {0x0000a20c, 0x00000000},
4595 + {0x0000a220, 0x00000000},
4596 + {0x0000a224, 0x00000000},
4597 + {0x0000a228, 0x10002310},
4598 + {0x0000a23c, 0x00000000},
4599 + {0x0000a244, 0x0c000000},
4600 + {0x0000a2a0, 0x00000001},
4601 + {0x0000a2c0, 0x00000001},
4602 + {0x0000a2c8, 0x00000000},
4603 + {0x0000a2cc, 0x18c43433},
4604 + {0x0000a2d4, 0x00000000},
4605 + {0x0000a2ec, 0x00000000},
4606 + {0x0000a2f0, 0x00000000},
4607 + {0x0000a2f4, 0x00000000},
4608 + {0x0000a2f8, 0x00000000},
4609 + {0x0000a344, 0x00000000},
4610 + {0x0000a34c, 0x00000000},
4611 + {0x0000a350, 0x0000a000},
4612 + {0x0000a364, 0x00000000},
4613 + {0x0000a370, 0x00000000},
4614 + {0x0000a390, 0x00000001},
4615 + {0x0000a394, 0x00000444},
4616 + {0x0000a398, 0x001f0e0f},
4617 + {0x0000a39c, 0x0075393f},
4618 + {0x0000a3a0, 0xb79f6427},
4619 + {0x0000a3a4, 0x00000000},
4620 + {0x0000a3a8, 0xaaaaaaaa},
4621 + {0x0000a3ac, 0x3c466478},
4622 + {0x0000a3c0, 0x20202020},
4623 + {0x0000a3c4, 0x22222220},
4624 + {0x0000a3c8, 0x20200020},
4625 + {0x0000a3cc, 0x20202020},
4626 + {0x0000a3d0, 0x20202020},
4627 + {0x0000a3d4, 0x20202020},
4628 + {0x0000a3d8, 0x20202020},
4629 + {0x0000a3dc, 0x20202020},
4630 + {0x0000a3e0, 0x20202020},
4631 + {0x0000a3e4, 0x20202020},
4632 + {0x0000a3e8, 0x20202020},
4633 + {0x0000a3ec, 0x20202020},
4634 + {0x0000a3f0, 0x00000000},
4635 + {0x0000a3f4, 0x00000006},
4636 + {0x0000a3f8, 0x0c9bd380},
4637 + {0x0000a3fc, 0x000f0f01},
4638 + {0x0000a400, 0x8fa91f01},
4639 + {0x0000a404, 0x00000000},
4640 + {0x0000a408, 0x0e79e5c6},
4641 + {0x0000a40c, 0x00820820},
4642 + {0x0000a414, 0x1ce739ce},
4643 + {0x0000a418, 0x2d001dce},
4644 + {0x0000a41c, 0x1ce739ce},
4645 + {0x0000a420, 0x000001ce},
4646 + {0x0000a424, 0x1ce739ce},
4647 + {0x0000a428, 0x000001ce},
4648 + {0x0000a42c, 0x1ce739ce},
4649 + {0x0000a430, 0x1ce739ce},
4650 + {0x0000a434, 0x00000000},
4651 + {0x0000a438, 0x00001801},
4652 + {0x0000a43c, 0x00100000},
4653 + {0x0000a444, 0x00000000},
4654 + {0x0000a448, 0x05000080},
4655 + {0x0000a44c, 0x00000001},
4656 + {0x0000a450, 0x00010000},
4657 + {0x0000a454, 0x07000000},
4658 + {0x0000a644, 0xbfad9d74},
4659 + {0x0000a648, 0x0048060a},
4660 + {0x0000a64c, 0x00002037},
4661 + {0x0000a670, 0x03020100},
4662 + {0x0000a674, 0x09080504},
4663 + {0x0000a678, 0x0d0c0b0a},
4664 + {0x0000a67c, 0x13121110},
4665 + {0x0000a680, 0x31301514},
4666 + {0x0000a684, 0x35343332},
4667 + {0x0000a688, 0x00000036},
4668 + {0x0000a690, 0x00000838},
4669 + {0x0000a6b0, 0x0000000a},
4670 + {0x0000a6b4, 0x00512c01},
4671 + {0x0000a7c0, 0x00000000},
4672 + {0x0000a7c4, 0xfffffffc},
4673 + {0x0000a7c8, 0x00000000},
4674 + {0x0000a7cc, 0x00000000},
4675 + {0x0000a7d0, 0x00000000},
4676 + {0x0000a7d4, 0x00000004},
4677 + {0x0000a7dc, 0x00000001},
4678 + {0x0000a7f0, 0x80000000},
4679 + {0x0000a8d0, 0x004b6a8e},
4680 + {0x0000a8d4, 0x00000820},
4681 + {0x0000a8dc, 0x00000000},
4682 + {0x0000a8f0, 0x00000000},
4683 + {0x0000a8f4, 0x00000000},
4684 + {0x0000abf0, 0x80000000},
4685 + {0x0000b2d0, 0x00000080},
4686 + {0x0000b2d4, 0x00000000},
4687 + {0x0000b2ec, 0x00000000},
4688 + {0x0000b2f0, 0x00000000},
4689 + {0x0000b2f4, 0x00000000},
4690 + {0x0000b2f8, 0x00000000},
4691 + {0x0000b408, 0x0e79e5c0},
4692 + {0x0000b40c, 0x00820820},
4693 + {0x0000b420, 0x00000000},
4694 + {0x0000b6b0, 0x0000000a},
4695 + {0x0000b6b4, 0x00000001},
4698 +static const u32 ar9462_2p0_radio_postamble[][5] = {
4699 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4700 + {0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524},
4701 + {0x000160b0, 0x01d67f70, 0x01d67f70, 0x01d67f70, 0x01d67f70},
4702 + {0x0001610c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
4703 + {0x0001650c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
4706 +static const u32 ar9462_modes_high_ob_db_tx_gain_table_2p0[][5] = {
4707 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4708 + {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002},
4709 + {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
4710 + {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
4711 + {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
4712 + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
4713 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
4714 + {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4715 + {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
4716 + {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002},
4717 + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
4718 + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
4719 + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
4720 + {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
4721 + {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
4722 + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
4723 + {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
4724 + {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
4725 + {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
4726 + {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
4727 + {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20},
4728 + {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22},
4729 + {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24},
4730 + {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640},
4731 + {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660},
4732 + {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861},
4733 + {0x0000a548, 0x53025eb2, 0x53025eb2, 0x3e001a81, 0x3e001a81},
4734 + {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
4735 + {0x0000a550, 0x5f025ef6, 0x5f025ef6, 0x44001c84, 0x44001c84},
4736 + {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3},
4737 + {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5},
4738 + {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9},
4739 + {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb},
4740 + {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4741 + {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4742 + {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4743 + {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4744 + {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4745 + {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4746 + {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
4747 + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4748 + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4749 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4750 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4751 + {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
4752 + {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
4753 + {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
4754 + {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
4755 + {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
4756 + {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
4757 + {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
4758 + {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
4759 + {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
4760 + {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
4761 + {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
4762 + {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
4763 + {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
4764 + {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
4765 + {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
4766 + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
4767 + {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
4768 + {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060},
4769 + {0x00016054, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
4770 + {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
4771 + {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
4772 + {0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
4775 +static const u32 ar9462_2p0_radio_core[][2] = {
4776 + /* Addr allmodes */
4777 + {0x00016000, 0x36db6db6},
4778 + {0x00016004, 0x6db6db40},
4779 + {0x00016008, 0x73f00000},
4780 + {0x0001600c, 0x00000000},
4781 + {0x00016010, 0x6d820001},
4782 + {0x00016040, 0x7f80fff8},
4783 + {0x0001604c, 0x2699e04f},
4784 + {0x00016050, 0x6db6db6c},
4785 + {0x00016058, 0x6c200000},
4786 + {0x00016080, 0x00040000},
4787 + {0x00016084, 0x9a68048c},
4788 + {0x00016088, 0x54214514},
4789 + {0x0001608c, 0x1203040b},
4790 + {0x00016090, 0x24926490},
4791 + {0x00016098, 0xd2888888},
4792 + {0x000160a0, 0x0a108ffe},
4793 + {0x000160a4, 0x812fc491},
4794 + {0x000160a8, 0x423c8000},
4795 + {0x000160b4, 0x92000000},
4796 + {0x000160b8, 0x0285dddc},
4797 + {0x000160bc, 0x02908888},
4798 + {0x000160c0, 0x00adb6d0},
4799 + {0x000160c4, 0x6db6db60},
4800 + {0x000160c8, 0x6db6db6c},
4801 + {0x000160cc, 0x0de6c1b0},
4802 + {0x00016100, 0x3fffbe04},
4803 + {0x00016104, 0xfff80000},
4804 + {0x00016108, 0x00200400},
4805 + {0x00016110, 0x00000000},
4806 + {0x00016144, 0x02084080},
4807 + {0x00016148, 0x000080c0},
4808 + {0x00016280, 0x050a0001},
4809 + {0x00016284, 0x3d841400},
4810 + {0x00016288, 0x00000000},
4811 + {0x0001628c, 0xe3000000},
4812 + {0x00016290, 0xa1005080},
4813 + {0x00016294, 0x00000020},
4814 + {0x00016298, 0x54a82900},
4815 + {0x00016340, 0x121e4276},
4816 + {0x00016344, 0x00300000},
4817 + {0x00016400, 0x36db6db6},
4818 + {0x00016404, 0x6db6db40},
4819 + {0x00016408, 0x73f00000},
4820 + {0x0001640c, 0x00000000},
4821 + {0x00016410, 0x6c800001},
4822 + {0x00016440, 0x7f80fff8},
4823 + {0x0001644c, 0x4699e04f},
4824 + {0x00016450, 0x6db6db6c},
4825 + {0x00016500, 0x3fffbe04},
4826 + {0x00016504, 0xfff80000},
4827 + {0x00016508, 0x00200400},
4828 + {0x00016510, 0x00000000},
4829 + {0x00016544, 0x02084080},
4830 + {0x00016548, 0x000080c0},
4833 +static const u32 ar9462_2p0_tx_gain_table_baseband_postamble_emulation[][5] = {
4834 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
4835 + {0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5},
4836 + {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
4837 + {0x0000a504, 0x00004002, 0x00004002, 0x00004002, 0x00004002},
4838 + {0x0000a508, 0x00008004, 0x00008004, 0x00008004, 0x00008004},
4839 + {0x0000a510, 0x0001000c, 0x0001000c, 0x0001000c, 0x0001000c},
4840 + {0x0000a514, 0x0001420b, 0x0001420b, 0x0001420b, 0x0001420b},
4841 + {0x0000a518, 0x0001824a, 0x0001824a, 0x0001824a, 0x0001824a},
4842 + {0x0000a51c, 0x0001c44a, 0x0001c44a, 0x0001c44a, 0x0001c44a},
4843 + {0x0000a520, 0x0002064a, 0x0002064a, 0x0002064a, 0x0002064a},
4844 + {0x0000a524, 0x0002484a, 0x0002484a, 0x0002484a, 0x0002484a},
4845 + {0x0000a528, 0x00028a4a, 0x00028a4a, 0x00028a4a, 0x00028a4a},
4846 + {0x0000a52c, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a},
4847 + {0x0000a530, 0x00030e4a, 0x00030e4a, 0x00030e4a, 0x00030e4a},
4848 + {0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a},
4851 +static const u32 ar9462_2p0_soc_preamble[][2] = {
4852 + /* Addr allmodes */
4853 + {0x00007020, 0x00000000},
4854 + {0x00007034, 0x00000002},
4855 + {0x00007038, 0x000004c2},
4858 +static const u32 ar9462_2p0_sys2ant[][2] = {
4859 + /* Addr allmodes */
4860 + {0x00063120, 0x00801980},
4863 +static const u32 ar9462_2p0_mac_core[][2] = {
4864 + /* Addr allmodes */
4865 + {0x00000008, 0x00000000},
4866 + {0x00000030, 0x000e0085},
4867 + {0x00000034, 0x00000005},
4868 + {0x00000040, 0x00000000},
4869 + {0x00000044, 0x00000000},
4870 + {0x00000048, 0x00000008},
4871 + {0x0000004c, 0x00000010},
4872 + {0x00000050, 0x00000000},
4873 + {0x00001040, 0x002ffc0f},
4874 + {0x00001044, 0x002ffc0f},
4875 + {0x00001048, 0x002ffc0f},
4876 + {0x0000104c, 0x002ffc0f},
4877 + {0x00001050, 0x002ffc0f},
4878 + {0x00001054, 0x002ffc0f},
4879 + {0x00001058, 0x002ffc0f},
4880 + {0x0000105c, 0x002ffc0f},
4881 + {0x00001060, 0x002ffc0f},
4882 + {0x00001064, 0x002ffc0f},
4883 + {0x000010f0, 0x00000100},
4884 + {0x00001270, 0x00000000},
4885 + {0x000012b0, 0x00000000},
4886 + {0x000012f0, 0x00000000},
4887 + {0x0000143c, 0x00000000},
4888 + {0x0000147c, 0x00000000},
4889 + {0x00001810, 0x0f000003},
4890 + {0x00008000, 0x00000000},
4891 + {0x00008004, 0x00000000},
4892 + {0x00008008, 0x00000000},
4893 + {0x0000800c, 0x00000000},
4894 + {0x00008018, 0x00000000},
4895 + {0x00008020, 0x00000000},
4896 + {0x00008038, 0x00000000},
4897 + {0x0000803c, 0x00080000},
4898 + {0x00008040, 0x00000000},
4899 + {0x00008044, 0x00000000},
4900 + {0x00008048, 0x00000000},
4901 + {0x0000804c, 0xffffffff},
4902 + {0x00008050, 0xffffffff},
4903 + {0x00008054, 0x00000000},
4904 + {0x00008058, 0x00000000},
4905 + {0x0000805c, 0x000fc78f},
4906 + {0x00008060, 0x0000000f},
4907 + {0x00008064, 0x00000000},
4908 + {0x00008070, 0x00000310},
4909 + {0x00008074, 0x00000020},
4910 + {0x00008078, 0x00000000},
4911 + {0x0000809c, 0x0000000f},
4912 + {0x000080a0, 0x00000000},
4913 + {0x000080a4, 0x02ff0000},
4914 + {0x000080a8, 0x0e070605},
4915 + {0x000080ac, 0x0000000d},
4916 + {0x000080b0, 0x00000000},
4917 + {0x000080b4, 0x00000000},
4918 + {0x000080b8, 0x00000000},
4919 + {0x000080bc, 0x00000000},
4920 + {0x000080c0, 0x2a800000},
4921 + {0x000080c4, 0x06900168},
4922 + {0x000080c8, 0x13881c20},
4923 + {0x000080cc, 0x01f40000},
4924 + {0x000080d0, 0x00252500},
4925 + {0x000080d4, 0x00b00005},
4926 + {0x000080d8, 0x00400002},
4927 + {0x000080dc, 0x00000000},
4928 + {0x000080e0, 0xffffffff},
4929 + {0x000080e4, 0x0000ffff},
4930 + {0x000080e8, 0x3f3f3f3f},
4931 + {0x000080ec, 0x00000000},
4932 + {0x000080f0, 0x00000000},
4933 + {0x000080f4, 0x00000000},
4934 + {0x000080fc, 0x00020000},
4935 + {0x00008100, 0x00000000},
4936 + {0x00008108, 0x00000052},
4937 + {0x0000810c, 0x00000000},
4938 + {0x00008110, 0x00000000},
4939 + {0x00008114, 0x000007ff},
4940 + {0x00008118, 0x000000aa},
4941 + {0x0000811c, 0x00003210},
4942 + {0x00008124, 0x00000000},
4943 + {0x00008128, 0x00000000},
4944 + {0x0000812c, 0x00000000},
4945 + {0x00008130, 0x00000000},
4946 + {0x00008134, 0x00000000},
4947 + {0x00008138, 0x00000000},
4948 + {0x0000813c, 0x0000ffff},
4949 + {0x00008144, 0xffffffff},
4950 + {0x00008168, 0x00000000},
4951 + {0x0000816c, 0x00000000},
4952 + {0x00008170, 0x18486e00},
4953 + {0x00008174, 0x33332210},
4954 + {0x00008178, 0x00000000},
4955 + {0x0000817c, 0x00020000},
4956 + {0x000081c4, 0x33332210},
4957 + {0x000081c8, 0x00000000},
4958 + {0x000081cc, 0x00000000},
4959 + {0x000081d4, 0x00000000},
4960 + {0x000081ec, 0x00000000},
4961 + {0x000081f0, 0x00000000},
4962 + {0x000081f4, 0x00000000},
4963 + {0x000081f8, 0x00000000},
4964 + {0x000081fc, 0x00000000},
4965 + {0x00008240, 0x00100000},
4966 + {0x00008244, 0x0010f400},
4967 + {0x00008248, 0x00000800},
4968 + {0x0000824c, 0x0001e800},
4969 + {0x00008250, 0x00000000},
4970 + {0x00008254, 0x00000000},
4971 + {0x00008258, 0x00000000},
4972 + {0x0000825c, 0x40000000},
4973 + {0x00008260, 0x00080922},
4974 + {0x00008264, 0x99c00010},
4975 + {0x00008268, 0xffffffff},
4976 + {0x0000826c, 0x0000ffff},
4977 + {0x00008270, 0x00000000},
4978 + {0x00008274, 0x40000000},
4979 + {0x00008278, 0x003e4180},
4980 + {0x0000827c, 0x00000004},
4981 + {0x00008284, 0x0000002c},
4982 + {0x00008288, 0x0000002c},
4983 + {0x0000828c, 0x000000ff},
4984 + {0x00008294, 0x00000000},
4985 + {0x00008298, 0x00000000},
4986 + {0x0000829c, 0x00000000},
4987 + {0x00008300, 0x00000140},
4988 + {0x00008314, 0x00000000},
4989 + {0x0000831c, 0x0000010d},
4990 + {0x00008328, 0x00000000},
4991 + {0x0000832c, 0x0000001f},
4992 + {0x00008330, 0x00000302},
4993 + {0x00008334, 0x00000700},
4994 + {0x00008338, 0xffff0000},
4995 + {0x0000833c, 0x02400000},
4996 + {0x00008340, 0x000107ff},
4997 + {0x00008344, 0xaa48105b},
4998 + {0x00008348, 0x008f0000},
4999 + {0x0000835c, 0x00000000},
5000 + {0x00008360, 0xffffffff},
5001 + {0x00008364, 0xffffffff},
5002 + {0x00008368, 0x00000000},
5003 + {0x00008370, 0x00000000},
5004 + {0x00008374, 0x000000ff},
5005 + {0x00008378, 0x00000000},
5006 + {0x0000837c, 0x00000000},
5007 + {0x00008380, 0xffffffff},
5008 + {0x00008384, 0xffffffff},
5009 + {0x00008390, 0xffffffff},
5010 + {0x00008394, 0xffffffff},
5011 + {0x00008398, 0x00000000},
5012 + {0x0000839c, 0x00000000},
5013 + {0x000083a4, 0x0000fa14},
5014 + {0x000083a8, 0x000f0c00},
5015 + {0x000083ac, 0x33332210},
5016 + {0x000083b0, 0x33332210},
5017 + {0x000083b4, 0x33332210},
5018 + {0x000083b8, 0x33332210},
5019 + {0x000083bc, 0x00000000},
5020 + {0x000083c0, 0x00000000},
5021 + {0x000083c4, 0x00000000},
5022 + {0x000083c8, 0x00000000},
5023 + {0x000083cc, 0x00000200},
5024 + {0x000083d0, 0x000301ff},
5027 +static const u32 ar9462_2p0_mac_postamble[][5] = {
5028 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
5029 + {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
5030 + {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
5031 + {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38},
5032 + {0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00},
5033 + {0x0000801c, 0x128d8027, 0x128d804f, 0x12e00057, 0x12e0002b},
5034 + {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810},
5035 + {0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a},
5036 + {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440},
5039 +static const u32 ar9462_common_mixed_rx_gain_table_2p0[][2] = {
5040 + /* Addr allmodes */
5041 + {0x0000a000, 0x00010000},
5042 + {0x0000a004, 0x00030002},
5043 + {0x0000a008, 0x00050004},
5044 + {0x0000a00c, 0x00810080},
5045 + {0x0000a010, 0x00830082},
5046 + {0x0000a014, 0x01810180},
5047 + {0x0000a018, 0x01830182},
5048 + {0x0000a01c, 0x01850184},
5049 + {0x0000a020, 0x01890188},
5050 + {0x0000a024, 0x018b018a},
5051 + {0x0000a028, 0x018d018c},
5052 + {0x0000a02c, 0x03820190},
5053 + {0x0000a030, 0x03840383},
5054 + {0x0000a034, 0x03880385},
5055 + {0x0000a038, 0x038a0389},
5056 + {0x0000a03c, 0x038c038b},
5057 + {0x0000a040, 0x0390038d},
5058 + {0x0000a044, 0x03920391},
5059 + {0x0000a048, 0x03940393},
5060 + {0x0000a04c, 0x03960395},
5061 + {0x0000a050, 0x00000000},
5062 + {0x0000a054, 0x00000000},
5063 + {0x0000a058, 0x00000000},
5064 + {0x0000a05c, 0x00000000},
5065 + {0x0000a060, 0x00000000},
5066 + {0x0000a064, 0x00000000},
5067 + {0x0000a068, 0x00000000},
5068 + {0x0000a06c, 0x00000000},
5069 + {0x0000a070, 0x00000000},
5070 + {0x0000a074, 0x00000000},
5071 + {0x0000a078, 0x00000000},
5072 + {0x0000a07c, 0x00000000},
5073 + {0x0000a080, 0x29292929},
5074 + {0x0000a084, 0x29292929},
5075 + {0x0000a088, 0x29292929},
5076 + {0x0000a08c, 0x29292929},
5077 + {0x0000a090, 0x22292929},
5078 + {0x0000a094, 0x1d1d2222},
5079 + {0x0000a098, 0x0c111117},
5080 + {0x0000a09c, 0x00030303},
5081 + {0x0000a0a0, 0x00000000},
5082 + {0x0000a0a4, 0x00000000},
5083 + {0x0000a0a8, 0x00000000},
5084 + {0x0000a0ac, 0x00000000},
5085 + {0x0000a0b0, 0x00000000},
5086 + {0x0000a0b4, 0x00000000},
5087 + {0x0000a0b8, 0x00000000},
5088 + {0x0000a0bc, 0x00000000},
5089 + {0x0000a0c0, 0x001f0000},
5090 + {0x0000a0c4, 0x01000101},
5091 + {0x0000a0c8, 0x011e011f},
5092 + {0x0000a0cc, 0x011c011d},
5093 + {0x0000a0d0, 0x02030204},
5094 + {0x0000a0d4, 0x02010202},
5095 + {0x0000a0d8, 0x021f0200},
5096 + {0x0000a0dc, 0x0302021e},
5097 + {0x0000a0e0, 0x03000301},
5098 + {0x0000a0e4, 0x031e031f},
5099 + {0x0000a0e8, 0x0402031d},
5100 + {0x0000a0ec, 0x04000401},
5101 + {0x0000a0f0, 0x041e041f},
5102 + {0x0000a0f4, 0x0502041d},
5103 + {0x0000a0f8, 0x05000501},
5104 + {0x0000a0fc, 0x051e051f},
5105 + {0x0000a100, 0x06010602},
5106 + {0x0000a104, 0x061f0600},
5107 + {0x0000a108, 0x061d061e},
5108 + {0x0000a10c, 0x07020703},
5109 + {0x0000a110, 0x07000701},
5110 + {0x0000a114, 0x00000000},
5111 + {0x0000a118, 0x00000000},
5112 + {0x0000a11c, 0x00000000},
5113 + {0x0000a120, 0x00000000},
5114 + {0x0000a124, 0x00000000},
5115 + {0x0000a128, 0x00000000},
5116 + {0x0000a12c, 0x00000000},
5117 + {0x0000a130, 0x00000000},
5118 + {0x0000a134, 0x00000000},
5119 + {0x0000a138, 0x00000000},
5120 + {0x0000a13c, 0x00000000},
5121 + {0x0000a140, 0x001f0000},
5122 + {0x0000a144, 0x01000101},
5123 + {0x0000a148, 0x011e011f},
5124 + {0x0000a14c, 0x011c011d},
5125 + {0x0000a150, 0x02030204},
5126 + {0x0000a154, 0x02010202},
5127 + {0x0000a158, 0x021f0200},
5128 + {0x0000a15c, 0x0302021e},
5129 + {0x0000a160, 0x03000301},
5130 + {0x0000a164, 0x031e031f},
5131 + {0x0000a168, 0x0402031d},
5132 + {0x0000a16c, 0x04000401},
5133 + {0x0000a170, 0x041e041f},
5134 + {0x0000a174, 0x0502041d},
5135 + {0x0000a178, 0x05000501},
5136 + {0x0000a17c, 0x051e051f},
5137 + {0x0000a180, 0x06010602},
5138 + {0x0000a184, 0x061f0600},
5139 + {0x0000a188, 0x061d061e},
5140 + {0x0000a18c, 0x07020703},
5141 + {0x0000a190, 0x07000701},
5142 + {0x0000a194, 0x00000000},
5143 + {0x0000a198, 0x00000000},
5144 + {0x0000a19c, 0x00000000},
5145 + {0x0000a1a0, 0x00000000},
5146 + {0x0000a1a4, 0x00000000},
5147 + {0x0000a1a8, 0x00000000},
5148 + {0x0000a1ac, 0x00000000},
5149 + {0x0000a1b0, 0x00000000},
5150 + {0x0000a1b4, 0x00000000},
5151 + {0x0000a1b8, 0x00000000},
5152 + {0x0000a1bc, 0x00000000},
5153 + {0x0000a1c0, 0x00000000},
5154 + {0x0000a1c4, 0x00000000},
5155 + {0x0000a1c8, 0x00000000},
5156 + {0x0000a1cc, 0x00000000},
5157 + {0x0000a1d0, 0x00000000},
5158 + {0x0000a1d4, 0x00000000},
5159 + {0x0000a1d8, 0x00000000},
5160 + {0x0000a1dc, 0x00000000},
5161 + {0x0000a1e0, 0x00000000},
5162 + {0x0000a1e4, 0x00000000},
5163 + {0x0000a1e8, 0x00000000},
5164 + {0x0000a1ec, 0x00000000},
5165 + {0x0000a1f0, 0x00000396},
5166 + {0x0000a1f4, 0x00000396},
5167 + {0x0000a1f8, 0x00000396},
5168 + {0x0000a1fc, 0x00000196},
5169 + {0x0000b000, 0x00010000},
5170 + {0x0000b004, 0x00030002},
5171 + {0x0000b008, 0x00050004},
5172 + {0x0000b00c, 0x00810080},
5173 + {0x0000b010, 0x00830082},
5174 + {0x0000b014, 0x01810180},
5175 + {0x0000b018, 0x01830182},
5176 + {0x0000b01c, 0x01850184},
5177 + {0x0000b020, 0x02810280},
5178 + {0x0000b024, 0x02830282},
5179 + {0x0000b028, 0x02850284},
5180 + {0x0000b02c, 0x02890288},
5181 + {0x0000b030, 0x028b028a},
5182 + {0x0000b034, 0x0388028c},
5183 + {0x0000b038, 0x038a0389},
5184 + {0x0000b03c, 0x038c038b},
5185 + {0x0000b040, 0x0390038d},
5186 + {0x0000b044, 0x03920391},
5187 + {0x0000b048, 0x03940393},
5188 + {0x0000b04c, 0x03960395},
5189 + {0x0000b050, 0x00000000},
5190 + {0x0000b054, 0x00000000},
5191 + {0x0000b058, 0x00000000},
5192 + {0x0000b05c, 0x00000000},
5193 + {0x0000b060, 0x00000000},
5194 + {0x0000b064, 0x00000000},
5195 + {0x0000b068, 0x00000000},
5196 + {0x0000b06c, 0x00000000},
5197 + {0x0000b070, 0x00000000},
5198 + {0x0000b074, 0x00000000},
5199 + {0x0000b078, 0x00000000},
5200 + {0x0000b07c, 0x00000000},
5201 + {0x0000b080, 0x2a2d2f32},
5202 + {0x0000b084, 0x21232328},
5203 + {0x0000b088, 0x19191c1e},
5204 + {0x0000b08c, 0x12141417},
5205 + {0x0000b090, 0x07070e0e},
5206 + {0x0000b094, 0x03030305},
5207 + {0x0000b098, 0x00000003},
5208 + {0x0000b09c, 0x00000000},
5209 + {0x0000b0a0, 0x00000000},
5210 + {0x0000b0a4, 0x00000000},
5211 + {0x0000b0a8, 0x00000000},
5212 + {0x0000b0ac, 0x00000000},
5213 + {0x0000b0b0, 0x00000000},
5214 + {0x0000b0b4, 0x00000000},
5215 + {0x0000b0b8, 0x00000000},
5216 + {0x0000b0bc, 0x00000000},
5217 + {0x0000b0c0, 0x003f0020},
5218 + {0x0000b0c4, 0x00400041},
5219 + {0x0000b0c8, 0x0140005f},
5220 + {0x0000b0cc, 0x0160015f},
5221 + {0x0000b0d0, 0x017e017f},
5222 + {0x0000b0d4, 0x02410242},
5223 + {0x0000b0d8, 0x025f0240},
5224 + {0x0000b0dc, 0x027f0260},
5225 + {0x0000b0e0, 0x0341027e},
5226 + {0x0000b0e4, 0x035f0340},
5227 + {0x0000b0e8, 0x037f0360},
5228 + {0x0000b0ec, 0x04400441},
5229 + {0x0000b0f0, 0x0460045f},
5230 + {0x0000b0f4, 0x0541047f},
5231 + {0x0000b0f8, 0x055f0540},
5232 + {0x0000b0fc, 0x057f0560},
5233 + {0x0000b100, 0x06400641},
5234 + {0x0000b104, 0x0660065f},
5235 + {0x0000b108, 0x067e067f},
5236 + {0x0000b10c, 0x07410742},
5237 + {0x0000b110, 0x075f0740},
5238 + {0x0000b114, 0x077f0760},
5239 + {0x0000b118, 0x07800781},
5240 + {0x0000b11c, 0x07a0079f},
5241 + {0x0000b120, 0x07c107bf},
5242 + {0x0000b124, 0x000007c0},
5243 + {0x0000b128, 0x00000000},
5244 + {0x0000b12c, 0x00000000},
5245 + {0x0000b130, 0x00000000},
5246 + {0x0000b134, 0x00000000},
5247 + {0x0000b138, 0x00000000},
5248 + {0x0000b13c, 0x00000000},
5249 + {0x0000b140, 0x003f0020},
5250 + {0x0000b144, 0x00400041},
5251 + {0x0000b148, 0x0140005f},
5252 + {0x0000b14c, 0x0160015f},
5253 + {0x0000b150, 0x017e017f},
5254 + {0x0000b154, 0x02410242},
5255 + {0x0000b158, 0x025f0240},
5256 + {0x0000b15c, 0x027f0260},
5257 + {0x0000b160, 0x0341027e},
5258 + {0x0000b164, 0x035f0340},
5259 + {0x0000b168, 0x037f0360},
5260 + {0x0000b16c, 0x04400441},
5261 + {0x0000b170, 0x0460045f},
5262 + {0x0000b174, 0x0541047f},
5263 + {0x0000b178, 0x055f0540},
5264 + {0x0000b17c, 0x057f0560},
5265 + {0x0000b180, 0x06400641},
5266 + {0x0000b184, 0x0660065f},
5267 + {0x0000b188, 0x067e067f},
5268 + {0x0000b18c, 0x07410742},
5269 + {0x0000b190, 0x075f0740},
5270 + {0x0000b194, 0x077f0760},
5271 + {0x0000b198, 0x07800781},
5272 + {0x0000b19c, 0x07a0079f},
5273 + {0x0000b1a0, 0x07c107bf},
5274 + {0x0000b1a4, 0x000007c0},
5275 + {0x0000b1a8, 0x00000000},
5276 + {0x0000b1ac, 0x00000000},
5277 + {0x0000b1b0, 0x00000000},
5278 + {0x0000b1b4, 0x00000000},
5279 + {0x0000b1b8, 0x00000000},
5280 + {0x0000b1bc, 0x00000000},
5281 + {0x0000b1c0, 0x00000000},
5282 + {0x0000b1c4, 0x00000000},
5283 + {0x0000b1c8, 0x00000000},
5284 + {0x0000b1cc, 0x00000000},
5285 + {0x0000b1d0, 0x00000000},
5286 + {0x0000b1d4, 0x00000000},
5287 + {0x0000b1d8, 0x00000000},
5288 + {0x0000b1dc, 0x00000000},
5289 + {0x0000b1e0, 0x00000000},
5290 + {0x0000b1e4, 0x00000000},
5291 + {0x0000b1e8, 0x00000000},
5292 + {0x0000b1ec, 0x00000000},
5293 + {0x0000b1f0, 0x00000396},
5294 + {0x0000b1f4, 0x00000396},
5295 + {0x0000b1f8, 0x00000396},
5296 + {0x0000b1fc, 0x00000196},
5299 +static const u32 ar9462_modes_green_ob_db_tx_gain_table_2p0[][5] = {
5300 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
5301 + {0x000098bc, 0x00000003, 0x00000003, 0x00000003, 0x00000003},
5302 + {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
5303 + {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
5304 + {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
5305 + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
5306 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
5307 + {0x0000a458, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
5308 + {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
5309 + {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002},
5310 + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
5311 + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
5312 + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
5313 + {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
5314 + {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
5315 + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
5316 + {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
5317 + {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
5318 + {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
5319 + {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
5320 + {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20},
5321 + {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22},
5322 + {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24},
5323 + {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640},
5324 + {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660},
5325 + {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861},
5326 + {0x0000a548, 0x53025eb2, 0x53025eb2, 0x3e001a81, 0x3e001a81},
5327 + {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
5328 + {0x0000a550, 0x5f025ef6, 0x5f025ef6, 0x44001c84, 0x44001c84},
5329 + {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3},
5330 + {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5},
5331 + {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9},
5332 + {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb},
5333 + {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5334 + {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5335 + {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5336 + {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5337 + {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5338 + {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5339 + {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
5340 + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
5341 + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
5342 + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
5343 + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
5344 + {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
5345 + {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
5346 + {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
5347 + {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
5348 + {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
5349 + {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
5350 + {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
5351 + {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
5352 + {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
5353 + {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
5354 + {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
5355 + {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
5356 + {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
5357 + {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
5358 + {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
5359 + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
5360 + {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
5361 + {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060},
5362 + {0x00016054, 0x6db60180, 0x6db60180, 0x6db60180, 0x6db60180},
5363 + {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
5364 + {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
5365 + {0x00016454, 0x6db60180, 0x6db60180, 0x6db60180, 0x6db60180},
5368 +static const u32 ar9462_2p0_BTCOEX_MAX_TXPWR_table[][2] = {
5369 + /* Addr allmodes */
5370 + {0x000018c0, 0x10101010},
5371 + {0x000018c4, 0x10101010},
5372 + {0x000018c8, 0x10101010},
5373 + {0x000018cc, 0x10101010},
5374 + {0x000018d0, 0x10101010},
5375 + {0x000018d4, 0x10101010},
5376 + {0x000018d8, 0x10101010},
5377 + {0x000018dc, 0x10101010},
5380 +static const u32 ar9462_2p0_baseband_core_emulation[][2] = {
5381 + /* Addr allmodes */
5382 + {0x00009800, 0xafa68e30},
5383 + {0x00009884, 0x00002842},
5384 + {0x00009c04, 0xff55ff55},
5385 + {0x00009c08, 0x0320ff55},
5386 + {0x00009e50, 0x00000000},
5387 + {0x00009fcc, 0x00000014},
5388 + {0x0000a344, 0x00000010},
5389 + {0x0000a398, 0x00000000},
5390 + {0x0000a39c, 0x71733d01},
5391 + {0x0000a3a0, 0xd0ad5c12},
5392 + {0x0000a3c0, 0x22222220},
5393 + {0x0000a3c4, 0x22222222},
5394 + {0x0000a404, 0x00418a11},
5395 + {0x0000a418, 0x050001ce},
5396 + {0x0000a438, 0x00001800},
5397 + {0x0000a458, 0x01444452},
5398 + {0x0000a644, 0x3fad9d74},
5399 + {0x0000a690, 0x00000038},
5402 +#endif /* INITVALS_9462_2P0_H */
5403 --- a/drivers/net/wireless/ath/ath9k/ar9480_1p0_initvals.h
5407 - * Copyright (c) 2010 Atheros Communications Inc.
5409 - * Permission to use, copy, modify, and/or distribute this software for any
5410 - * purpose with or without fee is hereby granted, provided that the above
5411 - * copyright notice and this permission notice appear in all copies.
5413 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
5414 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
5415 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
5416 - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
5417 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
5418 - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
5419 - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5422 -#ifndef INITVALS_9480_1P0_H
5423 -#define INITVALS_9480_1P0_H
5427 -static const u32 ar9480_1p0_mac_core[][2] = {
5428 - /* Addr allmodes */
5429 - {0x00000008, 0x00000000},
5430 - {0x00000030, 0x00060085},
5431 - {0x00000034, 0x00000005},
5432 - {0x00000040, 0x00000000},
5433 - {0x00000044, 0x00000000},
5434 - {0x00000048, 0x00000008},
5435 - {0x0000004c, 0x00000010},
5436 - {0x00000050, 0x00000000},
5437 - {0x00001040, 0x002ffc0f},
5438 - {0x00001044, 0x002ffc0f},
5439 - {0x00001048, 0x002ffc0f},
5440 - {0x0000104c, 0x002ffc0f},
5441 - {0x00001050, 0x002ffc0f},
5442 - {0x00001054, 0x002ffc0f},
5443 - {0x00001058, 0x002ffc0f},
5444 - {0x0000105c, 0x002ffc0f},
5445 - {0x00001060, 0x002ffc0f},
5446 - {0x00001064, 0x002ffc0f},
5447 - {0x000010f0, 0x00000100},
5448 - {0x00001270, 0x00000000},
5449 - {0x000012b0, 0x00000000},
5450 - {0x000012f0, 0x00000000},
5451 - {0x0000143c, 0x00000000},
5452 - {0x0000147c, 0x00000000},
5453 - {0x00001810, 0x0f000003},
5454 - {0x00008000, 0x00000000},
5455 - {0x00008004, 0x00000000},
5456 - {0x00008008, 0x00000000},
5457 - {0x0000800c, 0x00000000},
5458 - {0x00008018, 0x00000000},
5459 - {0x00008020, 0x00000000},
5460 - {0x00008038, 0x00000000},
5461 - {0x0000803c, 0x00080000},
5462 - {0x00008040, 0x00000000},
5463 - {0x00008044, 0x00000000},
5464 - {0x00008048, 0x00000000},
5465 - {0x0000804c, 0xffffffff},
5466 - {0x00008050, 0xffffffff},
5467 - {0x00008054, 0x00000000},
5468 - {0x00008058, 0x00000000},
5469 - {0x0000805c, 0x000fc78f},
5470 - {0x00008060, 0x0000000f},
5471 - {0x00008064, 0x00000000},
5472 - {0x00008070, 0x00000310},
5473 - {0x00008074, 0x00000020},
5474 - {0x00008078, 0x00000000},
5475 - {0x0000809c, 0x0000000f},
5476 - {0x000080a0, 0x00000000},
5477 - {0x000080a4, 0x02ff0000},
5478 - {0x000080a8, 0x0e070605},
5479 - {0x000080ac, 0x0000000d},
5480 - {0x000080b0, 0x00000000},
5481 - {0x000080b4, 0x00000000},
5482 - {0x000080b8, 0x00000000},
5483 - {0x000080bc, 0x00000000},
5484 - {0x000080c0, 0x2a800000},
5485 - {0x000080c4, 0x06900168},
5486 - {0x000080c8, 0x13881c20},
5487 - {0x000080cc, 0x01f40000},
5488 - {0x000080d0, 0x00252500},
5489 - {0x000080d4, 0x00a00005},
5490 - {0x000080d8, 0x00400002},
5491 - {0x000080dc, 0x00000000},
5492 - {0x000080e0, 0xffffffff},
5493 - {0x000080e4, 0x0000ffff},
5494 - {0x000080e8, 0x3f3f3f3f},
5495 - {0x000080ec, 0x00000000},
5496 - {0x000080f0, 0x00000000},
5497 - {0x000080f4, 0x00000000},
5498 - {0x000080fc, 0x00020000},
5499 - {0x00008100, 0x00000000},
5500 - {0x00008108, 0x00000052},
5501 - {0x0000810c, 0x00000000},
5502 - {0x00008110, 0x00000000},
5503 - {0x00008114, 0x000007ff},
5504 - {0x00008118, 0x000000aa},
5505 - {0x0000811c, 0x00003210},
5506 - {0x00008124, 0x00000000},
5507 - {0x00008128, 0x00000000},
5508 - {0x0000812c, 0x00000000},
5509 - {0x00008130, 0x00000000},
5510 - {0x00008134, 0x00000000},
5511 - {0x00008138, 0x00000000},
5512 - {0x0000813c, 0x0000ffff},
5513 - {0x00008144, 0xffffffff},
5514 - {0x00008168, 0x00000000},
5515 - {0x0000816c, 0x00000000},
5516 - {0x00008170, 0x18486e00},
5517 - {0x00008174, 0x33332210},
5518 - {0x00008178, 0x00000000},
5519 - {0x0000817c, 0x00020000},
5520 - {0x000081c4, 0x33332210},
5521 - {0x000081c8, 0x00000000},
5522 - {0x000081cc, 0x00000000},
5523 - {0x000081d4, 0x00000000},
5524 - {0x000081ec, 0x00000000},
5525 - {0x000081f0, 0x00000000},
5526 - {0x000081f4, 0x00000000},
5527 - {0x000081f8, 0x00000000},
5528 - {0x000081fc, 0x00000000},
5529 - {0x00008240, 0x00100000},
5530 - {0x00008244, 0x0010f400},
5531 - {0x00008248, 0x00000800},
5532 - {0x0000824c, 0x0001e800},
5533 - {0x00008250, 0x00000000},
5534 - {0x00008254, 0x00000000},
5535 - {0x00008258, 0x00000000},
5536 - {0x0000825c, 0x40000000},
5537 - {0x00008260, 0x00080922},
5538 - {0x00008264, 0x99c00010},
5539 - {0x00008268, 0xffffffff},
5540 - {0x0000826c, 0x0000ffff},
5541 - {0x00008270, 0x00000000},
5542 - {0x00008274, 0x40000000},
5543 - {0x00008278, 0x003e4180},
5544 - {0x0000827c, 0x00000004},
5545 - {0x00008284, 0x0000002c},
5546 - {0x00008288, 0x0000002c},
5547 - {0x0000828c, 0x000000ff},
5548 - {0x00008294, 0x00000000},
5549 - {0x00008298, 0x00000000},
5550 - {0x0000829c, 0x00000000},
5551 - {0x00008300, 0x00000140},
5552 - {0x00008314, 0x00000000},
5553 - {0x0000831c, 0x0000010d},
5554 - {0x00008328, 0x00000000},
5555 - {0x0000832c, 0x0000001f},
5556 - {0x00008330, 0x00000302},
5557 - {0x00008334, 0x00000700},
5558 - {0x00008338, 0xffff0000},
5559 - {0x0000833c, 0x02400000},
5560 - {0x00008340, 0x000107ff},
5561 - {0x00008344, 0xaa48105b},
5562 - {0x00008348, 0x008f0000},
5563 - {0x0000835c, 0x00000000},
5564 - {0x00008360, 0xffffffff},
5565 - {0x00008364, 0xffffffff},
5566 - {0x00008368, 0x00000000},
5567 - {0x00008370, 0x00000000},
5568 - {0x00008374, 0x000000ff},
5569 - {0x00008378, 0x00000000},
5570 - {0x0000837c, 0x00000000},
5571 - {0x00008380, 0xffffffff},
5572 - {0x00008384, 0xffffffff},
5573 - {0x00008390, 0xffffffff},
5574 - {0x00008394, 0xffffffff},
5575 - {0x00008398, 0x00000000},
5576 - {0x0000839c, 0x00000000},
5577 - {0x000083a4, 0x0000fa14},
5578 - {0x000083a8, 0x000f0c00},
5579 - {0x000083ac, 0x33332210},
5580 - {0x000083b0, 0x33332210},
5581 - {0x000083b4, 0x33332210},
5582 - {0x000083b8, 0x33332210},
5583 - {0x000083bc, 0x00000000},
5584 - {0x000083c0, 0x00000000},
5585 - {0x000083c4, 0x00000000},
5586 - {0x000083c8, 0x00000000},
5587 - {0x000083cc, 0x00000200},
5588 - {0x000083d0, 0x000301ff},
5591 -static const u32 ar9480_1p0_baseband_core_txfir_coeff_japan_2484[][2] = {
5592 - /* Addr allmodes */
5593 - {0x0000a398, 0x00000000},
5594 - {0x0000a39c, 0x6f7f0301},
5595 - {0x0000a3a0, 0xca9228ee},
5598 -static const u32 ar9480_1p0_sys3ant[][2] = {
5599 - /* Addr allmodes */
5600 - {0x00063280, 0x00040807},
5601 - {0x00063284, 0x104ccccc},
5604 -static const u32 ar9480_pcie_phy_clkreq_enable_L1_1p0[][2] = {
5605 - /* Addr allmodes */
5606 - {0x00018c00, 0x10053e5e},
5607 - {0x00018c04, 0x000801d8},
5608 - {0x00018c08, 0x0000580c},
5611 -static const u32 ar9480_1p0_mac_core_emulation[][2] = {
5612 - /* Addr allmodes */
5613 - {0x00000030, 0x00060085},
5614 - {0x00000044, 0x00000008},
5615 - {0x0000805c, 0xffffc7ff},
5616 - {0x00008344, 0xaa4a105b},
5619 -static const u32 ar9480_common_rx_gain_table_ar9280_2p0_1p0[][2] = {
5620 - /* Addr allmodes */
5621 - {0x0000a000, 0x02000101},
5622 - {0x0000a004, 0x02000102},
5623 - {0x0000a008, 0x02000103},
5624 - {0x0000a00c, 0x02000104},
5625 - {0x0000a010, 0x02000200},
5626 - {0x0000a014, 0x02000201},
5627 - {0x0000a018, 0x02000202},
5628 - {0x0000a01c, 0x02000203},
5629 - {0x0000a020, 0x02000204},
5630 - {0x0000a024, 0x02000205},
5631 - {0x0000a028, 0x02000208},
5632 - {0x0000a02c, 0x02000302},
5633 - {0x0000a030, 0x02000303},
5634 - {0x0000a034, 0x02000304},
5635 - {0x0000a038, 0x02000400},
5636 - {0x0000a03c, 0x02010300},
5637 - {0x0000a040, 0x02010301},
5638 - {0x0000a044, 0x02010302},
5639 - {0x0000a048, 0x02000500},
5640 - {0x0000a04c, 0x02010400},
5641 - {0x0000a050, 0x02020300},
5642 - {0x0000a054, 0x02020301},
5643 - {0x0000a058, 0x02020302},
5644 - {0x0000a05c, 0x02020303},
5645 - {0x0000a060, 0x02020400},
5646 - {0x0000a064, 0x02030300},
5647 - {0x0000a068, 0x02030301},
5648 - {0x0000a06c, 0x02030302},
5649 - {0x0000a070, 0x02030303},
5650 - {0x0000a074, 0x02030400},
5651 - {0x0000a078, 0x02040300},
5652 - {0x0000a07c, 0x02040301},
5653 - {0x0000a080, 0x02040302},
5654 - {0x0000a084, 0x02040303},
5655 - {0x0000a088, 0x02030500},
5656 - {0x0000a08c, 0x02040400},
5657 - {0x0000a090, 0x02050203},
5658 - {0x0000a094, 0x02050204},
5659 - {0x0000a098, 0x02050205},
5660 - {0x0000a09c, 0x02040500},
5661 - {0x0000a0a0, 0x02050301},
5662 - {0x0000a0a4, 0x02050302},
5663 - {0x0000a0a8, 0x02050303},
5664 - {0x0000a0ac, 0x02050400},
5665 - {0x0000a0b0, 0x02050401},
5666 - {0x0000a0b4, 0x02050402},
5667 - {0x0000a0b8, 0x02050403},
5668 - {0x0000a0bc, 0x02050500},
5669 - {0x0000a0c0, 0x02050501},
5670 - {0x0000a0c4, 0x02050502},
5671 - {0x0000a0c8, 0x02050503},
5672 - {0x0000a0cc, 0x02050504},
5673 - {0x0000a0d0, 0x02050600},
5674 - {0x0000a0d4, 0x02050601},
5675 - {0x0000a0d8, 0x02050602},
5676 - {0x0000a0dc, 0x02050603},
5677 - {0x0000a0e0, 0x02050604},
5678 - {0x0000a0e4, 0x02050700},
5679 - {0x0000a0e8, 0x02050701},
5680 - {0x0000a0ec, 0x02050702},
5681 - {0x0000a0f0, 0x02050703},
5682 - {0x0000a0f4, 0x02050704},
5683 - {0x0000a0f8, 0x02050705},
5684 - {0x0000a0fc, 0x02050708},
5685 - {0x0000a100, 0x02050709},
5686 - {0x0000a104, 0x0205070a},
5687 - {0x0000a108, 0x0205070b},
5688 - {0x0000a10c, 0x0205070c},
5689 - {0x0000a110, 0x0205070d},
5690 - {0x0000a114, 0x02050710},
5691 - {0x0000a118, 0x02050711},
5692 - {0x0000a11c, 0x02050712},
5693 - {0x0000a120, 0x02050713},
5694 - {0x0000a124, 0x02050714},
5695 - {0x0000a128, 0x02050715},
5696 - {0x0000a12c, 0x02050730},
5697 - {0x0000a130, 0x02050731},
5698 - {0x0000a134, 0x02050732},
5699 - {0x0000a138, 0x02050733},
5700 - {0x0000a13c, 0x02050734},
5701 - {0x0000a140, 0x02050735},
5702 - {0x0000a144, 0x02050750},
5703 - {0x0000a148, 0x02050751},
5704 - {0x0000a14c, 0x02050752},
5705 - {0x0000a150, 0x02050753},
5706 - {0x0000a154, 0x02050754},
5707 - {0x0000a158, 0x02050755},
5708 - {0x0000a15c, 0x02050770},
5709 - {0x0000a160, 0x02050771},
5710 - {0x0000a164, 0x02050772},
5711 - {0x0000a168, 0x02050773},
5712 - {0x0000a16c, 0x02050774},
5713 - {0x0000a170, 0x02050775},
5714 - {0x0000a174, 0x00000776},
5715 - {0x0000a178, 0x00000776},
5716 - {0x0000a17c, 0x00000776},
5717 - {0x0000a180, 0x00000776},
5718 - {0x0000a184, 0x00000776},
5719 - {0x0000a188, 0x00000776},
5720 - {0x0000a18c, 0x00000776},
5721 - {0x0000a190, 0x00000776},
5722 - {0x0000a194, 0x00000776},
5723 - {0x0000a198, 0x00000776},
5724 - {0x0000a19c, 0x00000776},
5725 - {0x0000a1a0, 0x00000776},
5726 - {0x0000a1a4, 0x00000776},
5727 - {0x0000a1a8, 0x00000776},
5728 - {0x0000a1ac, 0x00000776},
5729 - {0x0000a1b0, 0x00000776},
5730 - {0x0000a1b4, 0x00000776},
5731 - {0x0000a1b8, 0x00000776},
5732 - {0x0000a1bc, 0x00000776},
5733 - {0x0000a1c0, 0x00000776},
5734 - {0x0000a1c4, 0x00000776},
5735 - {0x0000a1c8, 0x00000776},
5736 - {0x0000a1cc, 0x00000776},
5737 - {0x0000a1d0, 0x00000776},
5738 - {0x0000a1d4, 0x00000776},
5739 - {0x0000a1d8, 0x00000776},
5740 - {0x0000a1dc, 0x00000776},
5741 - {0x0000a1e0, 0x00000776},
5742 - {0x0000a1e4, 0x00000776},
5743 - {0x0000a1e8, 0x00000776},
5744 - {0x0000a1ec, 0x00000776},
5745 - {0x0000a1f0, 0x00000776},
5746 - {0x0000a1f4, 0x00000776},
5747 - {0x0000a1f8, 0x00000776},
5748 - {0x0000a1fc, 0x00000776},
5749 - {0x0000b000, 0x02000101},
5750 - {0x0000b004, 0x02000102},
5751 - {0x0000b008, 0x02000103},
5752 - {0x0000b00c, 0x02000104},
5753 - {0x0000b010, 0x02000200},
5754 - {0x0000b014, 0x02000201},
5755 - {0x0000b018, 0x02000202},
5756 - {0x0000b01c, 0x02000203},
5757 - {0x0000b020, 0x02000204},
5758 - {0x0000b024, 0x02000205},
5759 - {0x0000b028, 0x02000208},
5760 - {0x0000b02c, 0x02000302},
5761 - {0x0000b030, 0x02000303},
5762 - {0x0000b034, 0x02000304},
5763 - {0x0000b038, 0x02000400},
5764 - {0x0000b03c, 0x02010300},
5765 - {0x0000b040, 0x02010301},
5766 - {0x0000b044, 0x02010302},
5767 - {0x0000b048, 0x02000500},
5768 - {0x0000b04c, 0x02010400},
5769 - {0x0000b050, 0x02020300},
5770 - {0x0000b054, 0x02020301},
5771 - {0x0000b058, 0x02020302},
5772 - {0x0000b05c, 0x02020303},
5773 - {0x0000b060, 0x02020400},
5774 - {0x0000b064, 0x02030300},
5775 - {0x0000b068, 0x02030301},
5776 - {0x0000b06c, 0x02030302},
5777 - {0x0000b070, 0x02030303},
5778 - {0x0000b074, 0x02030400},
5779 - {0x0000b078, 0x02040300},
5780 - {0x0000b07c, 0x02040301},
5781 - {0x0000b080, 0x02040302},
5782 - {0x0000b084, 0x02040303},
5783 - {0x0000b088, 0x02030500},
5784 - {0x0000b08c, 0x02040400},
5785 - {0x0000b090, 0x02050203},
5786 - {0x0000b094, 0x02050204},
5787 - {0x0000b098, 0x02050205},
5788 - {0x0000b09c, 0x02040500},
5789 - {0x0000b0a0, 0x02050301},
5790 - {0x0000b0a4, 0x02050302},
5791 - {0x0000b0a8, 0x02050303},
5792 - {0x0000b0ac, 0x02050400},
5793 - {0x0000b0b0, 0x02050401},
5794 - {0x0000b0b4, 0x02050402},
5795 - {0x0000b0b8, 0x02050403},
5796 - {0x0000b0bc, 0x02050500},
5797 - {0x0000b0c0, 0x02050501},
5798 - {0x0000b0c4, 0x02050502},
5799 - {0x0000b0c8, 0x02050503},
5800 - {0x0000b0cc, 0x02050504},
5801 - {0x0000b0d0, 0x02050600},
5802 - {0x0000b0d4, 0x02050601},
5803 - {0x0000b0d8, 0x02050602},
5804 - {0x0000b0dc, 0x02050603},
5805 - {0x0000b0e0, 0x02050604},
5806 - {0x0000b0e4, 0x02050700},
5807 - {0x0000b0e8, 0x02050701},
5808 - {0x0000b0ec, 0x02050702},
5809 - {0x0000b0f0, 0x02050703},
5810 - {0x0000b0f4, 0x02050704},
5811 - {0x0000b0f8, 0x02050705},
5812 - {0x0000b0fc, 0x02050708},
5813 - {0x0000b100, 0x02050709},
5814 - {0x0000b104, 0x0205070a},
5815 - {0x0000b108, 0x0205070b},
5816 - {0x0000b10c, 0x0205070c},
5817 - {0x0000b110, 0x0205070d},
5818 - {0x0000b114, 0x02050710},
5819 - {0x0000b118, 0x02050711},
5820 - {0x0000b11c, 0x02050712},
5821 - {0x0000b120, 0x02050713},
5822 - {0x0000b124, 0x02050714},
5823 - {0x0000b128, 0x02050715},
5824 - {0x0000b12c, 0x02050730},
5825 - {0x0000b130, 0x02050731},
5826 - {0x0000b134, 0x02050732},
5827 - {0x0000b138, 0x02050733},
5828 - {0x0000b13c, 0x02050734},
5829 - {0x0000b140, 0x02050735},
5830 - {0x0000b144, 0x02050750},
5831 - {0x0000b148, 0x02050751},
5832 - {0x0000b14c, 0x02050752},
5833 - {0x0000b150, 0x02050753},
5834 - {0x0000b154, 0x02050754},
5835 - {0x0000b158, 0x02050755},
5836 - {0x0000b15c, 0x02050770},
5837 - {0x0000b160, 0x02050771},
5838 - {0x0000b164, 0x02050772},
5839 - {0x0000b168, 0x02050773},
5840 - {0x0000b16c, 0x02050774},
5841 - {0x0000b170, 0x02050775},
5842 - {0x0000b174, 0x00000776},
5843 - {0x0000b178, 0x00000776},
5844 - {0x0000b17c, 0x00000776},
5845 - {0x0000b180, 0x00000776},
5846 - {0x0000b184, 0x00000776},
5847 - {0x0000b188, 0x00000776},
5848 - {0x0000b18c, 0x00000776},
5849 - {0x0000b190, 0x00000776},
5850 - {0x0000b194, 0x00000776},
5851 - {0x0000b198, 0x00000776},
5852 - {0x0000b19c, 0x00000776},
5853 - {0x0000b1a0, 0x00000776},
5854 - {0x0000b1a4, 0x00000776},
5855 - {0x0000b1a8, 0x00000776},
5856 - {0x0000b1ac, 0x00000776},
5857 - {0x0000b1b0, 0x00000776},
5858 - {0x0000b1b4, 0x00000776},
5859 - {0x0000b1b8, 0x00000776},
5860 - {0x0000b1bc, 0x00000776},
5861 - {0x0000b1c0, 0x00000776},
5862 - {0x0000b1c4, 0x00000776},
5863 - {0x0000b1c8, 0x00000776},
5864 - {0x0000b1cc, 0x00000776},
5865 - {0x0000b1d0, 0x00000776},
5866 - {0x0000b1d4, 0x00000776},
5867 - {0x0000b1d8, 0x00000776},
5868 - {0x0000b1dc, 0x00000776},
5869 - {0x0000b1e0, 0x00000776},
5870 - {0x0000b1e4, 0x00000776},
5871 - {0x0000b1e8, 0x00000776},
5872 - {0x0000b1ec, 0x00000776},
5873 - {0x0000b1f0, 0x00000776},
5874 - {0x0000b1f4, 0x00000776},
5875 - {0x0000b1f8, 0x00000776},
5876 - {0x0000b1fc, 0x00000776},
5879 -static const u32 ar9200_ar9280_2p0_radio_core_1p0[][2] = {
5880 - /* Addr allmodes */
5881 - {0x00007800, 0x00040000},
5882 - {0x00007804, 0xdb005012},
5883 - {0x00007808, 0x04924914},
5884 - {0x0000780c, 0x21084210},
5885 - {0x00007810, 0x6d801300},
5886 - {0x00007814, 0x0019beff},
5887 - {0x00007818, 0x07e41000},
5888 - {0x0000781c, 0x00392000},
5889 - {0x00007820, 0x92592480},
5890 - {0x00007824, 0x00040000},
5891 - {0x00007828, 0xdb005012},
5892 - {0x0000782c, 0x04924914},
5893 - {0x00007830, 0x21084210},
5894 - {0x00007834, 0x6d801300},
5895 - {0x00007838, 0x0019beff},
5896 - {0x0000783c, 0x07e40000},
5897 - {0x00007840, 0x00392000},
5898 - {0x00007844, 0x92592480},
5899 - {0x00007848, 0x00100000},
5900 - {0x0000784c, 0x773f0567},
5901 - {0x00007850, 0x54214514},
5902 - {0x00007854, 0x12035828},
5903 - {0x00007858, 0x92592692},
5904 - {0x0000785c, 0x00000000},
5905 - {0x00007860, 0x56400000},
5906 - {0x00007864, 0x0a8e370e},
5907 - {0x00007868, 0xc0102850},
5908 - {0x0000786c, 0x812d4000},
5909 - {0x00007870, 0x807ec400},
5910 - {0x00007874, 0x001b6db0},
5911 - {0x00007878, 0x00376b63},
5912 - {0x0000787c, 0x06db6db6},
5913 - {0x00007880, 0x006d8000},
5914 - {0x00007884, 0xffeffffe},
5915 - {0x00007888, 0xffeffffe},
5916 - {0x0000788c, 0x00010000},
5917 - {0x00007890, 0x02060aeb},
5918 - {0x00007894, 0x5a108000},
5921 -static const u32 ar9480_1p0_baseband_postamble_emulation[][5] = {
5922 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
5923 - {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
5924 - {0x00009e3c, 0xcf946221, 0xcf946221, 0xcf946221, 0xcf946221},
5925 - {0x00009e44, 0x005c0000, 0x005c0000, 0x005c0000, 0x005c0000},
5926 - {0x0000a258, 0x02020200, 0x02020200, 0x02020200, 0x02020200},
5927 - {0x0000a25c, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
5928 - {0x0000a28c, 0x00011111, 0x00011111, 0x00011111, 0x00011111},
5929 - {0x0000a2c4, 0x00148d18, 0x00148d18, 0x00148d20, 0x00148d20},
5930 - {0x0000a2d8, 0xf999a800, 0xf999a800, 0xf999a80c, 0xf999a80c},
5931 - {0x0000a50c, 0x0000c00a, 0x0000c00a, 0x0000c00a, 0x0000c00a},
5932 - {0x0000a538, 0x00038e8c, 0x00038e8c, 0x00038e8c, 0x00038e8c},
5933 - {0x0000a53c, 0x0003cecc, 0x0003cecc, 0x0003cecc, 0x0003cecc},
5934 - {0x0000a540, 0x00040ed4, 0x00040ed4, 0x00040ed4, 0x00040ed4},
5935 - {0x0000a544, 0x00044edc, 0x00044edc, 0x00044edc, 0x00044edc},
5936 - {0x0000a548, 0x00048ede, 0x00048ede, 0x00048ede, 0x00048ede},
5937 - {0x0000a54c, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e},
5938 - {0x0000a550, 0x00050f5e, 0x00050f5e, 0x00050f5e, 0x00050f5e},
5939 - {0x0000a554, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e},
5940 - {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
5943 -static const u32 ar9480_pcie_phy_pll_on_clkreq_disable_L1_1p0[][2] = {
5944 - /* Addr allmodes */
5945 - {0x00018c00, 0x10012e5e},
5946 - {0x00018c04, 0x000801d8},
5947 - {0x00018c08, 0x0000580c},
5950 -static const u32 ar9480_common_rx_gain_table_1p0[][2] = {
5951 - /* Addr allmodes */
5952 - {0x0000a000, 0x00010000},
5953 - {0x0000a004, 0x00030002},
5954 - {0x0000a008, 0x00050004},
5955 - {0x0000a00c, 0x00810080},
5956 - {0x0000a010, 0x00830082},
5957 - {0x0000a014, 0x01810180},
5958 - {0x0000a018, 0x01830182},
5959 - {0x0000a01c, 0x01850184},
5960 - {0x0000a020, 0x01890188},
5961 - {0x0000a024, 0x018b018a},
5962 - {0x0000a028, 0x018d018c},
5963 - {0x0000a02c, 0x01910190},
5964 - {0x0000a030, 0x01930192},
5965 - {0x0000a034, 0x01950194},
5966 - {0x0000a038, 0x038a0196},
5967 - {0x0000a03c, 0x038c038b},
5968 - {0x0000a040, 0x0390038d},
5969 - {0x0000a044, 0x03920391},
5970 - {0x0000a048, 0x03940393},
5971 - {0x0000a04c, 0x03960395},
5972 - {0x0000a050, 0x00000000},
5973 - {0x0000a054, 0x00000000},
5974 - {0x0000a058, 0x00000000},
5975 - {0x0000a05c, 0x00000000},
5976 - {0x0000a060, 0x00000000},
5977 - {0x0000a064, 0x00000000},
5978 - {0x0000a068, 0x00000000},
5979 - {0x0000a06c, 0x00000000},
5980 - {0x0000a070, 0x00000000},
5981 - {0x0000a074, 0x00000000},
5982 - {0x0000a078, 0x00000000},
5983 - {0x0000a07c, 0x00000000},
5984 - {0x0000a080, 0x22222229},
5985 - {0x0000a084, 0x1d1d1d1d},
5986 - {0x0000a088, 0x1d1d1d1d},
5987 - {0x0000a08c, 0x1d1d1d1d},
5988 - {0x0000a090, 0x171d1d1d},
5989 - {0x0000a094, 0x11111717},
5990 - {0x0000a098, 0x00030311},
5991 - {0x0000a09c, 0x00000000},
5992 - {0x0000a0a0, 0x00000000},
5993 - {0x0000a0a4, 0x00000000},
5994 - {0x0000a0a8, 0x00000000},
5995 - {0x0000a0ac, 0x00000000},
5996 - {0x0000a0b0, 0x00000000},
5997 - {0x0000a0b4, 0x00000000},
5998 - {0x0000a0b8, 0x00000000},
5999 - {0x0000a0bc, 0x00000000},
6000 - {0x0000a0c0, 0x001f0000},
6001 - {0x0000a0c4, 0x01000101},
6002 - {0x0000a0c8, 0x011e011f},
6003 - {0x0000a0cc, 0x011c011d},
6004 - {0x0000a0d0, 0x02030204},
6005 - {0x0000a0d4, 0x02010202},
6006 - {0x0000a0d8, 0x021f0200},
6007 - {0x0000a0dc, 0x0302021e},
6008 - {0x0000a0e0, 0x03000301},
6009 - {0x0000a0e4, 0x031e031f},
6010 - {0x0000a0e8, 0x0402031d},
6011 - {0x0000a0ec, 0x04000401},
6012 - {0x0000a0f0, 0x041e041f},
6013 - {0x0000a0f4, 0x0502041d},
6014 - {0x0000a0f8, 0x05000501},
6015 - {0x0000a0fc, 0x051e051f},
6016 - {0x0000a100, 0x06010602},
6017 - {0x0000a104, 0x061f0600},
6018 - {0x0000a108, 0x061d061e},
6019 - {0x0000a10c, 0x07020703},
6020 - {0x0000a110, 0x07000701},
6021 - {0x0000a114, 0x00000000},
6022 - {0x0000a118, 0x00000000},
6023 - {0x0000a11c, 0x00000000},
6024 - {0x0000a120, 0x00000000},
6025 - {0x0000a124, 0x00000000},
6026 - {0x0000a128, 0x00000000},
6027 - {0x0000a12c, 0x00000000},
6028 - {0x0000a130, 0x00000000},
6029 - {0x0000a134, 0x00000000},
6030 - {0x0000a138, 0x00000000},
6031 - {0x0000a13c, 0x00000000},
6032 - {0x0000a140, 0x001f0000},
6033 - {0x0000a144, 0x01000101},
6034 - {0x0000a148, 0x011e011f},
6035 - {0x0000a14c, 0x011c011d},
6036 - {0x0000a150, 0x02030204},
6037 - {0x0000a154, 0x02010202},
6038 - {0x0000a158, 0x021f0200},
6039 - {0x0000a15c, 0x0302021e},
6040 - {0x0000a160, 0x03000301},
6041 - {0x0000a164, 0x031e031f},
6042 - {0x0000a168, 0x0402031d},
6043 - {0x0000a16c, 0x04000401},
6044 - {0x0000a170, 0x041e041f},
6045 - {0x0000a174, 0x0502041d},
6046 - {0x0000a178, 0x05000501},
6047 - {0x0000a17c, 0x051e051f},
6048 - {0x0000a180, 0x06010602},
6049 - {0x0000a184, 0x061f0600},
6050 - {0x0000a188, 0x061d061e},
6051 - {0x0000a18c, 0x07020703},
6052 - {0x0000a190, 0x07000701},
6053 - {0x0000a194, 0x00000000},
6054 - {0x0000a198, 0x00000000},
6055 - {0x0000a19c, 0x00000000},
6056 - {0x0000a1a0, 0x00000000},
6057 - {0x0000a1a4, 0x00000000},
6058 - {0x0000a1a8, 0x00000000},
6059 - {0x0000a1ac, 0x00000000},
6060 - {0x0000a1b0, 0x00000000},
6061 - {0x0000a1b4, 0x00000000},
6062 - {0x0000a1b8, 0x00000000},
6063 - {0x0000a1bc, 0x00000000},
6064 - {0x0000a1c0, 0x00000000},
6065 - {0x0000a1c4, 0x00000000},
6066 - {0x0000a1c8, 0x00000000},
6067 - {0x0000a1cc, 0x00000000},
6068 - {0x0000a1d0, 0x00000000},
6069 - {0x0000a1d4, 0x00000000},
6070 - {0x0000a1d8, 0x00000000},
6071 - {0x0000a1dc, 0x00000000},
6072 - {0x0000a1e0, 0x00000000},
6073 - {0x0000a1e4, 0x00000000},
6074 - {0x0000a1e8, 0x00000000},
6075 - {0x0000a1ec, 0x00000000},
6076 - {0x0000a1f0, 0x00000396},
6077 - {0x0000a1f4, 0x00000396},
6078 - {0x0000a1f8, 0x00000396},
6079 - {0x0000a1fc, 0x00000196},
6080 - {0x0000b000, 0x00010000},
6081 - {0x0000b004, 0x00030002},
6082 - {0x0000b008, 0x00050004},
6083 - {0x0000b00c, 0x00810080},
6084 - {0x0000b010, 0x00830082},
6085 - {0x0000b014, 0x01810180},
6086 - {0x0000b018, 0x01830182},
6087 - {0x0000b01c, 0x01850184},
6088 - {0x0000b020, 0x02810280},
6089 - {0x0000b024, 0x02830282},
6090 - {0x0000b028, 0x02850284},
6091 - {0x0000b02c, 0x02890288},
6092 - {0x0000b030, 0x028b028a},
6093 - {0x0000b034, 0x0388028c},
6094 - {0x0000b038, 0x038a0389},
6095 - {0x0000b03c, 0x038c038b},
6096 - {0x0000b040, 0x0390038d},
6097 - {0x0000b044, 0x03920391},
6098 - {0x0000b048, 0x03940393},
6099 - {0x0000b04c, 0x03960395},
6100 - {0x0000b050, 0x00000000},
6101 - {0x0000b054, 0x00000000},
6102 - {0x0000b058, 0x00000000},
6103 - {0x0000b05c, 0x00000000},
6104 - {0x0000b060, 0x00000000},
6105 - {0x0000b064, 0x00000000},
6106 - {0x0000b068, 0x00000000},
6107 - {0x0000b06c, 0x00000000},
6108 - {0x0000b070, 0x00000000},
6109 - {0x0000b074, 0x00000000},
6110 - {0x0000b078, 0x00000000},
6111 - {0x0000b07c, 0x00000000},
6112 - {0x0000b080, 0x2a2d2f32},
6113 - {0x0000b084, 0x21232328},
6114 - {0x0000b088, 0x19191c1e},
6115 - {0x0000b08c, 0x12141417},
6116 - {0x0000b090, 0x07070e0e},
6117 - {0x0000b094, 0x03030305},
6118 - {0x0000b098, 0x00000003},
6119 - {0x0000b09c, 0x00000000},
6120 - {0x0000b0a0, 0x00000000},
6121 - {0x0000b0a4, 0x00000000},
6122 - {0x0000b0a8, 0x00000000},
6123 - {0x0000b0ac, 0x00000000},
6124 - {0x0000b0b0, 0x00000000},
6125 - {0x0000b0b4, 0x00000000},
6126 - {0x0000b0b8, 0x00000000},
6127 - {0x0000b0bc, 0x00000000},
6128 - {0x0000b0c0, 0x003f0020},
6129 - {0x0000b0c4, 0x00400041},
6130 - {0x0000b0c8, 0x0140005f},
6131 - {0x0000b0cc, 0x0160015f},
6132 - {0x0000b0d0, 0x017e017f},
6133 - {0x0000b0d4, 0x02410242},
6134 - {0x0000b0d8, 0x025f0240},
6135 - {0x0000b0dc, 0x027f0260},
6136 - {0x0000b0e0, 0x0341027e},
6137 - {0x0000b0e4, 0x035f0340},
6138 - {0x0000b0e8, 0x037f0360},
6139 - {0x0000b0ec, 0x04400441},
6140 - {0x0000b0f0, 0x0460045f},
6141 - {0x0000b0f4, 0x0541047f},
6142 - {0x0000b0f8, 0x055f0540},
6143 - {0x0000b0fc, 0x057f0560},
6144 - {0x0000b100, 0x06400641},
6145 - {0x0000b104, 0x0660065f},
6146 - {0x0000b108, 0x067e067f},
6147 - {0x0000b10c, 0x07410742},
6148 - {0x0000b110, 0x075f0740},
6149 - {0x0000b114, 0x077f0760},
6150 - {0x0000b118, 0x07800781},
6151 - {0x0000b11c, 0x07a0079f},
6152 - {0x0000b120, 0x07c107bf},
6153 - {0x0000b124, 0x000007c0},
6154 - {0x0000b128, 0x00000000},
6155 - {0x0000b12c, 0x00000000},
6156 - {0x0000b130, 0x00000000},
6157 - {0x0000b134, 0x00000000},
6158 - {0x0000b138, 0x00000000},
6159 - {0x0000b13c, 0x00000000},
6160 - {0x0000b140, 0x003f0020},
6161 - {0x0000b144, 0x00400041},
6162 - {0x0000b148, 0x0140005f},
6163 - {0x0000b14c, 0x0160015f},
6164 - {0x0000b150, 0x017e017f},
6165 - {0x0000b154, 0x02410242},
6166 - {0x0000b158, 0x025f0240},
6167 - {0x0000b15c, 0x027f0260},
6168 - {0x0000b160, 0x0341027e},
6169 - {0x0000b164, 0x035f0340},
6170 - {0x0000b168, 0x037f0360},
6171 - {0x0000b16c, 0x04400441},
6172 - {0x0000b170, 0x0460045f},
6173 - {0x0000b174, 0x0541047f},
6174 - {0x0000b178, 0x055f0540},
6175 - {0x0000b17c, 0x057f0560},
6176 - {0x0000b180, 0x06400641},
6177 - {0x0000b184, 0x0660065f},
6178 - {0x0000b188, 0x067e067f},
6179 - {0x0000b18c, 0x07410742},
6180 - {0x0000b190, 0x075f0740},
6181 - {0x0000b194, 0x077f0760},
6182 - {0x0000b198, 0x07800781},
6183 - {0x0000b19c, 0x07a0079f},
6184 - {0x0000b1a0, 0x07c107bf},
6185 - {0x0000b1a4, 0x000007c0},
6186 - {0x0000b1a8, 0x00000000},
6187 - {0x0000b1ac, 0x00000000},
6188 - {0x0000b1b0, 0x00000000},
6189 - {0x0000b1b4, 0x00000000},
6190 - {0x0000b1b8, 0x00000000},
6191 - {0x0000b1bc, 0x00000000},
6192 - {0x0000b1c0, 0x00000000},
6193 - {0x0000b1c4, 0x00000000},
6194 - {0x0000b1c8, 0x00000000},
6195 - {0x0000b1cc, 0x00000000},
6196 - {0x0000b1d0, 0x00000000},
6197 - {0x0000b1d4, 0x00000000},
6198 - {0x0000b1d8, 0x00000000},
6199 - {0x0000b1dc, 0x00000000},
6200 - {0x0000b1e0, 0x00000000},
6201 - {0x0000b1e4, 0x00000000},
6202 - {0x0000b1e8, 0x00000000},
6203 - {0x0000b1ec, 0x00000000},
6204 - {0x0000b1f0, 0x00000396},
6205 - {0x0000b1f4, 0x00000396},
6206 - {0x0000b1f8, 0x00000396},
6207 - {0x0000b1fc, 0x00000196},
6210 -static const u32 ar9480_modes_high_ob_db_tx_gain_table_1p0[][5] = {
6211 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6212 - {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
6213 - {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
6214 - {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
6215 - {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
6216 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
6217 - {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
6218 - {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002},
6219 - {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
6220 - {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
6221 - {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
6222 - {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
6223 - {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
6224 - {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
6225 - {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
6226 - {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
6227 - {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
6228 - {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
6229 - {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20},
6230 - {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22},
6231 - {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24},
6232 - {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640},
6233 - {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660},
6234 - {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861},
6235 - {0x0000a548, 0x53025eb2, 0x53025eb2, 0x3e001a81, 0x3e001a81},
6236 - {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
6237 - {0x0000a550, 0x5f025ef6, 0x5f025ef6, 0x44001c84, 0x44001c84},
6238 - {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3},
6239 - {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5},
6240 - {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9},
6241 - {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb},
6242 - {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6243 - {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6244 - {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6245 - {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6246 - {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6247 - {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6248 - {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
6249 - {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6250 - {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6251 - {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6252 - {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6253 - {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
6254 - {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
6255 - {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
6256 - {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
6257 - {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
6258 - {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
6259 - {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
6260 - {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
6261 - {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
6262 - {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
6263 - {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
6264 - {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
6265 - {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
6266 - {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
6267 - {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
6268 - {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
6269 - {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
6270 - {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060},
6271 - {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
6272 - {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
6275 -static const u32 ar9480_common_wo_xlna_rx_gain_table_1p0[][2] = {
6276 - /* Addr allmodes */
6277 - {0x0000a000, 0x00010000},
6278 - {0x0000a004, 0x00030002},
6279 - {0x0000a008, 0x00050004},
6280 - {0x0000a00c, 0x00810080},
6281 - {0x0000a010, 0x00830082},
6282 - {0x0000a014, 0x01810180},
6283 - {0x0000a018, 0x01830182},
6284 - {0x0000a01c, 0x01850184},
6285 - {0x0000a020, 0x01890188},
6286 - {0x0000a024, 0x018b018a},
6287 - {0x0000a028, 0x018d018c},
6288 - {0x0000a02c, 0x03820190},
6289 - {0x0000a030, 0x03840383},
6290 - {0x0000a034, 0x03880385},
6291 - {0x0000a038, 0x038a0389},
6292 - {0x0000a03c, 0x038c038b},
6293 - {0x0000a040, 0x0390038d},
6294 - {0x0000a044, 0x03920391},
6295 - {0x0000a048, 0x03940393},
6296 - {0x0000a04c, 0x03960395},
6297 - {0x0000a050, 0x00000000},
6298 - {0x0000a054, 0x00000000},
6299 - {0x0000a058, 0x00000000},
6300 - {0x0000a05c, 0x00000000},
6301 - {0x0000a060, 0x00000000},
6302 - {0x0000a064, 0x00000000},
6303 - {0x0000a068, 0x00000000},
6304 - {0x0000a06c, 0x00000000},
6305 - {0x0000a070, 0x00000000},
6306 - {0x0000a074, 0x00000000},
6307 - {0x0000a078, 0x00000000},
6308 - {0x0000a07c, 0x00000000},
6309 - {0x0000a080, 0x29292929},
6310 - {0x0000a084, 0x29292929},
6311 - {0x0000a088, 0x29292929},
6312 - {0x0000a08c, 0x29292929},
6313 - {0x0000a090, 0x22292929},
6314 - {0x0000a094, 0x1d1d2222},
6315 - {0x0000a098, 0x0c111117},
6316 - {0x0000a09c, 0x00030303},
6317 - {0x0000a0a0, 0x00000000},
6318 - {0x0000a0a4, 0x00000000},
6319 - {0x0000a0a8, 0x00000000},
6320 - {0x0000a0ac, 0x00000000},
6321 - {0x0000a0b0, 0x00000000},
6322 - {0x0000a0b4, 0x00000000},
6323 - {0x0000a0b8, 0x00000000},
6324 - {0x0000a0bc, 0x00000000},
6325 - {0x0000a0c0, 0x001f0000},
6326 - {0x0000a0c4, 0x01000101},
6327 - {0x0000a0c8, 0x011e011f},
6328 - {0x0000a0cc, 0x011c011d},
6329 - {0x0000a0d0, 0x02030204},
6330 - {0x0000a0d4, 0x02010202},
6331 - {0x0000a0d8, 0x021f0200},
6332 - {0x0000a0dc, 0x0302021e},
6333 - {0x0000a0e0, 0x03000301},
6334 - {0x0000a0e4, 0x031e031f},
6335 - {0x0000a0e8, 0x0402031d},
6336 - {0x0000a0ec, 0x04000401},
6337 - {0x0000a0f0, 0x041e041f},
6338 - {0x0000a0f4, 0x0502041d},
6339 - {0x0000a0f8, 0x05000501},
6340 - {0x0000a0fc, 0x051e051f},
6341 - {0x0000a100, 0x06010602},
6342 - {0x0000a104, 0x061f0600},
6343 - {0x0000a108, 0x061d061e},
6344 - {0x0000a10c, 0x07020703},
6345 - {0x0000a110, 0x07000701},
6346 - {0x0000a114, 0x00000000},
6347 - {0x0000a118, 0x00000000},
6348 - {0x0000a11c, 0x00000000},
6349 - {0x0000a120, 0x00000000},
6350 - {0x0000a124, 0x00000000},
6351 - {0x0000a128, 0x00000000},
6352 - {0x0000a12c, 0x00000000},
6353 - {0x0000a130, 0x00000000},
6354 - {0x0000a134, 0x00000000},
6355 - {0x0000a138, 0x00000000},
6356 - {0x0000a13c, 0x00000000},
6357 - {0x0000a140, 0x001f0000},
6358 - {0x0000a144, 0x01000101},
6359 - {0x0000a148, 0x011e011f},
6360 - {0x0000a14c, 0x011c011d},
6361 - {0x0000a150, 0x02030204},
6362 - {0x0000a154, 0x02010202},
6363 - {0x0000a158, 0x021f0200},
6364 - {0x0000a15c, 0x0302021e},
6365 - {0x0000a160, 0x03000301},
6366 - {0x0000a164, 0x031e031f},
6367 - {0x0000a168, 0x0402031d},
6368 - {0x0000a16c, 0x04000401},
6369 - {0x0000a170, 0x041e041f},
6370 - {0x0000a174, 0x0502041d},
6371 - {0x0000a178, 0x05000501},
6372 - {0x0000a17c, 0x051e051f},
6373 - {0x0000a180, 0x06010602},
6374 - {0x0000a184, 0x061f0600},
6375 - {0x0000a188, 0x061d061e},
6376 - {0x0000a18c, 0x07020703},
6377 - {0x0000a190, 0x07000701},
6378 - {0x0000a194, 0x00000000},
6379 - {0x0000a198, 0x00000000},
6380 - {0x0000a19c, 0x00000000},
6381 - {0x0000a1a0, 0x00000000},
6382 - {0x0000a1a4, 0x00000000},
6383 - {0x0000a1a8, 0x00000000},
6384 - {0x0000a1ac, 0x00000000},
6385 - {0x0000a1b0, 0x00000000},
6386 - {0x0000a1b4, 0x00000000},
6387 - {0x0000a1b8, 0x00000000},
6388 - {0x0000a1bc, 0x00000000},
6389 - {0x0000a1c0, 0x00000000},
6390 - {0x0000a1c4, 0x00000000},
6391 - {0x0000a1c8, 0x00000000},
6392 - {0x0000a1cc, 0x00000000},
6393 - {0x0000a1d0, 0x00000000},
6394 - {0x0000a1d4, 0x00000000},
6395 - {0x0000a1d8, 0x00000000},
6396 - {0x0000a1dc, 0x00000000},
6397 - {0x0000a1e0, 0x00000000},
6398 - {0x0000a1e4, 0x00000000},
6399 - {0x0000a1e8, 0x00000000},
6400 - {0x0000a1ec, 0x00000000},
6401 - {0x0000a1f0, 0x00000396},
6402 - {0x0000a1f4, 0x00000396},
6403 - {0x0000a1f8, 0x00000396},
6404 - {0x0000a1fc, 0x00000196},
6405 - {0x0000b000, 0x00010000},
6406 - {0x0000b004, 0x00030002},
6407 - {0x0000b008, 0x00050004},
6408 - {0x0000b00c, 0x00810080},
6409 - {0x0000b010, 0x00830082},
6410 - {0x0000b014, 0x01810180},
6411 - {0x0000b018, 0x01830182},
6412 - {0x0000b01c, 0x01850184},
6413 - {0x0000b020, 0x02810280},
6414 - {0x0000b024, 0x02830282},
6415 - {0x0000b028, 0x02850284},
6416 - {0x0000b02c, 0x02890288},
6417 - {0x0000b030, 0x028b028a},
6418 - {0x0000b034, 0x0388028c},
6419 - {0x0000b038, 0x038a0389},
6420 - {0x0000b03c, 0x038c038b},
6421 - {0x0000b040, 0x0390038d},
6422 - {0x0000b044, 0x03920391},
6423 - {0x0000b048, 0x03940393},
6424 - {0x0000b04c, 0x03960395},
6425 - {0x0000b050, 0x00000000},
6426 - {0x0000b054, 0x00000000},
6427 - {0x0000b058, 0x00000000},
6428 - {0x0000b05c, 0x00000000},
6429 - {0x0000b060, 0x00000000},
6430 - {0x0000b064, 0x00000000},
6431 - {0x0000b068, 0x00000000},
6432 - {0x0000b06c, 0x00000000},
6433 - {0x0000b070, 0x00000000},
6434 - {0x0000b074, 0x00000000},
6435 - {0x0000b078, 0x00000000},
6436 - {0x0000b07c, 0x00000000},
6437 - {0x0000b080, 0x32323232},
6438 - {0x0000b084, 0x2f2f3232},
6439 - {0x0000b088, 0x23282a2d},
6440 - {0x0000b08c, 0x1c1e2123},
6441 - {0x0000b090, 0x14171919},
6442 - {0x0000b094, 0x0e0e1214},
6443 - {0x0000b098, 0x03050707},
6444 - {0x0000b09c, 0x00030303},
6445 - {0x0000b0a0, 0x00000000},
6446 - {0x0000b0a4, 0x00000000},
6447 - {0x0000b0a8, 0x00000000},
6448 - {0x0000b0ac, 0x00000000},
6449 - {0x0000b0b0, 0x00000000},
6450 - {0x0000b0b4, 0x00000000},
6451 - {0x0000b0b8, 0x00000000},
6452 - {0x0000b0bc, 0x00000000},
6453 - {0x0000b0c0, 0x003f0020},
6454 - {0x0000b0c4, 0x00400041},
6455 - {0x0000b0c8, 0x0140005f},
6456 - {0x0000b0cc, 0x0160015f},
6457 - {0x0000b0d0, 0x017e017f},
6458 - {0x0000b0d4, 0x02410242},
6459 - {0x0000b0d8, 0x025f0240},
6460 - {0x0000b0dc, 0x027f0260},
6461 - {0x0000b0e0, 0x0341027e},
6462 - {0x0000b0e4, 0x035f0340},
6463 - {0x0000b0e8, 0x037f0360},
6464 - {0x0000b0ec, 0x04400441},
6465 - {0x0000b0f0, 0x0460045f},
6466 - {0x0000b0f4, 0x0541047f},
6467 - {0x0000b0f8, 0x055f0540},
6468 - {0x0000b0fc, 0x057f0560},
6469 - {0x0000b100, 0x06400641},
6470 - {0x0000b104, 0x0660065f},
6471 - {0x0000b108, 0x067e067f},
6472 - {0x0000b10c, 0x07410742},
6473 - {0x0000b110, 0x075f0740},
6474 - {0x0000b114, 0x077f0760},
6475 - {0x0000b118, 0x07800781},
6476 - {0x0000b11c, 0x07a0079f},
6477 - {0x0000b120, 0x07c107bf},
6478 - {0x0000b124, 0x000007c0},
6479 - {0x0000b128, 0x00000000},
6480 - {0x0000b12c, 0x00000000},
6481 - {0x0000b130, 0x00000000},
6482 - {0x0000b134, 0x00000000},
6483 - {0x0000b138, 0x00000000},
6484 - {0x0000b13c, 0x00000000},
6485 - {0x0000b140, 0x003f0020},
6486 - {0x0000b144, 0x00400041},
6487 - {0x0000b148, 0x0140005f},
6488 - {0x0000b14c, 0x0160015f},
6489 - {0x0000b150, 0x017e017f},
6490 - {0x0000b154, 0x02410242},
6491 - {0x0000b158, 0x025f0240},
6492 - {0x0000b15c, 0x027f0260},
6493 - {0x0000b160, 0x0341027e},
6494 - {0x0000b164, 0x035f0340},
6495 - {0x0000b168, 0x037f0360},
6496 - {0x0000b16c, 0x04400441},
6497 - {0x0000b170, 0x0460045f},
6498 - {0x0000b174, 0x0541047f},
6499 - {0x0000b178, 0x055f0540},
6500 - {0x0000b17c, 0x057f0560},
6501 - {0x0000b180, 0x06400641},
6502 - {0x0000b184, 0x0660065f},
6503 - {0x0000b188, 0x067e067f},
6504 - {0x0000b18c, 0x07410742},
6505 - {0x0000b190, 0x075f0740},
6506 - {0x0000b194, 0x077f0760},
6507 - {0x0000b198, 0x07800781},
6508 - {0x0000b19c, 0x07a0079f},
6509 - {0x0000b1a0, 0x07c107bf},
6510 - {0x0000b1a4, 0x000007c0},
6511 - {0x0000b1a8, 0x00000000},
6512 - {0x0000b1ac, 0x00000000},
6513 - {0x0000b1b0, 0x00000000},
6514 - {0x0000b1b4, 0x00000000},
6515 - {0x0000b1b8, 0x00000000},
6516 - {0x0000b1bc, 0x00000000},
6517 - {0x0000b1c0, 0x00000000},
6518 - {0x0000b1c4, 0x00000000},
6519 - {0x0000b1c8, 0x00000000},
6520 - {0x0000b1cc, 0x00000000},
6521 - {0x0000b1d0, 0x00000000},
6522 - {0x0000b1d4, 0x00000000},
6523 - {0x0000b1d8, 0x00000000},
6524 - {0x0000b1dc, 0x00000000},
6525 - {0x0000b1e0, 0x00000000},
6526 - {0x0000b1e4, 0x00000000},
6527 - {0x0000b1e8, 0x00000000},
6528 - {0x0000b1ec, 0x00000000},
6529 - {0x0000b1f0, 0x00000396},
6530 - {0x0000b1f4, 0x00000396},
6531 - {0x0000b1f8, 0x00000396},
6532 - {0x0000b1fc, 0x00000196},
6535 -static const u32 ar9480_1p0_mac_postamble[][5] = {
6536 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6537 - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
6538 - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
6539 - {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38},
6540 - {0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00},
6541 - {0x0000801c, 0x128d8027, 0x128d804f, 0x12e00057, 0x12e0002b},
6542 - {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810},
6543 - {0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a},
6544 - {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440},
6547 -static const u32 ar9480_1p0_mac_postamble_emulation[][5] = {
6548 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6549 - {0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8},
6550 - {0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017},
6553 -static const u32 ar9480_1p0_tx_gain_table_baseband_postamble_emulation[][5] = {
6554 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6555 - {0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5},
6556 - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6557 - {0x0000a504, 0x00004002, 0x00004002, 0x00004002, 0x00004002},
6558 - {0x0000a508, 0x00008004, 0x00008004, 0x00008004, 0x00008004},
6559 - {0x0000a510, 0x0001000c, 0x0001000c, 0x0001000c, 0x0001000c},
6560 - {0x0000a514, 0x0001420b, 0x0001420b, 0x0001420b, 0x0001420b},
6561 - {0x0000a518, 0x0001824a, 0x0001824a, 0x0001824a, 0x0001824a},
6562 - {0x0000a51c, 0x0001c44a, 0x0001c44a, 0x0001c44a, 0x0001c44a},
6563 - {0x0000a520, 0x0002064a, 0x0002064a, 0x0002064a, 0x0002064a},
6564 - {0x0000a524, 0x0002484a, 0x0002484a, 0x0002484a, 0x0002484a},
6565 - {0x0000a528, 0x00028a4a, 0x00028a4a, 0x00028a4a, 0x00028a4a},
6566 - {0x0000a52c, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a},
6567 - {0x0000a530, 0x00030e4a, 0x00030e4a, 0x00030e4a, 0x00030e4a},
6568 - {0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a},
6571 -static const u32 ar9480_1p0_radio_postamble[][5] = {
6572 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6573 - {0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524},
6574 - {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24646c08, 0x24646c08},
6575 - {0x000160b0, 0x01d67f70, 0x01d67f70, 0x01d67f70, 0x01d67f70},
6576 - {0x0001610c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
6577 - {0x00016140, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
6578 - {0x0001650c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
6579 - {0x00016540, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
6582 -static const u32 ar9480_1p0_soc_postamble_emulation[][5] = {
6583 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6584 - {0x00007010, 0x00001133, 0x00001133, 0x00001133, 0x00001133},
6587 -static const u32 ar9480_1p0_baseband_core[][2] = {
6588 - /* Addr allmodes */
6589 - {0x00009800, 0xafe68e30},
6590 - {0x00009804, 0xfd14e000},
6591 - {0x00009808, 0x9c0a9f6b},
6592 - {0x0000980c, 0x04900000},
6593 - {0x00009814, 0x9280c00a},
6594 - {0x00009818, 0x00000000},
6595 - {0x0000981c, 0x00020028},
6596 - {0x00009834, 0x6400a290},
6597 - {0x00009838, 0x0108ecff},
6598 - {0x0000983c, 0x0d000600},
6599 - {0x00009880, 0x201fff00},
6600 - {0x00009884, 0x00001042},
6601 - {0x000098a4, 0x00200400},
6602 - {0x000098b0, 0x32840bbe},
6603 - {0x000098d0, 0x004b6a8e},
6604 - {0x000098d4, 0x00000820},
6605 - {0x000098dc, 0x00000000},
6606 - {0x000098e4, 0x01ffffff},
6607 - {0x000098e8, 0x01ffffff},
6608 - {0x000098ec, 0x01ffffff},
6609 - {0x000098f0, 0x00000000},
6610 - {0x000098f4, 0x00000000},
6611 - {0x00009c04, 0xff55ff55},
6612 - {0x00009c08, 0x0320ff55},
6613 - {0x00009c0c, 0x00000000},
6614 - {0x00009c10, 0x00000000},
6615 - {0x00009c14, 0x00046384},
6616 - {0x00009c18, 0x05b6b440},
6617 - {0x00009c1c, 0x00b6b440},
6618 - {0x00009d00, 0xc080a333},
6619 - {0x00009d04, 0x40206c10},
6620 - {0x00009d08, 0x009c4060},
6621 - {0x00009d0c, 0x9883800a},
6622 - {0x00009d10, 0x01834061},
6623 - {0x00009d14, 0x00c0040b},
6624 - {0x00009d18, 0x00000000},
6625 - {0x00009e08, 0x0038230c},
6626 - {0x00009e24, 0x990bb514},
6627 - {0x00009e28, 0x0c6f0000},
6628 - {0x00009e30, 0x06336f77},
6629 - {0x00009e34, 0x6af6532f},
6630 - {0x00009e38, 0x0cc80c00},
6631 - {0x00009e40, 0x0d261820},
6632 - {0x00009e4c, 0x00001004},
6633 - {0x00009e50, 0x00ff03f1},
6634 - {0x00009e54, 0x64c355c7},
6635 - {0x00009e58, 0xfd897735},
6636 - {0x00009e5c, 0xe9198724},
6637 - {0x00009fc0, 0x803e4788},
6638 - {0x00009fc4, 0x0001efb5},
6639 - {0x00009fcc, 0x40000014},
6640 - {0x00009fd0, 0x01193b93},
6641 - {0x0000a20c, 0x00000000},
6642 - {0x0000a220, 0x00000000},
6643 - {0x0000a224, 0x00000000},
6644 - {0x0000a228, 0x10002310},
6645 - {0x0000a23c, 0x00000000},
6646 - {0x0000a244, 0x0c000000},
6647 - {0x0000a2a0, 0x00000001},
6648 - {0x0000a2c0, 0x00000001},
6649 - {0x0000a2c8, 0x00000000},
6650 - {0x0000a2cc, 0x18c43433},
6651 - {0x0000a2d4, 0x00000000},
6652 - {0x0000a2ec, 0x00000000},
6653 - {0x0000a2f0, 0x00000000},
6654 - {0x0000a2f4, 0x00000000},
6655 - {0x0000a2f8, 0x00000000},
6656 - {0x0000a344, 0x00000000},
6657 - {0x0000a34c, 0x00000000},
6658 - {0x0000a350, 0x0000a000},
6659 - {0x0000a364, 0x00000000},
6660 - {0x0000a370, 0x00000000},
6661 - {0x0000a390, 0x00000001},
6662 - {0x0000a394, 0x00000444},
6663 - {0x0000a398, 0x001f0e0f},
6664 - {0x0000a39c, 0x0075393f},
6665 - {0x0000a3a0, 0xb79f6427},
6666 - {0x0000a3a4, 0x00000000},
6667 - {0x0000a3a8, 0xaaaaaaaa},
6668 - {0x0000a3ac, 0x3c466478},
6669 - {0x0000a3c0, 0x20202020},
6670 - {0x0000a3c4, 0x22222220},
6671 - {0x0000a3c8, 0x20200020},
6672 - {0x0000a3cc, 0x20202020},
6673 - {0x0000a3d0, 0x20202020},
6674 - {0x0000a3d4, 0x20202020},
6675 - {0x0000a3d8, 0x20202020},
6676 - {0x0000a3dc, 0x20202020},
6677 - {0x0000a3e0, 0x20202020},
6678 - {0x0000a3e4, 0x20202020},
6679 - {0x0000a3e8, 0x20202020},
6680 - {0x0000a3ec, 0x20202020},
6681 - {0x0000a3f0, 0x00000000},
6682 - {0x0000a3f4, 0x00000006},
6683 - {0x0000a3f8, 0x0c9bd380},
6684 - {0x0000a3fc, 0x000f0f01},
6685 - {0x0000a400, 0x8fa91f01},
6686 - {0x0000a404, 0x00000000},
6687 - {0x0000a408, 0x0e79e5c6},
6688 - {0x0000a40c, 0x00820820},
6689 - {0x0000a414, 0x1ce739ce},
6690 - {0x0000a418, 0x2d001dce},
6691 - {0x0000a41c, 0x1ce739ce},
6692 - {0x0000a420, 0x000001ce},
6693 - {0x0000a424, 0x1ce739ce},
6694 - {0x0000a428, 0x000001ce},
6695 - {0x0000a42c, 0x1ce739ce},
6696 - {0x0000a430, 0x1ce739ce},
6697 - {0x0000a434, 0x00000000},
6698 - {0x0000a438, 0x00001801},
6699 - {0x0000a43c, 0x00100000},
6700 - {0x0000a440, 0x00000000},
6701 - {0x0000a444, 0x00000000},
6702 - {0x0000a448, 0x05000080},
6703 - {0x0000a44c, 0x00000001},
6704 - {0x0000a450, 0x00010000},
6705 - {0x0000a458, 0x00000000},
6706 - {0x0000a644, 0xbfad9d74},
6707 - {0x0000a648, 0x0048060a},
6708 - {0x0000a64c, 0x00003c37},
6709 - {0x0000a670, 0x03020100},
6710 - {0x0000a674, 0x09080504},
6711 - {0x0000a678, 0x0d0c0b0a},
6712 - {0x0000a67c, 0x13121110},
6713 - {0x0000a680, 0x31301514},
6714 - {0x0000a684, 0x35343332},
6715 - {0x0000a688, 0x00000036},
6716 - {0x0000a690, 0x00000838},
6717 - {0x0000a6b0, 0x0000000a},
6718 - {0x0000a6b4, 0x28f12c01},
6719 - {0x0000a7c0, 0x00000000},
6720 - {0x0000a7c4, 0xfffffffc},
6721 - {0x0000a7c8, 0x00000000},
6722 - {0x0000a7cc, 0x00000000},
6723 - {0x0000a7d0, 0x00000000},
6724 - {0x0000a7d4, 0x00000004},
6725 - {0x0000a7dc, 0x00000001},
6726 - {0x0000a8d0, 0x004b6a8e},
6727 - {0x0000a8d4, 0x00000820},
6728 - {0x0000a8dc, 0x00000000},
6729 - {0x0000a8f0, 0x00000000},
6730 - {0x0000a8f4, 0x00000000},
6731 - {0x0000b2d0, 0x00000080},
6732 - {0x0000b2d4, 0x00000000},
6733 - {0x0000b2ec, 0x00000000},
6734 - {0x0000b2f0, 0x00000000},
6735 - {0x0000b2f4, 0x00000000},
6736 - {0x0000b2f8, 0x00000000},
6737 - {0x0000b408, 0x0e79e5c0},
6738 - {0x0000b40c, 0x00820820},
6739 - {0x0000b420, 0x00000000},
6740 - {0x0000b6b0, 0x0000000a},
6741 - {0x0000b6b4, 0x00c00001},
6744 -static const u32 ar9480_1p0_baseband_postamble[][5] = {
6745 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6746 - {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
6747 - {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e},
6748 - {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0},
6749 - {0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x06903881},
6750 - {0x0000982c, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4},
6751 - {0x00009830, 0x0000059c, 0x0000059c, 0x0000119c, 0x0000119c},
6752 - {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4},
6753 - {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0},
6754 - {0x00009e04, 0x001c2020, 0x001c2020, 0x001c2020, 0x001c2020},
6755 - {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2},
6756 - {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec84d2e},
6757 - {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3379605e, 0x33795d5e},
6758 - {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6759 - {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c},
6760 - {0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce},
6761 - {0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021},
6762 - {0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c782},
6763 - {0x00009e44, 0x02321e27, 0x02321e27, 0x02291e27, 0x02291e27},
6764 - {0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012},
6765 - {0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000},
6766 - {0x0000a204, 0x0131b7c0, 0x0131b7c4, 0x0131b7c4, 0x0131b7c0},
6767 - {0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004},
6768 - {0x0000a22c, 0x01026a2f, 0x01026a27, 0x01026a2f, 0x01026a2f},
6769 - {0x0000a230, 0x0000400a, 0x00004014, 0x00004016, 0x0000400b},
6770 - {0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff},
6771 - {0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018},
6772 - {0x0000a250, 0x00000000, 0x00000000, 0x00000210, 0x00000108},
6773 - {0x0000a254, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898},
6774 - {0x0000a258, 0x02020002, 0x02020002, 0x02020002, 0x02020002},
6775 - {0x0000a25c, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e},
6776 - {0x0000a260, 0x0a021501, 0x0a021501, 0x3a021501, 0x3a021501},
6777 - {0x0000a264, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
6778 - {0x0000a280, 0x00000007, 0x00000007, 0x0000000b, 0x0000000b},
6779 - {0x0000a284, 0x00000000, 0x00000000, 0x00000150, 0x00000150},
6780 - {0x0000a288, 0x00000110, 0x00000110, 0x00100110, 0x00100110},
6781 - {0x0000a28c, 0x00022222, 0x00022222, 0x00022222, 0x00022222},
6782 - {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18},
6783 - {0x0000a2d0, 0x00041981, 0x00041981, 0x00041981, 0x00041982},
6784 - {0x0000a2d8, 0x7999a83b, 0x7999a83b, 0x7999a83b, 0x7999a83b},
6785 - {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6786 - {0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
6787 - {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000},
6788 - {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6789 - {0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
6790 - {0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce},
6791 - {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
6794 -static const u32 ar9480_modes_fast_clock_1p0[][3] = {
6795 - /* Addr 5G_HT20 5G_HT40 */
6796 - {0x00001030, 0x00000268, 0x000004d0},
6797 - {0x00001070, 0x0000018c, 0x00000318},
6798 - {0x000010b0, 0x00000fd0, 0x00001fa0},
6799 - {0x00008014, 0x044c044c, 0x08980898},
6800 - {0x0000801c, 0x148ec02b, 0x148ec057},
6801 - {0x00008318, 0x000044c0, 0x00008980},
6802 - {0x00009e00, 0x0372131c, 0x0372131c},
6803 - {0x0000a230, 0x0000400b, 0x00004016},
6804 - {0x0000a254, 0x00000898, 0x00001130},
6807 -static const u32 ar9480_modes_low_ob_db_tx_gain_table_1p0[][5] = {
6808 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6809 - {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
6810 - {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
6811 - {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
6812 - {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
6813 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
6814 - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6815 - {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
6816 - {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
6817 - {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
6818 - {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
6819 - {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
6820 - {0x0000a518, 0x21020220, 0x21020220, 0x16000402, 0x16000402},
6821 - {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404},
6822 - {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
6823 - {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
6824 - {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
6825 - {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
6826 - {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
6827 - {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
6828 - {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
6829 - {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
6830 - {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
6831 - {0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861},
6832 - {0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81},
6833 - {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x47001a83, 0x47001a83},
6834 - {0x0000a550, 0x61042a6c, 0x61042a6c, 0x4a001c84, 0x4a001c84},
6835 - {0x0000a554, 0x66062a6c, 0x66062a6c, 0x4e001ce3, 0x4e001ce3},
6836 - {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x52001ce5, 0x52001ce5},
6837 - {0x0000a55c, 0x7006308c, 0x7006308c, 0x56001ce9, 0x56001ce9},
6838 - {0x0000a560, 0x730a308a, 0x730a308a, 0x5a001ceb, 0x5a001ceb},
6839 - {0x0000a564, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6840 - {0x0000a568, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6841 - {0x0000a56c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6842 - {0x0000a570, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6843 - {0x0000a574, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6844 - {0x0000a578, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6845 - {0x0000a57c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
6846 - {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6847 - {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6848 - {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6849 - {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6850 - {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6851 - {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
6852 - {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
6853 - {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
6854 - {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
6855 - {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
6856 - {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
6857 - {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
6858 - {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
6859 - {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
6860 - {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
6861 - {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
6862 - {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
6863 - {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
6864 - {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
6865 - {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
6866 - {0x00016044, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
6867 - {0x00016048, 0x64992060, 0x64992060, 0x64992060, 0x64992060},
6868 - {0x00016444, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
6869 - {0x00016448, 0x64992000, 0x64992000, 0x64992000, 0x64992000},
6872 -static const u32 ar9480_1p0_soc_postamble[][5] = {
6873 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
6874 - {0x00007010, 0x00002233, 0x00002233, 0x00002233, 0x00002233},
6877 -static const u32 ar9480_common_mixed_rx_gain_table_1p0[][2] = {
6878 - /* Addr allmodes */
6879 - {0x0000a000, 0x00010000},
6880 - {0x0000a004, 0x00030002},
6881 - {0x0000a008, 0x00050004},
6882 - {0x0000a00c, 0x00810080},
6883 - {0x0000a010, 0x00830082},
6884 - {0x0000a014, 0x01810180},
6885 - {0x0000a018, 0x01830182},
6886 - {0x0000a01c, 0x01850184},
6887 - {0x0000a020, 0x01890188},
6888 - {0x0000a024, 0x018b018a},
6889 - {0x0000a028, 0x018d018c},
6890 - {0x0000a02c, 0x03820190},
6891 - {0x0000a030, 0x03840383},
6892 - {0x0000a034, 0x03880385},
6893 - {0x0000a038, 0x038a0389},
6894 - {0x0000a03c, 0x038c038b},
6895 - {0x0000a040, 0x0390038d},
6896 - {0x0000a044, 0x03920391},
6897 - {0x0000a048, 0x03940393},
6898 - {0x0000a04c, 0x03960395},
6899 - {0x0000a050, 0x00000000},
6900 - {0x0000a054, 0x00000000},
6901 - {0x0000a058, 0x00000000},
6902 - {0x0000a05c, 0x00000000},
6903 - {0x0000a060, 0x00000000},
6904 - {0x0000a064, 0x00000000},
6905 - {0x0000a068, 0x00000000},
6906 - {0x0000a06c, 0x00000000},
6907 - {0x0000a070, 0x00000000},
6908 - {0x0000a074, 0x00000000},
6909 - {0x0000a078, 0x00000000},
6910 - {0x0000a07c, 0x00000000},
6911 - {0x0000a080, 0x29292929},
6912 - {0x0000a084, 0x29292929},
6913 - {0x0000a088, 0x29292929},
6914 - {0x0000a08c, 0x29292929},
6915 - {0x0000a090, 0x22292929},
6916 - {0x0000a094, 0x1d1d2222},
6917 - {0x0000a098, 0x0c111117},
6918 - {0x0000a09c, 0x00030303},
6919 - {0x0000a0a0, 0x00000000},
6920 - {0x0000a0a4, 0x00000000},
6921 - {0x0000a0a8, 0x00000000},
6922 - {0x0000a0ac, 0x00000000},
6923 - {0x0000a0b0, 0x00000000},
6924 - {0x0000a0b4, 0x00000000},
6925 - {0x0000a0b8, 0x00000000},
6926 - {0x0000a0bc, 0x00000000},
6927 - {0x0000a0c0, 0x001f0000},
6928 - {0x0000a0c4, 0x01000101},
6929 - {0x0000a0c8, 0x011e011f},
6930 - {0x0000a0cc, 0x011c011d},
6931 - {0x0000a0d0, 0x02030204},
6932 - {0x0000a0d4, 0x02010202},
6933 - {0x0000a0d8, 0x021f0200},
6934 - {0x0000a0dc, 0x0302021e},
6935 - {0x0000a0e0, 0x03000301},
6936 - {0x0000a0e4, 0x031e031f},
6937 - {0x0000a0e8, 0x0402031d},
6938 - {0x0000a0ec, 0x04000401},
6939 - {0x0000a0f0, 0x041e041f},
6940 - {0x0000a0f4, 0x0502041d},
6941 - {0x0000a0f8, 0x05000501},
6942 - {0x0000a0fc, 0x051e051f},
6943 - {0x0000a100, 0x06010602},
6944 - {0x0000a104, 0x061f0600},
6945 - {0x0000a108, 0x061d061e},
6946 - {0x0000a10c, 0x07020703},
6947 - {0x0000a110, 0x07000701},
6948 - {0x0000a114, 0x00000000},
6949 - {0x0000a118, 0x00000000},
6950 - {0x0000a11c, 0x00000000},
6951 - {0x0000a120, 0x00000000},
6952 - {0x0000a124, 0x00000000},
6953 - {0x0000a128, 0x00000000},
6954 - {0x0000a12c, 0x00000000},
6955 - {0x0000a130, 0x00000000},
6956 - {0x0000a134, 0x00000000},
6957 - {0x0000a138, 0x00000000},
6958 - {0x0000a13c, 0x00000000},
6959 - {0x0000a140, 0x001f0000},
6960 - {0x0000a144, 0x01000101},
6961 - {0x0000a148, 0x011e011f},
6962 - {0x0000a14c, 0x011c011d},
6963 - {0x0000a150, 0x02030204},
6964 - {0x0000a154, 0x02010202},
6965 - {0x0000a158, 0x021f0200},
6966 - {0x0000a15c, 0x0302021e},
6967 - {0x0000a160, 0x03000301},
6968 - {0x0000a164, 0x031e031f},
6969 - {0x0000a168, 0x0402031d},
6970 - {0x0000a16c, 0x04000401},
6971 - {0x0000a170, 0x041e041f},
6972 - {0x0000a174, 0x0502041d},
6973 - {0x0000a178, 0x05000501},
6974 - {0x0000a17c, 0x051e051f},
6975 - {0x0000a180, 0x06010602},
6976 - {0x0000a184, 0x061f0600},
6977 - {0x0000a188, 0x061d061e},
6978 - {0x0000a18c, 0x07020703},
6979 - {0x0000a190, 0x07000701},
6980 - {0x0000a194, 0x00000000},
6981 - {0x0000a198, 0x00000000},
6982 - {0x0000a19c, 0x00000000},
6983 - {0x0000a1a0, 0x00000000},
6984 - {0x0000a1a4, 0x00000000},
6985 - {0x0000a1a8, 0x00000000},
6986 - {0x0000a1ac, 0x00000000},
6987 - {0x0000a1b0, 0x00000000},
6988 - {0x0000a1b4, 0x00000000},
6989 - {0x0000a1b8, 0x00000000},
6990 - {0x0000a1bc, 0x00000000},
6991 - {0x0000a1c0, 0x00000000},
6992 - {0x0000a1c4, 0x00000000},
6993 - {0x0000a1c8, 0x00000000},
6994 - {0x0000a1cc, 0x00000000},
6995 - {0x0000a1d0, 0x00000000},
6996 - {0x0000a1d4, 0x00000000},
6997 - {0x0000a1d8, 0x00000000},
6998 - {0x0000a1dc, 0x00000000},
6999 - {0x0000a1e0, 0x00000000},
7000 - {0x0000a1e4, 0x00000000},
7001 - {0x0000a1e8, 0x00000000},
7002 - {0x0000a1ec, 0x00000000},
7003 - {0x0000a1f0, 0x00000396},
7004 - {0x0000a1f4, 0x00000396},
7005 - {0x0000a1f8, 0x00000396},
7006 - {0x0000a1fc, 0x00000196},
7007 - {0x0000b000, 0x00010000},
7008 - {0x0000b004, 0x00030002},
7009 - {0x0000b008, 0x00050004},
7010 - {0x0000b00c, 0x00810080},
7011 - {0x0000b010, 0x00830082},
7012 - {0x0000b014, 0x01810180},
7013 - {0x0000b018, 0x01830182},
7014 - {0x0000b01c, 0x01850184},
7015 - {0x0000b020, 0x02810280},
7016 - {0x0000b024, 0x02830282},
7017 - {0x0000b028, 0x02850284},
7018 - {0x0000b02c, 0x02890288},
7019 - {0x0000b030, 0x028b028a},
7020 - {0x0000b034, 0x0388028c},
7021 - {0x0000b038, 0x038a0389},
7022 - {0x0000b03c, 0x038c038b},
7023 - {0x0000b040, 0x0390038d},
7024 - {0x0000b044, 0x03920391},
7025 - {0x0000b048, 0x03940393},
7026 - {0x0000b04c, 0x03960395},
7027 - {0x0000b050, 0x00000000},
7028 - {0x0000b054, 0x00000000},
7029 - {0x0000b058, 0x00000000},
7030 - {0x0000b05c, 0x00000000},
7031 - {0x0000b060, 0x00000000},
7032 - {0x0000b064, 0x00000000},
7033 - {0x0000b068, 0x00000000},
7034 - {0x0000b06c, 0x00000000},
7035 - {0x0000b070, 0x00000000},
7036 - {0x0000b074, 0x00000000},
7037 - {0x0000b078, 0x00000000},
7038 - {0x0000b07c, 0x00000000},
7039 - {0x0000b080, 0x2a2d2f32},
7040 - {0x0000b084, 0x21232328},
7041 - {0x0000b088, 0x19191c1e},
7042 - {0x0000b08c, 0x12141417},
7043 - {0x0000b090, 0x07070e0e},
7044 - {0x0000b094, 0x03030305},
7045 - {0x0000b098, 0x00000003},
7046 - {0x0000b09c, 0x00000000},
7047 - {0x0000b0a0, 0x00000000},
7048 - {0x0000b0a4, 0x00000000},
7049 - {0x0000b0a8, 0x00000000},
7050 - {0x0000b0ac, 0x00000000},
7051 - {0x0000b0b0, 0x00000000},
7052 - {0x0000b0b4, 0x00000000},
7053 - {0x0000b0b8, 0x00000000},
7054 - {0x0000b0bc, 0x00000000},
7055 - {0x0000b0c0, 0x003f0020},
7056 - {0x0000b0c4, 0x00400041},
7057 - {0x0000b0c8, 0x0140005f},
7058 - {0x0000b0cc, 0x0160015f},
7059 - {0x0000b0d0, 0x017e017f},
7060 - {0x0000b0d4, 0x02410242},
7061 - {0x0000b0d8, 0x025f0240},
7062 - {0x0000b0dc, 0x027f0260},
7063 - {0x0000b0e0, 0x0341027e},
7064 - {0x0000b0e4, 0x035f0340},
7065 - {0x0000b0e8, 0x037f0360},
7066 - {0x0000b0ec, 0x04400441},
7067 - {0x0000b0f0, 0x0460045f},
7068 - {0x0000b0f4, 0x0541047f},
7069 - {0x0000b0f8, 0x055f0540},
7070 - {0x0000b0fc, 0x057f0560},
7071 - {0x0000b100, 0x06400641},
7072 - {0x0000b104, 0x0660065f},
7073 - {0x0000b108, 0x067e067f},
7074 - {0x0000b10c, 0x07410742},
7075 - {0x0000b110, 0x075f0740},
7076 - {0x0000b114, 0x077f0760},
7077 - {0x0000b118, 0x07800781},
7078 - {0x0000b11c, 0x07a0079f},
7079 - {0x0000b120, 0x07c107bf},
7080 - {0x0000b124, 0x000007c0},
7081 - {0x0000b128, 0x00000000},
7082 - {0x0000b12c, 0x00000000},
7083 - {0x0000b130, 0x00000000},
7084 - {0x0000b134, 0x00000000},
7085 - {0x0000b138, 0x00000000},
7086 - {0x0000b13c, 0x00000000},
7087 - {0x0000b140, 0x003f0020},
7088 - {0x0000b144, 0x00400041},
7089 - {0x0000b148, 0x0140005f},
7090 - {0x0000b14c, 0x0160015f},
7091 - {0x0000b150, 0x017e017f},
7092 - {0x0000b154, 0x02410242},
7093 - {0x0000b158, 0x025f0240},
7094 - {0x0000b15c, 0x027f0260},
7095 - {0x0000b160, 0x0341027e},
7096 - {0x0000b164, 0x035f0340},
7097 - {0x0000b168, 0x037f0360},
7098 - {0x0000b16c, 0x04400441},
7099 - {0x0000b170, 0x0460045f},
7100 - {0x0000b174, 0x0541047f},
7101 - {0x0000b178, 0x055f0540},
7102 - {0x0000b17c, 0x057f0560},
7103 - {0x0000b180, 0x06400641},
7104 - {0x0000b184, 0x0660065f},
7105 - {0x0000b188, 0x067e067f},
7106 - {0x0000b18c, 0x07410742},
7107 - {0x0000b190, 0x075f0740},
7108 - {0x0000b194, 0x077f0760},
7109 - {0x0000b198, 0x07800781},
7110 - {0x0000b19c, 0x07a0079f},
7111 - {0x0000b1a0, 0x07c107bf},
7112 - {0x0000b1a4, 0x000007c0},
7113 - {0x0000b1a8, 0x00000000},
7114 - {0x0000b1ac, 0x00000000},
7115 - {0x0000b1b0, 0x00000000},
7116 - {0x0000b1b4, 0x00000000},
7117 - {0x0000b1b8, 0x00000000},
7118 - {0x0000b1bc, 0x00000000},
7119 - {0x0000b1c0, 0x00000000},
7120 - {0x0000b1c4, 0x00000000},
7121 - {0x0000b1c8, 0x00000000},
7122 - {0x0000b1cc, 0x00000000},
7123 - {0x0000b1d0, 0x00000000},
7124 - {0x0000b1d4, 0x00000000},
7125 - {0x0000b1d8, 0x00000000},
7126 - {0x0000b1dc, 0x00000000},
7127 - {0x0000b1e0, 0x00000000},
7128 - {0x0000b1e4, 0x00000000},
7129 - {0x0000b1e8, 0x00000000},
7130 - {0x0000b1ec, 0x00000000},
7131 - {0x0000b1f0, 0x00000396},
7132 - {0x0000b1f4, 0x00000396},
7133 - {0x0000b1f8, 0x00000396},
7134 - {0x0000b1fc, 0x00000196},
7137 -static const u32 ar9480_pcie_phy_clkreq_disable_L1_1p0[][2] = {
7138 - /* Addr allmodes */
7139 - {0x00018c00, 0x10013e5e},
7140 - {0x00018c04, 0x000801d8},
7141 - {0x00018c08, 0x0000580c},
7144 -static const u32 ar9480_1p0_baseband_core_emulation[][2] = {
7145 - /* Addr allmodes */
7146 - {0x00009800, 0xafa68e30},
7147 - {0x00009884, 0x00002842},
7148 - {0x00009c04, 0xff55ff55},
7149 - {0x00009c08, 0x0320ff55},
7150 - {0x00009e50, 0x00000000},
7151 - {0x00009fcc, 0x00000014},
7152 - {0x0000a344, 0x00000010},
7153 - {0x0000a398, 0x00000000},
7154 - {0x0000a39c, 0x71733d01},
7155 - {0x0000a3a0, 0xd0ad5c12},
7156 - {0x0000a3c0, 0x22222220},
7157 - {0x0000a3c4, 0x22222222},
7158 - {0x0000a404, 0x00418a11},
7159 - {0x0000a418, 0x050001ce},
7160 - {0x0000a438, 0x00001800},
7161 - {0x0000a458, 0x01444452},
7162 - {0x0000a644, 0x3fad9d74},
7163 - {0x0000a690, 0x00000038},
7166 -static const u32 ar9480_1p0_radio_core[][2] = {
7167 - /* Addr allmodes */
7168 - {0x00016000, 0x36db6db6},
7169 - {0x00016004, 0x6db6db40},
7170 - {0x00016008, 0x73f00000},
7171 - {0x0001600c, 0x00000000},
7172 - {0x00016010, 0x6d820001},
7173 - {0x00016040, 0x7f80fff8},
7174 - {0x0001604c, 0x2699e04f},
7175 - {0x00016050, 0x6db6db6c},
7176 - {0x00016054, 0x6db60000},
7177 - {0x00016058, 0x6c200000},
7178 - {0x00016080, 0x00040000},
7179 - {0x00016084, 0x9a68048c},
7180 - {0x00016088, 0x54214514},
7181 - {0x0001608c, 0x12030409},
7182 - {0x00016090, 0x24926490},
7183 - {0x00016098, 0xd2888888},
7184 - {0x000160a0, 0x0a108ffe},
7185 - {0x000160a4, 0x812fc490},
7186 - {0x000160a8, 0x423c8000},
7187 - {0x000160b4, 0x92000000},
7188 - {0x000160b8, 0x0285dddc},
7189 - {0x000160bc, 0x02908888},
7190 - {0x000160c0, 0x00adb6d0},
7191 - {0x000160c4, 0x6db6db60},
7192 - {0x000160c8, 0x6db6db6c},
7193 - {0x000160cc, 0x0de6c1b0},
7194 - {0x00016100, 0x3fffbe04},
7195 - {0x00016104, 0xfff80000},
7196 - {0x00016108, 0x00200400},
7197 - {0x00016110, 0x00000000},
7198 - {0x00016144, 0x02084080},
7199 - {0x00016148, 0x000080c0},
7200 - {0x00016280, 0x050a0001},
7201 - {0x00016284, 0x3d841400},
7202 - {0x00016288, 0x00000000},
7203 - {0x0001628c, 0xe3000000},
7204 - {0x00016290, 0xa1005080},
7205 - {0x00016294, 0x00000020},
7206 - {0x00016298, 0x50a02900},
7207 - {0x00016340, 0x121e4276},
7208 - {0x00016344, 0x00300000},
7209 - {0x00016400, 0x36db6db6},
7210 - {0x00016404, 0x6db6db40},
7211 - {0x00016408, 0x73f00000},
7212 - {0x0001640c, 0x00000000},
7213 - {0x00016410, 0x6c800001},
7214 - {0x00016440, 0x7f80fff8},
7215 - {0x0001644c, 0x4699e04f},
7216 - {0x00016450, 0x6db6db6c},
7217 - {0x00016454, 0x6db60000},
7218 - {0x00016500, 0x3fffbe04},
7219 - {0x00016504, 0xfff80000},
7220 - {0x00016508, 0x00200400},
7221 - {0x00016510, 0x00000000},
7222 - {0x00016544, 0x02084080},
7223 - {0x00016548, 0x000080c0},
7226 -static const u32 ar9480_1p0_soc_preamble[][2] = {
7227 - /* Addr allmodes */
7228 - {0x00007020, 0x00000000},
7229 - {0x00007034, 0x00000002},
7230 - {0x00007038, 0x000004c2},
7233 -static const u32 ar9480_1p0_sys2ant[][2] = {
7234 - /* Addr allmodes */
7235 - {0x00063120, 0x00801980},
7238 -#endif /* INITVALS_9480_1P0_H */
7239 --- a/drivers/net/wireless/ath/ath9k/ar9480_2p0_initvals.h
7243 - * Copyright (c) 2010 Atheros Communications Inc.
7245 - * Permission to use, copy, modify, and/or distribute this software for any
7246 - * purpose with or without fee is hereby granted, provided that the above
7247 - * copyright notice and this permission notice appear in all copies.
7249 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7250 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
7251 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
7252 - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
7253 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
7254 - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
7255 - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
7258 -#ifndef INITVALS_9480_2P0_H
7259 -#define INITVALS_9480_2P0_H
7263 -static const u32 ar9480_modes_fast_clock_2p0[][3] = {
7264 - /* Addr 5G_HT20 5G_HT40 */
7265 - {0x00001030, 0x00000268, 0x000004d0},
7266 - {0x00001070, 0x0000018c, 0x00000318},
7267 - {0x000010b0, 0x00000fd0, 0x00001fa0},
7268 - {0x00008014, 0x044c044c, 0x08980898},
7269 - {0x0000801c, 0x148ec02b, 0x148ec057},
7270 - {0x00008318, 0x000044c0, 0x00008980},
7271 - {0x00009e00, 0x0372131c, 0x0372131c},
7272 - {0x0000a230, 0x0000400b, 0x00004016},
7273 - {0x0000a254, 0x00000898, 0x00001130},
7276 -static const u32 ar9480_pciephy_clkreq_enable_L1_2p0[][2] = {
7277 - /* Addr allmodes */
7278 - {0x00018c00, 0x18253ede},
7279 - {0x00018c04, 0x000801d8},
7280 - {0x00018c08, 0x0003580c},
7283 -static const u32 ar9480_2p0_baseband_postamble[][5] = {
7284 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
7285 - {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
7286 - {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e},
7287 - {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0},
7288 - {0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x06903881},
7289 - {0x0000982c, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4},
7290 - {0x00009830, 0x0000059c, 0x0000059c, 0x0000119c, 0x0000119c},
7291 - {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4},
7292 - {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0},
7293 - {0x00009e04, 0x001c2020, 0x001c2020, 0x001c2020, 0x001c2020},
7294 - {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2},
7295 - {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec84d2e},
7296 - {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3039605e, 0x33795d5e},
7297 - {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
7298 - {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c},
7299 - {0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce},
7300 - {0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021},
7301 - {0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c782},
7302 - {0x00009e44, 0xfe321e27, 0xfe321e27, 0xfe291e27, 0xfe291e27},
7303 - {0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012},
7304 - {0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000},
7305 - {0x0000a204, 0x013187c0, 0x013187c4, 0x013187c4, 0x013187c0},
7306 - {0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004},
7307 - {0x0000a22c, 0x01026a2f, 0x01026a27, 0x01026a2f, 0x01026a2f},
7308 - {0x0000a230, 0x0000400a, 0x00004014, 0x00004016, 0x0000400b},
7309 - {0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff},
7310 - {0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018},
7311 - {0x0000a250, 0x00000000, 0x00000000, 0x00000210, 0x00000108},
7312 - {0x0000a254, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898},
7313 - {0x0000a258, 0x02020002, 0x02020002, 0x02020002, 0x02020002},
7314 - {0x0000a25c, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e},
7315 - {0x0000a260, 0x0a021501, 0x0a021501, 0x3a021501, 0x3a021501},
7316 - {0x0000a264, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
7317 - {0x0000a280, 0x00000007, 0x00000007, 0x0000000b, 0x0000000b},
7318 - {0x0000a284, 0x00000000, 0x00000000, 0x00000150, 0x00000150},
7319 - {0x0000a288, 0x00000110, 0x00000110, 0x00000110, 0x00000110},
7320 - {0x0000a28c, 0x00022222, 0x00022222, 0x00022222, 0x00022222},
7321 - {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18},
7322 - {0x0000a2d0, 0x00041981, 0x00041981, 0x00041981, 0x00041982},
7323 - {0x0000a2d8, 0x7999a83b, 0x7999a83b, 0x7999a83b, 0x7999a83b},
7324 - {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
7325 - {0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
7326 - {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000},
7327 - {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
7328 - {0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
7329 - {0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce},
7330 - {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
7333 -static const u32 ar9480_2p0_mac_core_emulation[][2] = {
7334 - /* Addr allmodes */
7335 - {0x00000030, 0x000e0085},
7336 - {0x00000044, 0x00000008},
7337 - {0x0000805c, 0xffffc7ff},
7338 - {0x00008344, 0xaa4a105b},
7341 -static const u32 ar9480_common_rx_gain_table_2p0[][2] = {
7342 - /* Addr allmodes */
7343 - {0x0000a000, 0x00010000},
7344 - {0x0000a004, 0x00030002},
7345 - {0x0000a008, 0x00050004},
7346 - {0x0000a00c, 0x00810080},
7347 - {0x0000a010, 0x00830082},
7348 - {0x0000a014, 0x01810180},
7349 - {0x0000a018, 0x01830182},
7350 - {0x0000a01c, 0x01850184},
7351 - {0x0000a020, 0x01890188},
7352 - {0x0000a024, 0x018b018a},
7353 - {0x0000a028, 0x018d018c},
7354 - {0x0000a02c, 0x01910190},
7355 - {0x0000a030, 0x01930192},
7356 - {0x0000a034, 0x01950194},
7357 - {0x0000a038, 0x038a0196},
7358 - {0x0000a03c, 0x038c038b},
7359 - {0x0000a040, 0x0390038d},
7360 - {0x0000a044, 0x03920391},
7361 - {0x0000a048, 0x03940393},
7362 - {0x0000a04c, 0x03960395},
7363 - {0x0000a050, 0x00000000},
7364 - {0x0000a054, 0x00000000},
7365 - {0x0000a058, 0x00000000},
7366 - {0x0000a05c, 0x00000000},
7367 - {0x0000a060, 0x00000000},
7368 - {0x0000a064, 0x00000000},
7369 - {0x0000a068, 0x00000000},
7370 - {0x0000a06c, 0x00000000},
7371 - {0x0000a070, 0x00000000},
7372 - {0x0000a074, 0x00000000},
7373 - {0x0000a078, 0x00000000},
7374 - {0x0000a07c, 0x00000000},
7375 - {0x0000a080, 0x22222229},
7376 - {0x0000a084, 0x1d1d1d1d},
7377 - {0x0000a088, 0x1d1d1d1d},
7378 - {0x0000a08c, 0x1d1d1d1d},
7379 - {0x0000a090, 0x171d1d1d},
7380 - {0x0000a094, 0x11111717},
7381 - {0x0000a098, 0x00030311},
7382 - {0x0000a09c, 0x00000000},
7383 - {0x0000a0a0, 0x00000000},
7384 - {0x0000a0a4, 0x00000000},
7385 - {0x0000a0a8, 0x00000000},
7386 - {0x0000a0ac, 0x00000000},
7387 - {0x0000a0b0, 0x00000000},
7388 - {0x0000a0b4, 0x00000000},
7389 - {0x0000a0b8, 0x00000000},
7390 - {0x0000a0bc, 0x00000000},
7391 - {0x0000a0c0, 0x001f0000},
7392 - {0x0000a0c4, 0x01000101},
7393 - {0x0000a0c8, 0x011e011f},
7394 - {0x0000a0cc, 0x011c011d},
7395 - {0x0000a0d0, 0x02030204},
7396 - {0x0000a0d4, 0x02010202},
7397 - {0x0000a0d8, 0x021f0200},
7398 - {0x0000a0dc, 0x0302021e},
7399 - {0x0000a0e0, 0x03000301},
7400 - {0x0000a0e4, 0x031e031f},
7401 - {0x0000a0e8, 0x0402031d},
7402 - {0x0000a0ec, 0x04000401},
7403 - {0x0000a0f0, 0x041e041f},
7404 - {0x0000a0f4, 0x0502041d},
7405 - {0x0000a0f8, 0x05000501},
7406 - {0x0000a0fc, 0x051e051f},
7407 - {0x0000a100, 0x06010602},
7408 - {0x0000a104, 0x061f0600},
7409 - {0x0000a108, 0x061d061e},
7410 - {0x0000a10c, 0x07020703},
7411 - {0x0000a110, 0x07000701},
7412 - {0x0000a114, 0x00000000},
7413 - {0x0000a118, 0x00000000},
7414 - {0x0000a11c, 0x00000000},
7415 - {0x0000a120, 0x00000000},
7416 - {0x0000a124, 0x00000000},
7417 - {0x0000a128, 0x00000000},
7418 - {0x0000a12c, 0x00000000},
7419 - {0x0000a130, 0x00000000},
7420 - {0x0000a134, 0x00000000},
7421 - {0x0000a138, 0x00000000},
7422 - {0x0000a13c, 0x00000000},
7423 - {0x0000a140, 0x001f0000},
7424 - {0x0000a144, 0x01000101},
7425 - {0x0000a148, 0x011e011f},
7426 - {0x0000a14c, 0x011c011d},
7427 - {0x0000a150, 0x02030204},
7428 - {0x0000a154, 0x02010202},
7429 - {0x0000a158, 0x021f0200},
7430 - {0x0000a15c, 0x0302021e},
7431 - {0x0000a160, 0x03000301},
7432 - {0x0000a164, 0x031e031f},
7433 - {0x0000a168, 0x0402031d},
7434 - {0x0000a16c, 0x04000401},
7435 - {0x0000a170, 0x041e041f},
7436 - {0x0000a174, 0x0502041d},
7437 - {0x0000a178, 0x05000501},
7438 - {0x0000a17c, 0x051e051f},
7439 - {0x0000a180, 0x06010602},
7440 - {0x0000a184, 0x061f0600},
7441 - {0x0000a188, 0x061d061e},
7442 - {0x0000a18c, 0x07020703},
7443 - {0x0000a190, 0x07000701},
7444 - {0x0000a194, 0x00000000},
7445 - {0x0000a198, 0x00000000},
7446 - {0x0000a19c, 0x00000000},
7447 - {0x0000a1a0, 0x00000000},
7448 - {0x0000a1a4, 0x00000000},
7449 - {0x0000a1a8, 0x00000000},
7450 - {0x0000a1ac, 0x00000000},
7451 - {0x0000a1b0, 0x00000000},
7452 - {0x0000a1b4, 0x00000000},
7453 - {0x0000a1b8, 0x00000000},
7454 - {0x0000a1bc, 0x00000000},
7455 - {0x0000a1c0, 0x00000000},
7456 - {0x0000a1c4, 0x00000000},
7457 - {0x0000a1c8, 0x00000000},
7458 - {0x0000a1cc, 0x00000000},
7459 - {0x0000a1d0, 0x00000000},
7460 - {0x0000a1d4, 0x00000000},
7461 - {0x0000a1d8, 0x00000000},
7462 - {0x0000a1dc, 0x00000000},
7463 - {0x0000a1e0, 0x00000000},
7464 - {0x0000a1e4, 0x00000000},
7465 - {0x0000a1e8, 0x00000000},
7466 - {0x0000a1ec, 0x00000000},
7467 - {0x0000a1f0, 0x00000396},
7468 - {0x0000a1f4, 0x00000396},
7469 - {0x0000a1f8, 0x00000396},
7470 - {0x0000a1fc, 0x00000196},
7471 - {0x0000b000, 0x00010000},
7472 - {0x0000b004, 0x00030002},
7473 - {0x0000b008, 0x00050004},
7474 - {0x0000b00c, 0x00810080},
7475 - {0x0000b010, 0x00830082},
7476 - {0x0000b014, 0x01810180},
7477 - {0x0000b018, 0x01830182},
7478 - {0x0000b01c, 0x01850184},
7479 - {0x0000b020, 0x02810280},
7480 - {0x0000b024, 0x02830282},
7481 - {0x0000b028, 0x02850284},
7482 - {0x0000b02c, 0x02890288},
7483 - {0x0000b030, 0x028b028a},
7484 - {0x0000b034, 0x0388028c},
7485 - {0x0000b038, 0x038a0389},
7486 - {0x0000b03c, 0x038c038b},
7487 - {0x0000b040, 0x0390038d},
7488 - {0x0000b044, 0x03920391},
7489 - {0x0000b048, 0x03940393},
7490 - {0x0000b04c, 0x03960395},
7491 - {0x0000b050, 0x00000000},
7492 - {0x0000b054, 0x00000000},
7493 - {0x0000b058, 0x00000000},
7494 - {0x0000b05c, 0x00000000},
7495 - {0x0000b060, 0x00000000},
7496 - {0x0000b064, 0x00000000},
7497 - {0x0000b068, 0x00000000},
7498 - {0x0000b06c, 0x00000000},
7499 - {0x0000b070, 0x00000000},
7500 - {0x0000b074, 0x00000000},
7501 - {0x0000b078, 0x00000000},
7502 - {0x0000b07c, 0x00000000},
7503 - {0x0000b080, 0x2a2d2f32},
7504 - {0x0000b084, 0x21232328},
7505 - {0x0000b088, 0x19191c1e},
7506 - {0x0000b08c, 0x12141417},
7507 - {0x0000b090, 0x07070e0e},
7508 - {0x0000b094, 0x03030305},
7509 - {0x0000b098, 0x00000003},
7510 - {0x0000b09c, 0x00000000},
7511 - {0x0000b0a0, 0x00000000},
7512 - {0x0000b0a4, 0x00000000},
7513 - {0x0000b0a8, 0x00000000},
7514 - {0x0000b0ac, 0x00000000},
7515 - {0x0000b0b0, 0x00000000},
7516 - {0x0000b0b4, 0x00000000},
7517 - {0x0000b0b8, 0x00000000},
7518 - {0x0000b0bc, 0x00000000},
7519 - {0x0000b0c0, 0x003f0020},
7520 - {0x0000b0c4, 0x00400041},
7521 - {0x0000b0c8, 0x0140005f},
7522 - {0x0000b0cc, 0x0160015f},
7523 - {0x0000b0d0, 0x017e017f},
7524 - {0x0000b0d4, 0x02410242},
7525 - {0x0000b0d8, 0x025f0240},
7526 - {0x0000b0dc, 0x027f0260},
7527 - {0x0000b0e0, 0x0341027e},
7528 - {0x0000b0e4, 0x035f0340},
7529 - {0x0000b0e8, 0x037f0360},
7530 - {0x0000b0ec, 0x04400441},
7531 - {0x0000b0f0, 0x0460045f},
7532 - {0x0000b0f4, 0x0541047f},
7533 - {0x0000b0f8, 0x055f0540},
7534 - {0x0000b0fc, 0x057f0560},
7535 - {0x0000b100, 0x06400641},
7536 - {0x0000b104, 0x0660065f},
7537 - {0x0000b108, 0x067e067f},
7538 - {0x0000b10c, 0x07410742},
7539 - {0x0000b110, 0x075f0740},
7540 - {0x0000b114, 0x077f0760},
7541 - {0x0000b118, 0x07800781},
7542 - {0x0000b11c, 0x07a0079f},
7543 - {0x0000b120, 0x07c107bf},
7544 - {0x0000b124, 0x000007c0},
7545 - {0x0000b128, 0x00000000},
7546 - {0x0000b12c, 0x00000000},
7547 - {0x0000b130, 0x00000000},
7548 - {0x0000b134, 0x00000000},
7549 - {0x0000b138, 0x00000000},
7550 - {0x0000b13c, 0x00000000},
7551 - {0x0000b140, 0x003f0020},
7552 - {0x0000b144, 0x00400041},
7553 - {0x0000b148, 0x0140005f},
7554 - {0x0000b14c, 0x0160015f},
7555 - {0x0000b150, 0x017e017f},
7556 - {0x0000b154, 0x02410242},
7557 - {0x0000b158, 0x025f0240},
7558 - {0x0000b15c, 0x027f0260},
7559 - {0x0000b160, 0x0341027e},
7560 - {0x0000b164, 0x035f0340},
7561 - {0x0000b168, 0x037f0360},
7562 - {0x0000b16c, 0x04400441},
7563 - {0x0000b170, 0x0460045f},
7564 - {0x0000b174, 0x0541047f},
7565 - {0x0000b178, 0x055f0540},
7566 - {0x0000b17c, 0x057f0560},
7567 - {0x0000b180, 0x06400641},
7568 - {0x0000b184, 0x0660065f},
7569 - {0x0000b188, 0x067e067f},
7570 - {0x0000b18c, 0x07410742},
7571 - {0x0000b190, 0x075f0740},
7572 - {0x0000b194, 0x077f0760},
7573 - {0x0000b198, 0x07800781},
7574 - {0x0000b19c, 0x07a0079f},
7575 - {0x0000b1a0, 0x07c107bf},
7576 - {0x0000b1a4, 0x000007c0},
7577 - {0x0000b1a8, 0x00000000},
7578 - {0x0000b1ac, 0x00000000},
7579 - {0x0000b1b0, 0x00000000},
7580 - {0x0000b1b4, 0x00000000},
7581 - {0x0000b1b8, 0x00000000},
7582 - {0x0000b1bc, 0x00000000},
7583 - {0x0000b1c0, 0x00000000},
7584 - {0x0000b1c4, 0x00000000},
7585 - {0x0000b1c8, 0x00000000},
7586 - {0x0000b1cc, 0x00000000},
7587 - {0x0000b1d0, 0x00000000},
7588 - {0x0000b1d4, 0x00000000},
7589 - {0x0000b1d8, 0x00000000},
7590 - {0x0000b1dc, 0x00000000},
7591 - {0x0000b1e0, 0x00000000},
7592 - {0x0000b1e4, 0x00000000},
7593 - {0x0000b1e8, 0x00000000},
7594 - {0x0000b1ec, 0x00000000},
7595 - {0x0000b1f0, 0x00000396},
7596 - {0x0000b1f4, 0x00000396},
7597 - {0x0000b1f8, 0x00000396},
7598 - {0x0000b1fc, 0x00000196},
7601 -static const u32 ar9480_pciephy_clkreq_disable_L1_2p0[][2] = {
7602 - /* Addr allmodes */
7603 - {0x00018c00, 0x18213ede},
7604 - {0x00018c04, 0x000801d8},
7605 - {0x00018c08, 0x0003580c},
7608 -static const u32 ar9480_pciephy_pll_on_clkreq_disable_L1_2p0[][2] = {
7609 - /* Addr allmodes */
7610 - {0x00018c00, 0x18212ede},
7611 - {0x00018c04, 0x000801d8},
7612 - {0x00018c08, 0x0003580c},
7615 -static const u32 ar9480_2p0_sys3ant[][2] = {
7616 - /* Addr allmodes */
7617 - {0x00063280, 0x00040807},
7618 - {0x00063284, 0x104ccccc},
7621 -static const u32 ar9480_common_rx_gain_table_ar9280_2p0[][2] = {
7622 - /* Addr allmodes */
7623 - {0x0000a000, 0x02000101},
7624 - {0x0000a004, 0x02000102},
7625 - {0x0000a008, 0x02000103},
7626 - {0x0000a00c, 0x02000104},
7627 - {0x0000a010, 0x02000200},
7628 - {0x0000a014, 0x02000201},
7629 - {0x0000a018, 0x02000202},
7630 - {0x0000a01c, 0x02000203},
7631 - {0x0000a020, 0x02000204},
7632 - {0x0000a024, 0x02000205},
7633 - {0x0000a028, 0x02000208},
7634 - {0x0000a02c, 0x02000302},
7635 - {0x0000a030, 0x02000303},
7636 - {0x0000a034, 0x02000304},
7637 - {0x0000a038, 0x02000400},
7638 - {0x0000a03c, 0x02010300},
7639 - {0x0000a040, 0x02010301},
7640 - {0x0000a044, 0x02010302},
7641 - {0x0000a048, 0x02000500},
7642 - {0x0000a04c, 0x02010400},
7643 - {0x0000a050, 0x02020300},
7644 - {0x0000a054, 0x02020301},
7645 - {0x0000a058, 0x02020302},
7646 - {0x0000a05c, 0x02020303},
7647 - {0x0000a060, 0x02020400},
7648 - {0x0000a064, 0x02030300},
7649 - {0x0000a068, 0x02030301},
7650 - {0x0000a06c, 0x02030302},
7651 - {0x0000a070, 0x02030303},
7652 - {0x0000a074, 0x02030400},
7653 - {0x0000a078, 0x02040300},
7654 - {0x0000a07c, 0x02040301},
7655 - {0x0000a080, 0x02040302},
7656 - {0x0000a084, 0x02040303},
7657 - {0x0000a088, 0x02030500},
7658 - {0x0000a08c, 0x02040400},
7659 - {0x0000a090, 0x02050203},
7660 - {0x0000a094, 0x02050204},
7661 - {0x0000a098, 0x02050205},
7662 - {0x0000a09c, 0x02040500},
7663 - {0x0000a0a0, 0x02050301},
7664 - {0x0000a0a4, 0x02050302},
7665 - {0x0000a0a8, 0x02050303},
7666 - {0x0000a0ac, 0x02050400},
7667 - {0x0000a0b0, 0x02050401},
7668 - {0x0000a0b4, 0x02050402},
7669 - {0x0000a0b8, 0x02050403},
7670 - {0x0000a0bc, 0x02050500},
7671 - {0x0000a0c0, 0x02050501},
7672 - {0x0000a0c4, 0x02050502},
7673 - {0x0000a0c8, 0x02050503},
7674 - {0x0000a0cc, 0x02050504},
7675 - {0x0000a0d0, 0x02050600},
7676 - {0x0000a0d4, 0x02050601},
7677 - {0x0000a0d8, 0x02050602},
7678 - {0x0000a0dc, 0x02050603},
7679 - {0x0000a0e0, 0x02050604},
7680 - {0x0000a0e4, 0x02050700},
7681 - {0x0000a0e8, 0x02050701},
7682 - {0x0000a0ec, 0x02050702},
7683 - {0x0000a0f0, 0x02050703},
7684 - {0x0000a0f4, 0x02050704},
7685 - {0x0000a0f8, 0x02050705},
7686 - {0x0000a0fc, 0x02050708},
7687 - {0x0000a100, 0x02050709},
7688 - {0x0000a104, 0x0205070a},
7689 - {0x0000a108, 0x0205070b},
7690 - {0x0000a10c, 0x0205070c},
7691 - {0x0000a110, 0x0205070d},
7692 - {0x0000a114, 0x02050710},
7693 - {0x0000a118, 0x02050711},
7694 - {0x0000a11c, 0x02050712},
7695 - {0x0000a120, 0x02050713},
7696 - {0x0000a124, 0x02050714},
7697 - {0x0000a128, 0x02050715},
7698 - {0x0000a12c, 0x02050730},
7699 - {0x0000a130, 0x02050731},
7700 - {0x0000a134, 0x02050732},
7701 - {0x0000a138, 0x02050733},
7702 - {0x0000a13c, 0x02050734},
7703 - {0x0000a140, 0x02050735},
7704 - {0x0000a144, 0x02050750},
7705 - {0x0000a148, 0x02050751},
7706 - {0x0000a14c, 0x02050752},
7707 - {0x0000a150, 0x02050753},
7708 - {0x0000a154, 0x02050754},
7709 - {0x0000a158, 0x02050755},
7710 - {0x0000a15c, 0x02050770},
7711 - {0x0000a160, 0x02050771},
7712 - {0x0000a164, 0x02050772},
7713 - {0x0000a168, 0x02050773},
7714 - {0x0000a16c, 0x02050774},
7715 - {0x0000a170, 0x02050775},
7716 - {0x0000a174, 0x00000776},
7717 - {0x0000a178, 0x00000776},
7718 - {0x0000a17c, 0x00000776},
7719 - {0x0000a180, 0x00000776},
7720 - {0x0000a184, 0x00000776},
7721 - {0x0000a188, 0x00000776},
7722 - {0x0000a18c, 0x00000776},
7723 - {0x0000a190, 0x00000776},
7724 - {0x0000a194, 0x00000776},
7725 - {0x0000a198, 0x00000776},
7726 - {0x0000a19c, 0x00000776},
7727 - {0x0000a1a0, 0x00000776},
7728 - {0x0000a1a4, 0x00000776},
7729 - {0x0000a1a8, 0x00000776},
7730 - {0x0000a1ac, 0x00000776},
7731 - {0x0000a1b0, 0x00000776},
7732 - {0x0000a1b4, 0x00000776},
7733 - {0x0000a1b8, 0x00000776},
7734 - {0x0000a1bc, 0x00000776},
7735 - {0x0000a1c0, 0x00000776},
7736 - {0x0000a1c4, 0x00000776},
7737 - {0x0000a1c8, 0x00000776},
7738 - {0x0000a1cc, 0x00000776},
7739 - {0x0000a1d0, 0x00000776},
7740 - {0x0000a1d4, 0x00000776},
7741 - {0x0000a1d8, 0x00000776},
7742 - {0x0000a1dc, 0x00000776},
7743 - {0x0000a1e0, 0x00000776},
7744 - {0x0000a1e4, 0x00000776},
7745 - {0x0000a1e8, 0x00000776},
7746 - {0x0000a1ec, 0x00000776},
7747 - {0x0000a1f0, 0x00000776},
7748 - {0x0000a1f4, 0x00000776},
7749 - {0x0000a1f8, 0x00000776},
7750 - {0x0000a1fc, 0x00000776},
7751 - {0x0000b000, 0x02000101},
7752 - {0x0000b004, 0x02000102},
7753 - {0x0000b008, 0x02000103},
7754 - {0x0000b00c, 0x02000104},
7755 - {0x0000b010, 0x02000200},
7756 - {0x0000b014, 0x02000201},
7757 - {0x0000b018, 0x02000202},
7758 - {0x0000b01c, 0x02000203},
7759 - {0x0000b020, 0x02000204},
7760 - {0x0000b024, 0x02000205},
7761 - {0x0000b028, 0x02000208},
7762 - {0x0000b02c, 0x02000302},
7763 - {0x0000b030, 0x02000303},
7764 - {0x0000b034, 0x02000304},
7765 - {0x0000b038, 0x02000400},
7766 - {0x0000b03c, 0x02010300},
7767 - {0x0000b040, 0x02010301},
7768 - {0x0000b044, 0x02010302},
7769 - {0x0000b048, 0x02000500},
7770 - {0x0000b04c, 0x02010400},
7771 - {0x0000b050, 0x02020300},
7772 - {0x0000b054, 0x02020301},
7773 - {0x0000b058, 0x02020302},
7774 - {0x0000b05c, 0x02020303},
7775 - {0x0000b060, 0x02020400},
7776 - {0x0000b064, 0x02030300},
7777 - {0x0000b068, 0x02030301},
7778 - {0x0000b06c, 0x02030302},
7779 - {0x0000b070, 0x02030303},
7780 - {0x0000b074, 0x02030400},
7781 - {0x0000b078, 0x02040300},
7782 - {0x0000b07c, 0x02040301},
7783 - {0x0000b080, 0x02040302},
7784 - {0x0000b084, 0x02040303},
7785 - {0x0000b088, 0x02030500},
7786 - {0x0000b08c, 0x02040400},
7787 - {0x0000b090, 0x02050203},
7788 - {0x0000b094, 0x02050204},
7789 - {0x0000b098, 0x02050205},
7790 - {0x0000b09c, 0x02040500},
7791 - {0x0000b0a0, 0x02050301},
7792 - {0x0000b0a4, 0x02050302},
7793 - {0x0000b0a8, 0x02050303},
7794 - {0x0000b0ac, 0x02050400},
7795 - {0x0000b0b0, 0x02050401},
7796 - {0x0000b0b4, 0x02050402},
7797 - {0x0000b0b8, 0x02050403},
7798 - {0x0000b0bc, 0x02050500},
7799 - {0x0000b0c0, 0x02050501},
7800 - {0x0000b0c4, 0x02050502},
7801 - {0x0000b0c8, 0x02050503},
7802 - {0x0000b0cc, 0x02050504},
7803 - {0x0000b0d0, 0x02050600},
7804 - {0x0000b0d4, 0x02050601},
7805 - {0x0000b0d8, 0x02050602},
7806 - {0x0000b0dc, 0x02050603},
7807 - {0x0000b0e0, 0x02050604},
7808 - {0x0000b0e4, 0x02050700},
7809 - {0x0000b0e8, 0x02050701},
7810 - {0x0000b0ec, 0x02050702},
7811 - {0x0000b0f0, 0x02050703},
7812 - {0x0000b0f4, 0x02050704},
7813 - {0x0000b0f8, 0x02050705},
7814 - {0x0000b0fc, 0x02050708},
7815 - {0x0000b100, 0x02050709},
7816 - {0x0000b104, 0x0205070a},
7817 - {0x0000b108, 0x0205070b},
7818 - {0x0000b10c, 0x0205070c},
7819 - {0x0000b110, 0x0205070d},
7820 - {0x0000b114, 0x02050710},
7821 - {0x0000b118, 0x02050711},
7822 - {0x0000b11c, 0x02050712},
7823 - {0x0000b120, 0x02050713},
7824 - {0x0000b124, 0x02050714},
7825 - {0x0000b128, 0x02050715},
7826 - {0x0000b12c, 0x02050730},
7827 - {0x0000b130, 0x02050731},
7828 - {0x0000b134, 0x02050732},
7829 - {0x0000b138, 0x02050733},
7830 - {0x0000b13c, 0x02050734},
7831 - {0x0000b140, 0x02050735},
7832 - {0x0000b144, 0x02050750},
7833 - {0x0000b148, 0x02050751},
7834 - {0x0000b14c, 0x02050752},
7835 - {0x0000b150, 0x02050753},
7836 - {0x0000b154, 0x02050754},
7837 - {0x0000b158, 0x02050755},
7838 - {0x0000b15c, 0x02050770},
7839 - {0x0000b160, 0x02050771},
7840 - {0x0000b164, 0x02050772},
7841 - {0x0000b168, 0x02050773},
7842 - {0x0000b16c, 0x02050774},
7843 - {0x0000b170, 0x02050775},
7844 - {0x0000b174, 0x00000776},
7845 - {0x0000b178, 0x00000776},
7846 - {0x0000b17c, 0x00000776},
7847 - {0x0000b180, 0x00000776},
7848 - {0x0000b184, 0x00000776},
7849 - {0x0000b188, 0x00000776},
7850 - {0x0000b18c, 0x00000776},
7851 - {0x0000b190, 0x00000776},
7852 - {0x0000b194, 0x00000776},
7853 - {0x0000b198, 0x00000776},
7854 - {0x0000b19c, 0x00000776},
7855 - {0x0000b1a0, 0x00000776},
7856 - {0x0000b1a4, 0x00000776},
7857 - {0x0000b1a8, 0x00000776},
7858 - {0x0000b1ac, 0x00000776},
7859 - {0x0000b1b0, 0x00000776},
7860 - {0x0000b1b4, 0x00000776},
7861 - {0x0000b1b8, 0x00000776},
7862 - {0x0000b1bc, 0x00000776},
7863 - {0x0000b1c0, 0x00000776},
7864 - {0x0000b1c4, 0x00000776},
7865 - {0x0000b1c8, 0x00000776},
7866 - {0x0000b1cc, 0x00000776},
7867 - {0x0000b1d0, 0x00000776},
7868 - {0x0000b1d4, 0x00000776},
7869 - {0x0000b1d8, 0x00000776},
7870 - {0x0000b1dc, 0x00000776},
7871 - {0x0000b1e0, 0x00000776},
7872 - {0x0000b1e4, 0x00000776},
7873 - {0x0000b1e8, 0x00000776},
7874 - {0x0000b1ec, 0x00000776},
7875 - {0x0000b1f0, 0x00000776},
7876 - {0x0000b1f4, 0x00000776},
7877 - {0x0000b1f8, 0x00000776},
7878 - {0x0000b1fc, 0x00000776},
7881 -static const u32 ar9200_ar9280_2p0_radio_core[][2] = {
7882 - /* Addr allmodes */
7883 - {0x00007800, 0x00040000},
7884 - {0x00007804, 0xdb005012},
7885 - {0x00007808, 0x04924914},
7886 - {0x0000780c, 0x21084210},
7887 - {0x00007810, 0x6d801300},
7888 - {0x00007814, 0x0019beff},
7889 - {0x00007818, 0x07e41000},
7890 - {0x0000781c, 0x00392000},
7891 - {0x00007820, 0x92592480},
7892 - {0x00007824, 0x00040000},
7893 - {0x00007828, 0xdb005012},
7894 - {0x0000782c, 0x04924914},
7895 - {0x00007830, 0x21084210},
7896 - {0x00007834, 0x6d801300},
7897 - {0x00007838, 0x0019beff},
7898 - {0x0000783c, 0x07e40000},
7899 - {0x00007840, 0x00392000},
7900 - {0x00007844, 0x92592480},
7901 - {0x00007848, 0x00100000},
7902 - {0x0000784c, 0x773f0567},
7903 - {0x00007850, 0x54214514},
7904 - {0x00007854, 0x12035828},
7905 - {0x00007858, 0x92592692},
7906 - {0x0000785c, 0x00000000},
7907 - {0x00007860, 0x56400000},
7908 - {0x00007864, 0x0a8e370e},
7909 - {0x00007868, 0xc0102850},
7910 - {0x0000786c, 0x812d4000},
7911 - {0x00007870, 0x807ec400},
7912 - {0x00007874, 0x001b6db0},
7913 - {0x00007878, 0x00376b63},
7914 - {0x0000787c, 0x06db6db6},
7915 - {0x00007880, 0x006d8000},
7916 - {0x00007884, 0xffeffffe},
7917 - {0x00007888, 0xffeffffe},
7918 - {0x0000788c, 0x00010000},
7919 - {0x00007890, 0x02060aeb},
7920 - {0x00007894, 0x5a108000},
7923 -static const u32 ar9480_2p0_mac_postamble_emulation[][5] = {
7924 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
7925 - {0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8},
7926 - {0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017},
7929 -static const u32 ar9480_2p0_radio_postamble_sys3ant[][5] = {
7930 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
7931 - {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808},
7932 - {0x00016140, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
7933 - {0x00016540, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
7936 -static const u32 ar9480_2p0_baseband_postamble_emulation[][5] = {
7937 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
7938 - {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
7939 - {0x00009e3c, 0xcf946221, 0xcf946221, 0xcf946221, 0xcf946221},
7940 - {0x00009e44, 0xfc5c0000, 0xfc5c0000, 0xfc5c0000, 0xfc5c0000},
7941 - {0x0000a258, 0x02020200, 0x02020200, 0x02020200, 0x02020200},
7942 - {0x0000a25c, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
7943 - {0x0000a28c, 0x00011111, 0x00011111, 0x00011111, 0x00011111},
7944 - {0x0000a2c4, 0x00148d18, 0x00148d18, 0x00148d20, 0x00148d20},
7945 - {0x0000a2d8, 0xf999a800, 0xf999a800, 0xf999a80c, 0xf999a80c},
7946 - {0x0000a50c, 0x0000c00a, 0x0000c00a, 0x0000c00a, 0x0000c00a},
7947 - {0x0000a538, 0x00038e8c, 0x00038e8c, 0x00038e8c, 0x00038e8c},
7948 - {0x0000a53c, 0x0003cecc, 0x0003cecc, 0x0003cecc, 0x0003cecc},
7949 - {0x0000a540, 0x00040ed4, 0x00040ed4, 0x00040ed4, 0x00040ed4},
7950 - {0x0000a544, 0x00044edc, 0x00044edc, 0x00044edc, 0x00044edc},
7951 - {0x0000a548, 0x00048ede, 0x00048ede, 0x00048ede, 0x00048ede},
7952 - {0x0000a54c, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e},
7953 - {0x0000a550, 0x00050f5e, 0x00050f5e, 0x00050f5e, 0x00050f5e},
7954 - {0x0000a554, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e},
7955 - {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
7958 -static const u32 ar9480_2p0_radio_postamble_sys2ant[][5] = {
7959 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
7960 - {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808},
7961 - {0x00016140, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
7962 - {0x00016540, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
7965 -static const u32 ar9480_common_wo_xlna_rx_gain_table_2p0[][2] = {
7966 - /* Addr allmodes */
7967 - {0x0000a000, 0x00010000},
7968 - {0x0000a004, 0x00030002},
7969 - {0x0000a008, 0x00050004},
7970 - {0x0000a00c, 0x00810080},
7971 - {0x0000a010, 0x00830082},
7972 - {0x0000a014, 0x01810180},
7973 - {0x0000a018, 0x01830182},
7974 - {0x0000a01c, 0x01850184},
7975 - {0x0000a020, 0x01890188},
7976 - {0x0000a024, 0x018b018a},
7977 - {0x0000a028, 0x018d018c},
7978 - {0x0000a02c, 0x03820190},
7979 - {0x0000a030, 0x03840383},
7980 - {0x0000a034, 0x03880385},
7981 - {0x0000a038, 0x038a0389},
7982 - {0x0000a03c, 0x038c038b},
7983 - {0x0000a040, 0x0390038d},
7984 - {0x0000a044, 0x03920391},
7985 - {0x0000a048, 0x03940393},
7986 - {0x0000a04c, 0x03960395},
7987 - {0x0000a050, 0x00000000},
7988 - {0x0000a054, 0x00000000},
7989 - {0x0000a058, 0x00000000},
7990 - {0x0000a05c, 0x00000000},
7991 - {0x0000a060, 0x00000000},
7992 - {0x0000a064, 0x00000000},
7993 - {0x0000a068, 0x00000000},
7994 - {0x0000a06c, 0x00000000},
7995 - {0x0000a070, 0x00000000},
7996 - {0x0000a074, 0x00000000},
7997 - {0x0000a078, 0x00000000},
7998 - {0x0000a07c, 0x00000000},
7999 - {0x0000a080, 0x29292929},
8000 - {0x0000a084, 0x29292929},
8001 - {0x0000a088, 0x29292929},
8002 - {0x0000a08c, 0x29292929},
8003 - {0x0000a090, 0x22292929},
8004 - {0x0000a094, 0x1d1d2222},
8005 - {0x0000a098, 0x0c111117},
8006 - {0x0000a09c, 0x00030303},
8007 - {0x0000a0a0, 0x00000000},
8008 - {0x0000a0a4, 0x00000000},
8009 - {0x0000a0a8, 0x00000000},
8010 - {0x0000a0ac, 0x00000000},
8011 - {0x0000a0b0, 0x00000000},
8012 - {0x0000a0b4, 0x00000000},
8013 - {0x0000a0b8, 0x00000000},
8014 - {0x0000a0bc, 0x00000000},
8015 - {0x0000a0c0, 0x001f0000},
8016 - {0x0000a0c4, 0x01000101},
8017 - {0x0000a0c8, 0x011e011f},
8018 - {0x0000a0cc, 0x011c011d},
8019 - {0x0000a0d0, 0x02030204},
8020 - {0x0000a0d4, 0x02010202},
8021 - {0x0000a0d8, 0x021f0200},
8022 - {0x0000a0dc, 0x0302021e},
8023 - {0x0000a0e0, 0x03000301},
8024 - {0x0000a0e4, 0x031e031f},
8025 - {0x0000a0e8, 0x0402031d},
8026 - {0x0000a0ec, 0x04000401},
8027 - {0x0000a0f0, 0x041e041f},
8028 - {0x0000a0f4, 0x0502041d},
8029 - {0x0000a0f8, 0x05000501},
8030 - {0x0000a0fc, 0x051e051f},
8031 - {0x0000a100, 0x06010602},
8032 - {0x0000a104, 0x061f0600},
8033 - {0x0000a108, 0x061d061e},
8034 - {0x0000a10c, 0x07020703},
8035 - {0x0000a110, 0x07000701},
8036 - {0x0000a114, 0x00000000},
8037 - {0x0000a118, 0x00000000},
8038 - {0x0000a11c, 0x00000000},
8039 - {0x0000a120, 0x00000000},
8040 - {0x0000a124, 0x00000000},
8041 - {0x0000a128, 0x00000000},
8042 - {0x0000a12c, 0x00000000},
8043 - {0x0000a130, 0x00000000},
8044 - {0x0000a134, 0x00000000},
8045 - {0x0000a138, 0x00000000},
8046 - {0x0000a13c, 0x00000000},
8047 - {0x0000a140, 0x001f0000},
8048 - {0x0000a144, 0x01000101},
8049 - {0x0000a148, 0x011e011f},
8050 - {0x0000a14c, 0x011c011d},
8051 - {0x0000a150, 0x02030204},
8052 - {0x0000a154, 0x02010202},
8053 - {0x0000a158, 0x021f0200},
8054 - {0x0000a15c, 0x0302021e},
8055 - {0x0000a160, 0x03000301},
8056 - {0x0000a164, 0x031e031f},
8057 - {0x0000a168, 0x0402031d},
8058 - {0x0000a16c, 0x04000401},
8059 - {0x0000a170, 0x041e041f},
8060 - {0x0000a174, 0x0502041d},
8061 - {0x0000a178, 0x05000501},
8062 - {0x0000a17c, 0x051e051f},
8063 - {0x0000a180, 0x06010602},
8064 - {0x0000a184, 0x061f0600},
8065 - {0x0000a188, 0x061d061e},
8066 - {0x0000a18c, 0x07020703},
8067 - {0x0000a190, 0x07000701},
8068 - {0x0000a194, 0x00000000},
8069 - {0x0000a198, 0x00000000},
8070 - {0x0000a19c, 0x00000000},
8071 - {0x0000a1a0, 0x00000000},
8072 - {0x0000a1a4, 0x00000000},
8073 - {0x0000a1a8, 0x00000000},
8074 - {0x0000a1ac, 0x00000000},
8075 - {0x0000a1b0, 0x00000000},
8076 - {0x0000a1b4, 0x00000000},
8077 - {0x0000a1b8, 0x00000000},
8078 - {0x0000a1bc, 0x00000000},
8079 - {0x0000a1c0, 0x00000000},
8080 - {0x0000a1c4, 0x00000000},
8081 - {0x0000a1c8, 0x00000000},
8082 - {0x0000a1cc, 0x00000000},
8083 - {0x0000a1d0, 0x00000000},
8084 - {0x0000a1d4, 0x00000000},
8085 - {0x0000a1d8, 0x00000000},
8086 - {0x0000a1dc, 0x00000000},
8087 - {0x0000a1e0, 0x00000000},
8088 - {0x0000a1e4, 0x00000000},
8089 - {0x0000a1e8, 0x00000000},
8090 - {0x0000a1ec, 0x00000000},
8091 - {0x0000a1f0, 0x00000396},
8092 - {0x0000a1f4, 0x00000396},
8093 - {0x0000a1f8, 0x00000396},
8094 - {0x0000a1fc, 0x00000196},
8095 - {0x0000b000, 0x00010000},
8096 - {0x0000b004, 0x00030002},
8097 - {0x0000b008, 0x00050004},
8098 - {0x0000b00c, 0x00810080},
8099 - {0x0000b010, 0x00830082},
8100 - {0x0000b014, 0x01810180},
8101 - {0x0000b018, 0x01830182},
8102 - {0x0000b01c, 0x01850184},
8103 - {0x0000b020, 0x02810280},
8104 - {0x0000b024, 0x02830282},
8105 - {0x0000b028, 0x02850284},
8106 - {0x0000b02c, 0x02890288},
8107 - {0x0000b030, 0x028b028a},
8108 - {0x0000b034, 0x0388028c},
8109 - {0x0000b038, 0x038a0389},
8110 - {0x0000b03c, 0x038c038b},
8111 - {0x0000b040, 0x0390038d},
8112 - {0x0000b044, 0x03920391},
8113 - {0x0000b048, 0x03940393},
8114 - {0x0000b04c, 0x03960395},
8115 - {0x0000b050, 0x00000000},
8116 - {0x0000b054, 0x00000000},
8117 - {0x0000b058, 0x00000000},
8118 - {0x0000b05c, 0x00000000},
8119 - {0x0000b060, 0x00000000},
8120 - {0x0000b064, 0x00000000},
8121 - {0x0000b068, 0x00000000},
8122 - {0x0000b06c, 0x00000000},
8123 - {0x0000b070, 0x00000000},
8124 - {0x0000b074, 0x00000000},
8125 - {0x0000b078, 0x00000000},
8126 - {0x0000b07c, 0x00000000},
8127 - {0x0000b080, 0x32323232},
8128 - {0x0000b084, 0x2f2f3232},
8129 - {0x0000b088, 0x23282a2d},
8130 - {0x0000b08c, 0x1c1e2123},
8131 - {0x0000b090, 0x14171919},
8132 - {0x0000b094, 0x0e0e1214},
8133 - {0x0000b098, 0x03050707},
8134 - {0x0000b09c, 0x00030303},
8135 - {0x0000b0a0, 0x00000000},
8136 - {0x0000b0a4, 0x00000000},
8137 - {0x0000b0a8, 0x00000000},
8138 - {0x0000b0ac, 0x00000000},
8139 - {0x0000b0b0, 0x00000000},
8140 - {0x0000b0b4, 0x00000000},
8141 - {0x0000b0b8, 0x00000000},
8142 - {0x0000b0bc, 0x00000000},
8143 - {0x0000b0c0, 0x003f0020},
8144 - {0x0000b0c4, 0x00400041},
8145 - {0x0000b0c8, 0x0140005f},
8146 - {0x0000b0cc, 0x0160015f},
8147 - {0x0000b0d0, 0x017e017f},
8148 - {0x0000b0d4, 0x02410242},
8149 - {0x0000b0d8, 0x025f0240},
8150 - {0x0000b0dc, 0x027f0260},
8151 - {0x0000b0e0, 0x0341027e},
8152 - {0x0000b0e4, 0x035f0340},
8153 - {0x0000b0e8, 0x037f0360},
8154 - {0x0000b0ec, 0x04400441},
8155 - {0x0000b0f0, 0x0460045f},
8156 - {0x0000b0f4, 0x0541047f},
8157 - {0x0000b0f8, 0x055f0540},
8158 - {0x0000b0fc, 0x057f0560},
8159 - {0x0000b100, 0x06400641},
8160 - {0x0000b104, 0x0660065f},
8161 - {0x0000b108, 0x067e067f},
8162 - {0x0000b10c, 0x07410742},
8163 - {0x0000b110, 0x075f0740},
8164 - {0x0000b114, 0x077f0760},
8165 - {0x0000b118, 0x07800781},
8166 - {0x0000b11c, 0x07a0079f},
8167 - {0x0000b120, 0x07c107bf},
8168 - {0x0000b124, 0x000007c0},
8169 - {0x0000b128, 0x00000000},
8170 - {0x0000b12c, 0x00000000},
8171 - {0x0000b130, 0x00000000},
8172 - {0x0000b134, 0x00000000},
8173 - {0x0000b138, 0x00000000},
8174 - {0x0000b13c, 0x00000000},
8175 - {0x0000b140, 0x003f0020},
8176 - {0x0000b144, 0x00400041},
8177 - {0x0000b148, 0x0140005f},
8178 - {0x0000b14c, 0x0160015f},
8179 - {0x0000b150, 0x017e017f},
8180 - {0x0000b154, 0x02410242},
8181 - {0x0000b158, 0x025f0240},
8182 - {0x0000b15c, 0x027f0260},
8183 - {0x0000b160, 0x0341027e},
8184 - {0x0000b164, 0x035f0340},
8185 - {0x0000b168, 0x037f0360},
8186 - {0x0000b16c, 0x04400441},
8187 - {0x0000b170, 0x0460045f},
8188 - {0x0000b174, 0x0541047f},
8189 - {0x0000b178, 0x055f0540},
8190 - {0x0000b17c, 0x057f0560},
8191 - {0x0000b180, 0x06400641},
8192 - {0x0000b184, 0x0660065f},
8193 - {0x0000b188, 0x067e067f},
8194 - {0x0000b18c, 0x07410742},
8195 - {0x0000b190, 0x075f0740},
8196 - {0x0000b194, 0x077f0760},
8197 - {0x0000b198, 0x07800781},
8198 - {0x0000b19c, 0x07a0079f},
8199 - {0x0000b1a0, 0x07c107bf},
8200 - {0x0000b1a4, 0x000007c0},
8201 - {0x0000b1a8, 0x00000000},
8202 - {0x0000b1ac, 0x00000000},
8203 - {0x0000b1b0, 0x00000000},
8204 - {0x0000b1b4, 0x00000000},
8205 - {0x0000b1b8, 0x00000000},
8206 - {0x0000b1bc, 0x00000000},
8207 - {0x0000b1c0, 0x00000000},
8208 - {0x0000b1c4, 0x00000000},
8209 - {0x0000b1c8, 0x00000000},
8210 - {0x0000b1cc, 0x00000000},
8211 - {0x0000b1d0, 0x00000000},
8212 - {0x0000b1d4, 0x00000000},
8213 - {0x0000b1d8, 0x00000000},
8214 - {0x0000b1dc, 0x00000000},
8215 - {0x0000b1e0, 0x00000000},
8216 - {0x0000b1e4, 0x00000000},
8217 - {0x0000b1e8, 0x00000000},
8218 - {0x0000b1ec, 0x00000000},
8219 - {0x0000b1f0, 0x00000396},
8220 - {0x0000b1f4, 0x00000396},
8221 - {0x0000b1f8, 0x00000396},
8222 - {0x0000b1fc, 0x00000196},
8225 -static const u32 ar9480_2p0_baseband_core_txfir_coeff_japan_2484[][2] = {
8226 - /* Addr allmodes */
8227 - {0x0000a398, 0x00000000},
8228 - {0x0000a39c, 0x6f7f0301},
8229 - {0x0000a3a0, 0xca9228ee},
8232 -static const u32 ar9480_modes_low_ob_db_tx_gain_table_2p0[][5] = {
8233 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
8234 - {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002},
8235 - {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
8236 - {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
8237 - {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
8238 - {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
8239 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
8240 - {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8241 - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8242 - {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
8243 - {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
8244 - {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
8245 - {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
8246 - {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
8247 - {0x0000a518, 0x21020220, 0x21020220, 0x16000402, 0x16000402},
8248 - {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404},
8249 - {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
8250 - {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
8251 - {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
8252 - {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
8253 - {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
8254 - {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
8255 - {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
8256 - {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
8257 - {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
8258 - {0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861},
8259 - {0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81},
8260 - {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x47001a83, 0x47001a83},
8261 - {0x0000a550, 0x61042a6c, 0x61042a6c, 0x4a001c84, 0x4a001c84},
8262 - {0x0000a554, 0x66062a6c, 0x66062a6c, 0x4e001ce3, 0x4e001ce3},
8263 - {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x52001ce5, 0x52001ce5},
8264 - {0x0000a55c, 0x7006308c, 0x7006308c, 0x56001ce9, 0x56001ce9},
8265 - {0x0000a560, 0x730a308a, 0x730a308a, 0x5a001ceb, 0x5a001ceb},
8266 - {0x0000a564, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8267 - {0x0000a568, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8268 - {0x0000a56c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8269 - {0x0000a570, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8270 - {0x0000a574, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8271 - {0x0000a578, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8272 - {0x0000a57c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
8273 - {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8274 - {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8275 - {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8276 - {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8277 - {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8278 - {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
8279 - {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
8280 - {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
8281 - {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
8282 - {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
8283 - {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
8284 - {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
8285 - {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
8286 - {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
8287 - {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
8288 - {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
8289 - {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
8290 - {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
8291 - {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
8292 - {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
8293 - {0x00016044, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
8294 - {0x00016048, 0x64992060, 0x64992060, 0x64992060, 0x64992060},
8295 - {0x00016054, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
8296 - {0x00016444, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4},
8297 - {0x00016448, 0x64992000, 0x64992000, 0x64992000, 0x64992000},
8298 - {0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
8301 -static const u32 ar9480_2p0_soc_postamble[][5] = {
8302 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
8303 - {0x00007010, 0x00002233, 0x00002233, 0x00002233, 0x00002233},
8306 -static const u32 ar9480_2p0_baseband_core[][2] = {
8307 - /* Addr allmodes */
8308 - {0x00009800, 0xafe68e30},
8309 - {0x00009804, 0xfd14e000},
8310 - {0x00009808, 0x9c0a9f6b},
8311 - {0x0000980c, 0x04900000},
8312 - {0x00009814, 0x9280c00a},
8313 - {0x00009818, 0x00000000},
8314 - {0x0000981c, 0x00020028},
8315 - {0x00009834, 0x6400a290},
8316 - {0x00009838, 0x0108ecff},
8317 - {0x0000983c, 0x0d000600},
8318 - {0x00009880, 0x201fff00},
8319 - {0x00009884, 0x00001042},
8320 - {0x000098a4, 0x00200400},
8321 - {0x000098b0, 0x32440bbe},
8322 - {0x000098d0, 0x004b6a8e},
8323 - {0x000098d4, 0x00000820},
8324 - {0x000098dc, 0x00000000},
8325 - {0x000098e4, 0x01ffffff},
8326 - {0x000098e8, 0x01ffffff},
8327 - {0x000098ec, 0x01ffffff},
8328 - {0x000098f0, 0x00000000},
8329 - {0x000098f4, 0x00000000},
8330 - {0x00009bf0, 0x80000000},
8331 - {0x00009c04, 0xff55ff55},
8332 - {0x00009c08, 0x0320ff55},
8333 - {0x00009c0c, 0x00000000},
8334 - {0x00009c10, 0x00000000},
8335 - {0x00009c14, 0x00046384},
8336 - {0x00009c18, 0x05b6b440},
8337 - {0x00009c1c, 0x00b6b440},
8338 - {0x00009d00, 0xc080a333},
8339 - {0x00009d04, 0x40206c10},
8340 - {0x00009d08, 0x009c4060},
8341 - {0x00009d0c, 0x9883800a},
8342 - {0x00009d10, 0x01834061},
8343 - {0x00009d14, 0x00c0040b},
8344 - {0x00009d18, 0x00000000},
8345 - {0x00009e08, 0x0038230c},
8346 - {0x00009e24, 0x990bb515},
8347 - {0x00009e28, 0x0c6f0000},
8348 - {0x00009e30, 0x06336f77},
8349 - {0x00009e34, 0x6af6532f},
8350 - {0x00009e38, 0x0cc80c00},
8351 - {0x00009e40, 0x0d261820},
8352 - {0x00009e4c, 0x00001004},
8353 - {0x00009e50, 0x00ff03f1},
8354 - {0x00009e54, 0xe4c355c7},
8355 - {0x00009e58, 0xfd897735},
8356 - {0x00009e5c, 0xe9198724},
8357 - {0x00009fc0, 0x803e4788},
8358 - {0x00009fc4, 0x0001efb5},
8359 - {0x00009fcc, 0x40000014},
8360 - {0x00009fd0, 0x01193b93},
8361 - {0x0000a20c, 0x00000000},
8362 - {0x0000a220, 0x00000000},
8363 - {0x0000a224, 0x00000000},
8364 - {0x0000a228, 0x10002310},
8365 - {0x0000a23c, 0x00000000},
8366 - {0x0000a244, 0x0c000000},
8367 - {0x0000a2a0, 0x00000001},
8368 - {0x0000a2c0, 0x00000001},
8369 - {0x0000a2c8, 0x00000000},
8370 - {0x0000a2cc, 0x18c43433},
8371 - {0x0000a2d4, 0x00000000},
8372 - {0x0000a2ec, 0x00000000},
8373 - {0x0000a2f0, 0x00000000},
8374 - {0x0000a2f4, 0x00000000},
8375 - {0x0000a2f8, 0x00000000},
8376 - {0x0000a344, 0x00000000},
8377 - {0x0000a34c, 0x00000000},
8378 - {0x0000a350, 0x0000a000},
8379 - {0x0000a364, 0x00000000},
8380 - {0x0000a370, 0x00000000},
8381 - {0x0000a390, 0x00000001},
8382 - {0x0000a394, 0x00000444},
8383 - {0x0000a398, 0x001f0e0f},
8384 - {0x0000a39c, 0x0075393f},
8385 - {0x0000a3a0, 0xb79f6427},
8386 - {0x0000a3a4, 0x00000000},
8387 - {0x0000a3a8, 0xaaaaaaaa},
8388 - {0x0000a3ac, 0x3c466478},
8389 - {0x0000a3c0, 0x20202020},
8390 - {0x0000a3c4, 0x22222220},
8391 - {0x0000a3c8, 0x20200020},
8392 - {0x0000a3cc, 0x20202020},
8393 - {0x0000a3d0, 0x20202020},
8394 - {0x0000a3d4, 0x20202020},
8395 - {0x0000a3d8, 0x20202020},
8396 - {0x0000a3dc, 0x20202020},
8397 - {0x0000a3e0, 0x20202020},
8398 - {0x0000a3e4, 0x20202020},
8399 - {0x0000a3e8, 0x20202020},
8400 - {0x0000a3ec, 0x20202020},
8401 - {0x0000a3f0, 0x00000000},
8402 - {0x0000a3f4, 0x00000006},
8403 - {0x0000a3f8, 0x0c9bd380},
8404 - {0x0000a3fc, 0x000f0f01},
8405 - {0x0000a400, 0x8fa91f01},
8406 - {0x0000a404, 0x00000000},
8407 - {0x0000a408, 0x0e79e5c6},
8408 - {0x0000a40c, 0x00820820},
8409 - {0x0000a414, 0x1ce739ce},
8410 - {0x0000a418, 0x2d001dce},
8411 - {0x0000a41c, 0x1ce739ce},
8412 - {0x0000a420, 0x000001ce},
8413 - {0x0000a424, 0x1ce739ce},
8414 - {0x0000a428, 0x000001ce},
8415 - {0x0000a42c, 0x1ce739ce},
8416 - {0x0000a430, 0x1ce739ce},
8417 - {0x0000a434, 0x00000000},
8418 - {0x0000a438, 0x00001801},
8419 - {0x0000a43c, 0x00100000},
8420 - {0x0000a444, 0x00000000},
8421 - {0x0000a448, 0x05000080},
8422 - {0x0000a44c, 0x00000001},
8423 - {0x0000a450, 0x00010000},
8424 - {0x0000a454, 0x07000000},
8425 - {0x0000a644, 0xbfad9d74},
8426 - {0x0000a648, 0x0048060a},
8427 - {0x0000a64c, 0x00002037},
8428 - {0x0000a670, 0x03020100},
8429 - {0x0000a674, 0x09080504},
8430 - {0x0000a678, 0x0d0c0b0a},
8431 - {0x0000a67c, 0x13121110},
8432 - {0x0000a680, 0x31301514},
8433 - {0x0000a684, 0x35343332},
8434 - {0x0000a688, 0x00000036},
8435 - {0x0000a690, 0x00000838},
8436 - {0x0000a6b0, 0x0000000a},
8437 - {0x0000a6b4, 0x00512c01},
8438 - {0x0000a7c0, 0x00000000},
8439 - {0x0000a7c4, 0xfffffffc},
8440 - {0x0000a7c8, 0x00000000},
8441 - {0x0000a7cc, 0x00000000},
8442 - {0x0000a7d0, 0x00000000},
8443 - {0x0000a7d4, 0x00000004},
8444 - {0x0000a7dc, 0x00000001},
8445 - {0x0000a7f0, 0x80000000},
8446 - {0x0000a8d0, 0x004b6a8e},
8447 - {0x0000a8d4, 0x00000820},
8448 - {0x0000a8dc, 0x00000000},
8449 - {0x0000a8f0, 0x00000000},
8450 - {0x0000a8f4, 0x00000000},
8451 - {0x0000abf0, 0x80000000},
8452 - {0x0000b2d0, 0x00000080},
8453 - {0x0000b2d4, 0x00000000},
8454 - {0x0000b2ec, 0x00000000},
8455 - {0x0000b2f0, 0x00000000},
8456 - {0x0000b2f4, 0x00000000},
8457 - {0x0000b2f8, 0x00000000},
8458 - {0x0000b408, 0x0e79e5c0},
8459 - {0x0000b40c, 0x00820820},
8460 - {0x0000b420, 0x00000000},
8461 - {0x0000b6b0, 0x0000000a},
8462 - {0x0000b6b4, 0x00000001},
8465 -static const u32 ar9480_2p0_radio_postamble[][5] = {
8466 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
8467 - {0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524},
8468 - {0x000160b0, 0x01d67f70, 0x01d67f70, 0x01d67f70, 0x01d67f70},
8469 - {0x0001610c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
8470 - {0x0001650c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
8473 -static const u32 ar9480_modes_high_ob_db_tx_gain_table_2p0[][5] = {
8474 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
8475 - {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002},
8476 - {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
8477 - {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
8478 - {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
8479 - {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
8480 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
8481 - {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8482 - {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
8483 - {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002},
8484 - {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
8485 - {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
8486 - {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
8487 - {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
8488 - {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
8489 - {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
8490 - {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
8491 - {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
8492 - {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
8493 - {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
8494 - {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20},
8495 - {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22},
8496 - {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24},
8497 - {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640},
8498 - {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660},
8499 - {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861},
8500 - {0x0000a548, 0x53025eb2, 0x53025eb2, 0x3e001a81, 0x3e001a81},
8501 - {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
8502 - {0x0000a550, 0x5f025ef6, 0x5f025ef6, 0x44001c84, 0x44001c84},
8503 - {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3},
8504 - {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5},
8505 - {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9},
8506 - {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb},
8507 - {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8508 - {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8509 - {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8510 - {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8511 - {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8512 - {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8513 - {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
8514 - {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8515 - {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8516 - {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8517 - {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8518 - {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
8519 - {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
8520 - {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
8521 - {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
8522 - {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
8523 - {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
8524 - {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
8525 - {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
8526 - {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
8527 - {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
8528 - {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
8529 - {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
8530 - {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
8531 - {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
8532 - {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
8533 - {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
8534 - {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
8535 - {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060},
8536 - {0x00016054, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
8537 - {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
8538 - {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
8539 - {0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
8542 -static const u32 ar9480_2p0_radio_core[][2] = {
8543 - /* Addr allmodes */
8544 - {0x00016000, 0x36db6db6},
8545 - {0x00016004, 0x6db6db40},
8546 - {0x00016008, 0x73f00000},
8547 - {0x0001600c, 0x00000000},
8548 - {0x00016010, 0x6d820001},
8549 - {0x00016040, 0x7f80fff8},
8550 - {0x0001604c, 0x2699e04f},
8551 - {0x00016050, 0x6db6db6c},
8552 - {0x00016058, 0x6c200000},
8553 - {0x00016080, 0x00040000},
8554 - {0x00016084, 0x9a68048c},
8555 - {0x00016088, 0x54214514},
8556 - {0x0001608c, 0x1203040b},
8557 - {0x00016090, 0x24926490},
8558 - {0x00016098, 0xd2888888},
8559 - {0x000160a0, 0x0a108ffe},
8560 - {0x000160a4, 0x812fc491},
8561 - {0x000160a8, 0x423c8000},
8562 - {0x000160b4, 0x92000000},
8563 - {0x000160b8, 0x0285dddc},
8564 - {0x000160bc, 0x02908888},
8565 - {0x000160c0, 0x00adb6d0},
8566 - {0x000160c4, 0x6db6db60},
8567 - {0x000160c8, 0x6db6db6c},
8568 - {0x000160cc, 0x0de6c1b0},
8569 - {0x00016100, 0x3fffbe04},
8570 - {0x00016104, 0xfff80000},
8571 - {0x00016108, 0x00200400},
8572 - {0x00016110, 0x00000000},
8573 - {0x00016144, 0x02084080},
8574 - {0x00016148, 0x000080c0},
8575 - {0x00016280, 0x050a0001},
8576 - {0x00016284, 0x3d841400},
8577 - {0x00016288, 0x00000000},
8578 - {0x0001628c, 0xe3000000},
8579 - {0x00016290, 0xa1005080},
8580 - {0x00016294, 0x00000020},
8581 - {0x00016298, 0x54a82900},
8582 - {0x00016340, 0x121e4276},
8583 - {0x00016344, 0x00300000},
8584 - {0x00016400, 0x36db6db6},
8585 - {0x00016404, 0x6db6db40},
8586 - {0x00016408, 0x73f00000},
8587 - {0x0001640c, 0x00000000},
8588 - {0x00016410, 0x6c800001},
8589 - {0x00016440, 0x7f80fff8},
8590 - {0x0001644c, 0x4699e04f},
8591 - {0x00016450, 0x6db6db6c},
8592 - {0x00016500, 0x3fffbe04},
8593 - {0x00016504, 0xfff80000},
8594 - {0x00016508, 0x00200400},
8595 - {0x00016510, 0x00000000},
8596 - {0x00016544, 0x02084080},
8597 - {0x00016548, 0x000080c0},
8600 -static const u32 ar9480_2p0_tx_gain_table_baseband_postamble_emulation[][5] = {
8601 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
8602 - {0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5},
8603 - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
8604 - {0x0000a504, 0x00004002, 0x00004002, 0x00004002, 0x00004002},
8605 - {0x0000a508, 0x00008004, 0x00008004, 0x00008004, 0x00008004},
8606 - {0x0000a510, 0x0001000c, 0x0001000c, 0x0001000c, 0x0001000c},
8607 - {0x0000a514, 0x0001420b, 0x0001420b, 0x0001420b, 0x0001420b},
8608 - {0x0000a518, 0x0001824a, 0x0001824a, 0x0001824a, 0x0001824a},
8609 - {0x0000a51c, 0x0001c44a, 0x0001c44a, 0x0001c44a, 0x0001c44a},
8610 - {0x0000a520, 0x0002064a, 0x0002064a, 0x0002064a, 0x0002064a},
8611 - {0x0000a524, 0x0002484a, 0x0002484a, 0x0002484a, 0x0002484a},
8612 - {0x0000a528, 0x00028a4a, 0x00028a4a, 0x00028a4a, 0x00028a4a},
8613 - {0x0000a52c, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a, 0x0002cc4a},
8614 - {0x0000a530, 0x00030e4a, 0x00030e4a, 0x00030e4a, 0x00030e4a},
8615 - {0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a},
8618 -static const u32 ar9480_2p0_soc_preamble[][2] = {
8619 - /* Addr allmodes */
8620 - {0x00007020, 0x00000000},
8621 - {0x00007034, 0x00000002},
8622 - {0x00007038, 0x000004c2},
8625 -static const u32 ar9480_2p0_sys2ant[][2] = {
8626 - /* Addr allmodes */
8627 - {0x00063120, 0x00801980},
8630 -static const u32 ar9480_2p0_mac_core[][2] = {
8631 - /* Addr allmodes */
8632 - {0x00000008, 0x00000000},
8633 - {0x00000030, 0x000e0085},
8634 - {0x00000034, 0x00000005},
8635 - {0x00000040, 0x00000000},
8636 - {0x00000044, 0x00000000},
8637 - {0x00000048, 0x00000008},
8638 - {0x0000004c, 0x00000010},
8639 - {0x00000050, 0x00000000},
8640 - {0x00001040, 0x002ffc0f},
8641 - {0x00001044, 0x002ffc0f},
8642 - {0x00001048, 0x002ffc0f},
8643 - {0x0000104c, 0x002ffc0f},
8644 - {0x00001050, 0x002ffc0f},
8645 - {0x00001054, 0x002ffc0f},
8646 - {0x00001058, 0x002ffc0f},
8647 - {0x0000105c, 0x002ffc0f},
8648 - {0x00001060, 0x002ffc0f},
8649 - {0x00001064, 0x002ffc0f},
8650 - {0x000010f0, 0x00000100},
8651 - {0x00001270, 0x00000000},
8652 - {0x000012b0, 0x00000000},
8653 - {0x000012f0, 0x00000000},
8654 - {0x0000143c, 0x00000000},
8655 - {0x0000147c, 0x00000000},
8656 - {0x00001810, 0x0f000003},
8657 - {0x00008000, 0x00000000},
8658 - {0x00008004, 0x00000000},
8659 - {0x00008008, 0x00000000},
8660 - {0x0000800c, 0x00000000},
8661 - {0x00008018, 0x00000000},
8662 - {0x00008020, 0x00000000},
8663 - {0x00008038, 0x00000000},
8664 - {0x0000803c, 0x00080000},
8665 - {0x00008040, 0x00000000},
8666 - {0x00008044, 0x00000000},
8667 - {0x00008048, 0x00000000},
8668 - {0x0000804c, 0xffffffff},
8669 - {0x00008050, 0xffffffff},
8670 - {0x00008054, 0x00000000},
8671 - {0x00008058, 0x00000000},
8672 - {0x0000805c, 0x000fc78f},
8673 - {0x00008060, 0x0000000f},
8674 - {0x00008064, 0x00000000},
8675 - {0x00008070, 0x00000310},
8676 - {0x00008074, 0x00000020},
8677 - {0x00008078, 0x00000000},
8678 - {0x0000809c, 0x0000000f},
8679 - {0x000080a0, 0x00000000},
8680 - {0x000080a4, 0x02ff0000},
8681 - {0x000080a8, 0x0e070605},
8682 - {0x000080ac, 0x0000000d},
8683 - {0x000080b0, 0x00000000},
8684 - {0x000080b4, 0x00000000},
8685 - {0x000080b8, 0x00000000},
8686 - {0x000080bc, 0x00000000},
8687 - {0x000080c0, 0x2a800000},
8688 - {0x000080c4, 0x06900168},
8689 - {0x000080c8, 0x13881c20},
8690 - {0x000080cc, 0x01f40000},
8691 - {0x000080d0, 0x00252500},
8692 - {0x000080d4, 0x00b00005},
8693 - {0x000080d8, 0x00400002},
8694 - {0x000080dc, 0x00000000},
8695 - {0x000080e0, 0xffffffff},
8696 - {0x000080e4, 0x0000ffff},
8697 - {0x000080e8, 0x3f3f3f3f},
8698 - {0x000080ec, 0x00000000},
8699 - {0x000080f0, 0x00000000},
8700 - {0x000080f4, 0x00000000},
8701 - {0x000080fc, 0x00020000},
8702 - {0x00008100, 0x00000000},
8703 - {0x00008108, 0x00000052},
8704 - {0x0000810c, 0x00000000},
8705 - {0x00008110, 0x00000000},
8706 - {0x00008114, 0x000007ff},
8707 - {0x00008118, 0x000000aa},
8708 - {0x0000811c, 0x00003210},
8709 - {0x00008124, 0x00000000},
8710 - {0x00008128, 0x00000000},
8711 - {0x0000812c, 0x00000000},
8712 - {0x00008130, 0x00000000},
8713 - {0x00008134, 0x00000000},
8714 - {0x00008138, 0x00000000},
8715 - {0x0000813c, 0x0000ffff},
8716 - {0x00008144, 0xffffffff},
8717 - {0x00008168, 0x00000000},
8718 - {0x0000816c, 0x00000000},
8719 - {0x00008170, 0x18486e00},
8720 - {0x00008174, 0x33332210},
8721 - {0x00008178, 0x00000000},
8722 - {0x0000817c, 0x00020000},
8723 - {0x000081c4, 0x33332210},
8724 - {0x000081c8, 0x00000000},
8725 - {0x000081cc, 0x00000000},
8726 - {0x000081d4, 0x00000000},
8727 - {0x000081ec, 0x00000000},
8728 - {0x000081f0, 0x00000000},
8729 - {0x000081f4, 0x00000000},
8730 - {0x000081f8, 0x00000000},
8731 - {0x000081fc, 0x00000000},
8732 - {0x00008240, 0x00100000},
8733 - {0x00008244, 0x0010f400},
8734 - {0x00008248, 0x00000800},
8735 - {0x0000824c, 0x0001e800},
8736 - {0x00008250, 0x00000000},
8737 - {0x00008254, 0x00000000},
8738 - {0x00008258, 0x00000000},
8739 - {0x0000825c, 0x40000000},
8740 - {0x00008260, 0x00080922},
8741 - {0x00008264, 0x99c00010},
8742 - {0x00008268, 0xffffffff},
8743 - {0x0000826c, 0x0000ffff},
8744 - {0x00008270, 0x00000000},
8745 - {0x00008274, 0x40000000},
8746 - {0x00008278, 0x003e4180},
8747 - {0x0000827c, 0x00000004},
8748 - {0x00008284, 0x0000002c},
8749 - {0x00008288, 0x0000002c},
8750 - {0x0000828c, 0x000000ff},
8751 - {0x00008294, 0x00000000},
8752 - {0x00008298, 0x00000000},
8753 - {0x0000829c, 0x00000000},
8754 - {0x00008300, 0x00000140},
8755 - {0x00008314, 0x00000000},
8756 - {0x0000831c, 0x0000010d},
8757 - {0x00008328, 0x00000000},
8758 - {0x0000832c, 0x0000001f},
8759 - {0x00008330, 0x00000302},
8760 - {0x00008334, 0x00000700},
8761 - {0x00008338, 0xffff0000},
8762 - {0x0000833c, 0x02400000},
8763 - {0x00008340, 0x000107ff},
8764 - {0x00008344, 0xaa48105b},
8765 - {0x00008348, 0x008f0000},
8766 - {0x0000835c, 0x00000000},
8767 - {0x00008360, 0xffffffff},
8768 - {0x00008364, 0xffffffff},
8769 - {0x00008368, 0x00000000},
8770 - {0x00008370, 0x00000000},
8771 - {0x00008374, 0x000000ff},
8772 - {0x00008378, 0x00000000},
8773 - {0x0000837c, 0x00000000},
8774 - {0x00008380, 0xffffffff},
8775 - {0x00008384, 0xffffffff},
8776 - {0x00008390, 0xffffffff},
8777 - {0x00008394, 0xffffffff},
8778 - {0x00008398, 0x00000000},
8779 - {0x0000839c, 0x00000000},
8780 - {0x000083a4, 0x0000fa14},
8781 - {0x000083a8, 0x000f0c00},
8782 - {0x000083ac, 0x33332210},
8783 - {0x000083b0, 0x33332210},
8784 - {0x000083b4, 0x33332210},
8785 - {0x000083b8, 0x33332210},
8786 - {0x000083bc, 0x00000000},
8787 - {0x000083c0, 0x00000000},
8788 - {0x000083c4, 0x00000000},
8789 - {0x000083c8, 0x00000000},
8790 - {0x000083cc, 0x00000200},
8791 - {0x000083d0, 0x000301ff},
8794 -static const u32 ar9480_2p0_mac_postamble[][5] = {
8795 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
8796 - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
8797 - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
8798 - {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38},
8799 - {0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00},
8800 - {0x0000801c, 0x128d8027, 0x128d804f, 0x12e00057, 0x12e0002b},
8801 - {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810},
8802 - {0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a},
8803 - {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440},
8806 -static const u32 ar9480_common_mixed_rx_gain_table_2p0[][2] = {
8807 - /* Addr allmodes */
8808 - {0x0000a000, 0x00010000},
8809 - {0x0000a004, 0x00030002},
8810 - {0x0000a008, 0x00050004},
8811 - {0x0000a00c, 0x00810080},
8812 - {0x0000a010, 0x00830082},
8813 - {0x0000a014, 0x01810180},
8814 - {0x0000a018, 0x01830182},
8815 - {0x0000a01c, 0x01850184},
8816 - {0x0000a020, 0x01890188},
8817 - {0x0000a024, 0x018b018a},
8818 - {0x0000a028, 0x018d018c},
8819 - {0x0000a02c, 0x03820190},
8820 - {0x0000a030, 0x03840383},
8821 - {0x0000a034, 0x03880385},
8822 - {0x0000a038, 0x038a0389},
8823 - {0x0000a03c, 0x038c038b},
8824 - {0x0000a040, 0x0390038d},
8825 - {0x0000a044, 0x03920391},
8826 - {0x0000a048, 0x03940393},
8827 - {0x0000a04c, 0x03960395},
8828 - {0x0000a050, 0x00000000},
8829 - {0x0000a054, 0x00000000},
8830 - {0x0000a058, 0x00000000},
8831 - {0x0000a05c, 0x00000000},
8832 - {0x0000a060, 0x00000000},
8833 - {0x0000a064, 0x00000000},
8834 - {0x0000a068, 0x00000000},
8835 - {0x0000a06c, 0x00000000},
8836 - {0x0000a070, 0x00000000},
8837 - {0x0000a074, 0x00000000},
8838 - {0x0000a078, 0x00000000},
8839 - {0x0000a07c, 0x00000000},
8840 - {0x0000a080, 0x29292929},
8841 - {0x0000a084, 0x29292929},
8842 - {0x0000a088, 0x29292929},
8843 - {0x0000a08c, 0x29292929},
8844 - {0x0000a090, 0x22292929},
8845 - {0x0000a094, 0x1d1d2222},
8846 - {0x0000a098, 0x0c111117},
8847 - {0x0000a09c, 0x00030303},
8848 - {0x0000a0a0, 0x00000000},
8849 - {0x0000a0a4, 0x00000000},
8850 - {0x0000a0a8, 0x00000000},
8851 - {0x0000a0ac, 0x00000000},
8852 - {0x0000a0b0, 0x00000000},
8853 - {0x0000a0b4, 0x00000000},
8854 - {0x0000a0b8, 0x00000000},
8855 - {0x0000a0bc, 0x00000000},
8856 - {0x0000a0c0, 0x001f0000},
8857 - {0x0000a0c4, 0x01000101},
8858 - {0x0000a0c8, 0x011e011f},
8859 - {0x0000a0cc, 0x011c011d},
8860 - {0x0000a0d0, 0x02030204},
8861 - {0x0000a0d4, 0x02010202},
8862 - {0x0000a0d8, 0x021f0200},
8863 - {0x0000a0dc, 0x0302021e},
8864 - {0x0000a0e0, 0x03000301},
8865 - {0x0000a0e4, 0x031e031f},
8866 - {0x0000a0e8, 0x0402031d},
8867 - {0x0000a0ec, 0x04000401},
8868 - {0x0000a0f0, 0x041e041f},
8869 - {0x0000a0f4, 0x0502041d},
8870 - {0x0000a0f8, 0x05000501},
8871 - {0x0000a0fc, 0x051e051f},
8872 - {0x0000a100, 0x06010602},
8873 - {0x0000a104, 0x061f0600},
8874 - {0x0000a108, 0x061d061e},
8875 - {0x0000a10c, 0x07020703},
8876 - {0x0000a110, 0x07000701},
8877 - {0x0000a114, 0x00000000},
8878 - {0x0000a118, 0x00000000},
8879 - {0x0000a11c, 0x00000000},
8880 - {0x0000a120, 0x00000000},
8881 - {0x0000a124, 0x00000000},
8882 - {0x0000a128, 0x00000000},
8883 - {0x0000a12c, 0x00000000},
8884 - {0x0000a130, 0x00000000},
8885 - {0x0000a134, 0x00000000},
8886 - {0x0000a138, 0x00000000},
8887 - {0x0000a13c, 0x00000000},
8888 - {0x0000a140, 0x001f0000},
8889 - {0x0000a144, 0x01000101},
8890 - {0x0000a148, 0x011e011f},
8891 - {0x0000a14c, 0x011c011d},
8892 - {0x0000a150, 0x02030204},
8893 - {0x0000a154, 0x02010202},
8894 - {0x0000a158, 0x021f0200},
8895 - {0x0000a15c, 0x0302021e},
8896 - {0x0000a160, 0x03000301},
8897 - {0x0000a164, 0x031e031f},
8898 - {0x0000a168, 0x0402031d},
8899 - {0x0000a16c, 0x04000401},
8900 - {0x0000a170, 0x041e041f},
8901 - {0x0000a174, 0x0502041d},
8902 - {0x0000a178, 0x05000501},
8903 - {0x0000a17c, 0x051e051f},
8904 - {0x0000a180, 0x06010602},
8905 - {0x0000a184, 0x061f0600},
8906 - {0x0000a188, 0x061d061e},
8907 - {0x0000a18c, 0x07020703},
8908 - {0x0000a190, 0x07000701},
8909 - {0x0000a194, 0x00000000},
8910 - {0x0000a198, 0x00000000},
8911 - {0x0000a19c, 0x00000000},
8912 - {0x0000a1a0, 0x00000000},
8913 - {0x0000a1a4, 0x00000000},
8914 - {0x0000a1a8, 0x00000000},
8915 - {0x0000a1ac, 0x00000000},
8916 - {0x0000a1b0, 0x00000000},
8917 - {0x0000a1b4, 0x00000000},
8918 - {0x0000a1b8, 0x00000000},
8919 - {0x0000a1bc, 0x00000000},
8920 - {0x0000a1c0, 0x00000000},
8921 - {0x0000a1c4, 0x00000000},
8922 - {0x0000a1c8, 0x00000000},
8923 - {0x0000a1cc, 0x00000000},
8924 - {0x0000a1d0, 0x00000000},
8925 - {0x0000a1d4, 0x00000000},
8926 - {0x0000a1d8, 0x00000000},
8927 - {0x0000a1dc, 0x00000000},
8928 - {0x0000a1e0, 0x00000000},
8929 - {0x0000a1e4, 0x00000000},
8930 - {0x0000a1e8, 0x00000000},
8931 - {0x0000a1ec, 0x00000000},
8932 - {0x0000a1f0, 0x00000396},
8933 - {0x0000a1f4, 0x00000396},
8934 - {0x0000a1f8, 0x00000396},
8935 - {0x0000a1fc, 0x00000196},
8936 - {0x0000b000, 0x00010000},
8937 - {0x0000b004, 0x00030002},
8938 - {0x0000b008, 0x00050004},
8939 - {0x0000b00c, 0x00810080},
8940 - {0x0000b010, 0x00830082},
8941 - {0x0000b014, 0x01810180},
8942 - {0x0000b018, 0x01830182},
8943 - {0x0000b01c, 0x01850184},
8944 - {0x0000b020, 0x02810280},
8945 - {0x0000b024, 0x02830282},
8946 - {0x0000b028, 0x02850284},
8947 - {0x0000b02c, 0x02890288},
8948 - {0x0000b030, 0x028b028a},
8949 - {0x0000b034, 0x0388028c},
8950 - {0x0000b038, 0x038a0389},
8951 - {0x0000b03c, 0x038c038b},
8952 - {0x0000b040, 0x0390038d},
8953 - {0x0000b044, 0x03920391},
8954 - {0x0000b048, 0x03940393},
8955 - {0x0000b04c, 0x03960395},
8956 - {0x0000b050, 0x00000000},
8957 - {0x0000b054, 0x00000000},
8958 - {0x0000b058, 0x00000000},
8959 - {0x0000b05c, 0x00000000},
8960 - {0x0000b060, 0x00000000},
8961 - {0x0000b064, 0x00000000},
8962 - {0x0000b068, 0x00000000},
8963 - {0x0000b06c, 0x00000000},
8964 - {0x0000b070, 0x00000000},
8965 - {0x0000b074, 0x00000000},
8966 - {0x0000b078, 0x00000000},
8967 - {0x0000b07c, 0x00000000},
8968 - {0x0000b080, 0x2a2d2f32},
8969 - {0x0000b084, 0x21232328},
8970 - {0x0000b088, 0x19191c1e},
8971 - {0x0000b08c, 0x12141417},
8972 - {0x0000b090, 0x07070e0e},
8973 - {0x0000b094, 0x03030305},
8974 - {0x0000b098, 0x00000003},
8975 - {0x0000b09c, 0x00000000},
8976 - {0x0000b0a0, 0x00000000},
8977 - {0x0000b0a4, 0x00000000},
8978 - {0x0000b0a8, 0x00000000},
8979 - {0x0000b0ac, 0x00000000},
8980 - {0x0000b0b0, 0x00000000},
8981 - {0x0000b0b4, 0x00000000},
8982 - {0x0000b0b8, 0x00000000},
8983 - {0x0000b0bc, 0x00000000},
8984 - {0x0000b0c0, 0x003f0020},
8985 - {0x0000b0c4, 0x00400041},
8986 - {0x0000b0c8, 0x0140005f},
8987 - {0x0000b0cc, 0x0160015f},
8988 - {0x0000b0d0, 0x017e017f},
8989 - {0x0000b0d4, 0x02410242},
8990 - {0x0000b0d8, 0x025f0240},
8991 - {0x0000b0dc, 0x027f0260},
8992 - {0x0000b0e0, 0x0341027e},
8993 - {0x0000b0e4, 0x035f0340},
8994 - {0x0000b0e8, 0x037f0360},
8995 - {0x0000b0ec, 0x04400441},
8996 - {0x0000b0f0, 0x0460045f},
8997 - {0x0000b0f4, 0x0541047f},
8998 - {0x0000b0f8, 0x055f0540},
8999 - {0x0000b0fc, 0x057f0560},
9000 - {0x0000b100, 0x06400641},
9001 - {0x0000b104, 0x0660065f},
9002 - {0x0000b108, 0x067e067f},
9003 - {0x0000b10c, 0x07410742},
9004 - {0x0000b110, 0x075f0740},
9005 - {0x0000b114, 0x077f0760},
9006 - {0x0000b118, 0x07800781},
9007 - {0x0000b11c, 0x07a0079f},
9008 - {0x0000b120, 0x07c107bf},
9009 - {0x0000b124, 0x000007c0},
9010 - {0x0000b128, 0x00000000},
9011 - {0x0000b12c, 0x00000000},
9012 - {0x0000b130, 0x00000000},
9013 - {0x0000b134, 0x00000000},
9014 - {0x0000b138, 0x00000000},
9015 - {0x0000b13c, 0x00000000},
9016 - {0x0000b140, 0x003f0020},
9017 - {0x0000b144, 0x00400041},
9018 - {0x0000b148, 0x0140005f},
9019 - {0x0000b14c, 0x0160015f},
9020 - {0x0000b150, 0x017e017f},
9021 - {0x0000b154, 0x02410242},
9022 - {0x0000b158, 0x025f0240},
9023 - {0x0000b15c, 0x027f0260},
9024 - {0x0000b160, 0x0341027e},
9025 - {0x0000b164, 0x035f0340},
9026 - {0x0000b168, 0x037f0360},
9027 - {0x0000b16c, 0x04400441},
9028 - {0x0000b170, 0x0460045f},
9029 - {0x0000b174, 0x0541047f},
9030 - {0x0000b178, 0x055f0540},
9031 - {0x0000b17c, 0x057f0560},
9032 - {0x0000b180, 0x06400641},
9033 - {0x0000b184, 0x0660065f},
9034 - {0x0000b188, 0x067e067f},
9035 - {0x0000b18c, 0x07410742},
9036 - {0x0000b190, 0x075f0740},
9037 - {0x0000b194, 0x077f0760},
9038 - {0x0000b198, 0x07800781},
9039 - {0x0000b19c, 0x07a0079f},
9040 - {0x0000b1a0, 0x07c107bf},
9041 - {0x0000b1a4, 0x000007c0},
9042 - {0x0000b1a8, 0x00000000},
9043 - {0x0000b1ac, 0x00000000},
9044 - {0x0000b1b0, 0x00000000},
9045 - {0x0000b1b4, 0x00000000},
9046 - {0x0000b1b8, 0x00000000},
9047 - {0x0000b1bc, 0x00000000},
9048 - {0x0000b1c0, 0x00000000},
9049 - {0x0000b1c4, 0x00000000},
9050 - {0x0000b1c8, 0x00000000},
9051 - {0x0000b1cc, 0x00000000},
9052 - {0x0000b1d0, 0x00000000},
9053 - {0x0000b1d4, 0x00000000},
9054 - {0x0000b1d8, 0x00000000},
9055 - {0x0000b1dc, 0x00000000},
9056 - {0x0000b1e0, 0x00000000},
9057 - {0x0000b1e4, 0x00000000},
9058 - {0x0000b1e8, 0x00000000},
9059 - {0x0000b1ec, 0x00000000},
9060 - {0x0000b1f0, 0x00000396},
9061 - {0x0000b1f4, 0x00000396},
9062 - {0x0000b1f8, 0x00000396},
9063 - {0x0000b1fc, 0x00000196},
9066 -static const u32 ar9480_modes_green_ob_db_tx_gain_table_2p0[][5] = {
9067 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
9068 - {0x000098bc, 0x00000003, 0x00000003, 0x00000003, 0x00000003},
9069 - {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
9070 - {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
9071 - {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
9072 - {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
9073 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
9074 - {0x0000a458, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
9075 - {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
9076 - {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002},
9077 - {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
9078 - {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
9079 - {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
9080 - {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
9081 - {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
9082 - {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
9083 - {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
9084 - {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
9085 - {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
9086 - {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
9087 - {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20},
9088 - {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22},
9089 - {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24},
9090 - {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640},
9091 - {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660},
9092 - {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861},
9093 - {0x0000a548, 0x53025eb2, 0x53025eb2, 0x3e001a81, 0x3e001a81},
9094 - {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
9095 - {0x0000a550, 0x5f025ef6, 0x5f025ef6, 0x44001c84, 0x44001c84},
9096 - {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3},
9097 - {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5},
9098 - {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9},
9099 - {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb},
9100 - {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9101 - {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9102 - {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9103 - {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9104 - {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9105 - {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9106 - {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec},
9107 - {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
9108 - {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
9109 - {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
9110 - {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
9111 - {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
9112 - {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
9113 - {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
9114 - {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
9115 - {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
9116 - {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
9117 - {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
9118 - {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
9119 - {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
9120 - {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
9121 - {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
9122 - {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
9123 - {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
9124 - {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
9125 - {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
9126 - {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
9127 - {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
9128 - {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060},
9129 - {0x00016054, 0x6db60180, 0x6db60180, 0x6db60180, 0x6db60180},
9130 - {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4},
9131 - {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
9132 - {0x00016454, 0x6db60180, 0x6db60180, 0x6db60180, 0x6db60180},
9135 -static const u32 ar9480_2p0_BTCOEX_MAX_TXPWR_table[][2] = {
9136 - /* Addr allmodes */
9137 - {0x000018c0, 0x10101010},
9138 - {0x000018c4, 0x10101010},
9139 - {0x000018c8, 0x10101010},
9140 - {0x000018cc, 0x10101010},
9141 - {0x000018d0, 0x10101010},
9142 - {0x000018d4, 0x10101010},
9143 - {0x000018d8, 0x10101010},
9144 - {0x000018dc, 0x10101010},
9147 -static const u32 ar9480_2p0_baseband_core_emulation[][2] = {
9148 - /* Addr allmodes */
9149 - {0x00009800, 0xafa68e30},
9150 - {0x00009884, 0x00002842},
9151 - {0x00009c04, 0xff55ff55},
9152 - {0x00009c08, 0x0320ff55},
9153 - {0x00009e50, 0x00000000},
9154 - {0x00009fcc, 0x00000014},
9155 - {0x0000a344, 0x00000010},
9156 - {0x0000a398, 0x00000000},
9157 - {0x0000a39c, 0x71733d01},
9158 - {0x0000a3a0, 0xd0ad5c12},
9159 - {0x0000a3c0, 0x22222220},
9160 - {0x0000a3c4, 0x22222222},
9161 - {0x0000a404, 0x00418a11},
9162 - {0x0000a418, 0x050001ce},
9163 - {0x0000a438, 0x00001800},
9164 - {0x0000a458, 0x01444452},
9165 - {0x0000a644, 0x3fad9d74},
9166 - {0x0000a690, 0x00000038},
9169 -#endif /* INITVALS_9480_2P0_H */
9170 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
9171 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
9172 @@ -458,7 +458,7 @@ void ath9k_btcoex_timer_pause(struct ath
9173 #define ATH_LED_PIN_9287 8
9174 #define ATH_LED_PIN_9300 10
9175 #define ATH_LED_PIN_9485 6
9176 -#define ATH_LED_PIN_9480 0
9177 +#define ATH_LED_PIN_9462 0
9179 #ifdef CONFIG_MAC80211_LEDS
9180 void ath_init_leds(struct ath_softc *sc);
9181 --- a/drivers/net/wireless/ath/ath9k/beacon.c
9182 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
9183 @@ -515,7 +515,7 @@ static void ath_beacon_config_ap(struct
9184 sc->sc_flags |= SC_OP_TSF_RESET;
9185 ath9k_beacon_init(sc, nexttbtt, intval);
9186 sc->beacon.bmisscnt = 0;
9187 - ath9k_hw_set_interrupts(ah, ah->imask);
9188 + ath9k_hw_set_interrupts(ah);
9189 ath9k_hw_enable_interrupts(ah);
9192 @@ -643,7 +643,7 @@ static void ath_beacon_config_sta(struct
9193 ath9k_hw_set_sta_beacon_timers(ah, &bs);
9194 ah->imask |= ATH9K_INT_BMISS;
9196 - ath9k_hw_set_interrupts(ah, ah->imask);
9197 + ath9k_hw_set_interrupts(ah);
9198 ath9k_hw_enable_interrupts(ah);
9201 @@ -679,7 +679,7 @@ static void ath_beacon_config_adhoc(stru
9202 ath9k_beacon_init(sc, nexttbtt, intval);
9203 sc->beacon.bmisscnt = 0;
9205 - ath9k_hw_set_interrupts(ah, ah->imask);
9206 + ath9k_hw_set_interrupts(ah);
9207 ath9k_hw_enable_interrupts(ah);
9210 @@ -821,11 +821,11 @@ void ath9k_set_beaconing_status(struct a
9212 /* Re-enable beaconing */
9213 ah->imask |= ATH9K_INT_SWBA;
9214 - ath9k_hw_set_interrupts(ah, ah->imask);
9215 + ath9k_hw_set_interrupts(ah);
9217 /* Disable SWBA interrupt */
9218 ah->imask &= ~ATH9K_INT_SWBA;
9219 - ath9k_hw_set_interrupts(ah, ah->imask);
9220 + ath9k_hw_set_interrupts(ah);
9221 tasklet_kill(&sc->bcon_tasklet);
9222 ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq);
9224 --- a/drivers/net/wireless/ath/ath9k/common.c
9225 +++ b/drivers/net/wireless/ath/ath9k/common.c
9226 @@ -161,10 +161,12 @@ EXPORT_SYMBOL(ath9k_cmn_count_streams);
9227 void ath9k_cmn_update_txpow(struct ath_hw *ah, u16 cur_txpow,
9228 u16 new_txpow, u16 *txpower)
9230 - if (cur_txpow != new_txpow) {
9231 + struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
9233 + if (reg->power_limit != new_txpow) {
9234 ath9k_hw_set_txpowerlimit(ah, new_txpow, false);
9235 /* read back in case value is clamped */
9236 - *txpower = ath9k_hw_regulatory(ah)->power_limit;
9237 + *txpower = reg->max_power_level;
9240 EXPORT_SYMBOL(ath9k_cmn_update_txpow);
9241 --- a/drivers/net/wireless/ath/ath9k/debug.c
9242 +++ b/drivers/net/wireless/ath/ath9k/debug.c
9243 @@ -523,9 +523,22 @@ static ssize_t read_file_wiphy(struct fi
9244 if (tmp & ATH9K_RX_FILTER_PHYRADAR)
9245 len += snprintf(buf + len, sizeof(buf) - len, " PHYRADAR");
9246 if (tmp & ATH9K_RX_FILTER_MCAST_BCAST_ALL)
9247 - len += snprintf(buf + len, sizeof(buf) - len, " MCAST_BCAST_ALL\n");
9249 - len += snprintf(buf + len, sizeof(buf) - len, "\n");
9250 + len += snprintf(buf + len, sizeof(buf) - len, " MCAST_BCAST_ALL");
9252 + len += snprintf(buf + len, sizeof(buf) - len,
9253 + "\n\nReset causes:\n"
9254 + " baseband hang: %d\n"
9255 + " baseband watchdog: %d\n"
9256 + " fatal hardware error interrupt: %d\n"
9257 + " tx hardware error: %d\n"
9258 + " tx path hang: %d\n"
9259 + " pll rx hang: %d\n",
9260 + sc->debug.stats.reset[RESET_TYPE_BB_HANG],
9261 + sc->debug.stats.reset[RESET_TYPE_BB_WATCHDOG],
9262 + sc->debug.stats.reset[RESET_TYPE_FATAL_INT],
9263 + sc->debug.stats.reset[RESET_TYPE_TX_ERROR],
9264 + sc->debug.stats.reset[RESET_TYPE_TX_HANG],
9265 + sc->debug.stats.reset[RESET_TYPE_PLL_HANG]);
9267 if (len > sizeof(buf))
9269 --- a/drivers/net/wireless/ath/ath9k/debug.h
9270 +++ b/drivers/net/wireless/ath/ath9k/debug.h
9271 @@ -25,8 +25,10 @@ struct ath_buf;
9273 #ifdef CONFIG_ATH9K_DEBUGFS
9274 #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
9275 +#define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++
9277 #define TX_STAT_INC(q, c) do { } while (0)
9278 +#define RESET_STAT_INC(sc, type) do { } while (0)
9281 #ifdef CONFIG_ATH9K_DEBUGFS
9282 @@ -171,10 +173,21 @@ struct ath_rx_stats {
9286 +enum ath_reset_type {
9287 + RESET_TYPE_BB_HANG,
9288 + RESET_TYPE_BB_WATCHDOG,
9289 + RESET_TYPE_FATAL_INT,
9290 + RESET_TYPE_TX_ERROR,
9291 + RESET_TYPE_TX_HANG,
9292 + RESET_TYPE_PLL_HANG,
9297 struct ath_interrupt_stats istats;
9298 struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
9299 struct ath_rx_stats rxstats;
9300 + u32 reset[__RESET_TYPE_MAX];
9303 #define ATH_DBG_MAX_SAMPLES 10
9304 --- a/drivers/net/wireless/ath/ath9k/eeprom.h
9305 +++ b/drivers/net/wireless/ath/ath9k/eeprom.h
9307 #define EEP_RFSILENT_ENABLED_S 0
9308 #define EEP_RFSILENT_POLARITY 0x0002
9309 #define EEP_RFSILENT_POLARITY_S 1
9310 -#define EEP_RFSILENT_GPIO_SEL (AR_SREV_9480(ah) ? 0x00fc : 0x001c)
9311 +#define EEP_RFSILENT_GPIO_SEL (AR_SREV_9462(ah) ? 0x00fc : 0x001c)
9312 #define EEP_RFSILENT_GPIO_SEL_S 2
9314 #define AR5416_OPFLAGS_11A 0x01
9315 @@ -220,7 +220,6 @@ enum eeprom_param {
9323 @@ -248,7 +247,9 @@ enum eeprom_param {
9327 - EEP_CHAIN_MASK_REDUCE
9328 + EEP_CHAIN_MASK_REDUCE,
9329 + EEP_ANTENNA_GAIN_2G,
9330 + EEP_ANTENNA_GAIN_5G
9334 @@ -652,8 +653,7 @@ struct eeprom_ops {
9335 void (*set_addac)(struct ath_hw *hw, struct ath9k_channel *chan);
9336 void (*set_txpower)(struct ath_hw *hw, struct ath9k_channel *chan,
9337 u16 cfgCtl, u8 twiceAntennaReduction,
9338 - u8 twiceMaxRegulatoryPower, u8 powerLimit,
9340 + u8 powerLimit, bool test);
9341 u16 (*get_spur_channel)(struct ath_hw *ah, u16 i, bool is2GHz);
9344 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
9345 +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
9346 @@ -322,8 +322,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct
9347 return get_unaligned_be16(pBase->macAddr + 4);
9349 return pBase->regDmn[0];
9351 - return pBase->regDmn[1];
9353 return pBase->deviceCap;
9355 @@ -350,6 +348,8 @@ static u32 ath9k_hw_4k_get_eeprom(struct
9356 return pModal->antdiv_ctl1;
9357 case EEP_TXGAIN_TYPE:
9358 return pBase->txGainType;
9359 + case EEP_ANTENNA_GAIN_2G:
9360 + return pModal->antennaGainCh[0];
9364 @@ -462,8 +462,7 @@ static void ath9k_hw_set_4k_power_per_ra
9365 struct ath9k_channel *chan,
9366 int16_t *ratesArray,
9368 - u16 AntennaReduction,
9369 - u16 twiceMaxRegulatoryPower,
9370 + u16 antenna_reduction,
9373 #define CMP_TEST_GRP \
9374 @@ -472,20 +471,16 @@ static void ath9k_hw_set_4k_power_per_ra
9375 || (((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == \
9376 ((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))
9378 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9380 - int16_t twiceLargestAntenna;
9381 u16 twiceMinEdgePower;
9382 u16 twiceMaxEdgePower = MAX_RATE_POWER;
9383 - u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
9384 + u16 scaledPower = 0, minCtlPower;
9386 const u16 *pCtlMode;
9388 struct chan_centers centers;
9389 struct cal_ctl_data_4k *rep;
9390 struct ar5416_eeprom_4k *pEepData = &ah->eeprom.map4k;
9391 - static const u16 tpScaleReductionTable[5] =
9392 - { 0, 3, 6, 9, MAX_RATE_POWER };
9393 struct cal_target_power_leg targetPowerOfdm, targetPowerCck = {
9396 @@ -503,19 +498,7 @@ static void ath9k_hw_set_4k_power_per_ra
9398 ath9k_hw_get_channel_centers(ah, chan, ¢ers);
9400 - twiceLargestAntenna = pEepData->modalHeader.antennaGainCh[0];
9401 - twiceLargestAntenna = (int16_t)min(AntennaReduction -
9402 - twiceLargestAntenna, 0);
9404 - maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
9405 - if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX) {
9406 - maxRegAllowedPower -=
9407 - (tpScaleReductionTable[(regulatory->tp_scale)] * 2);
9410 - scaledPower = min(powerLimit, maxRegAllowedPower);
9411 - scaledPower = max((u16)0, scaledPower);
9413 + scaledPower = powerLimit - antenna_reduction;
9414 numCtlModes = ARRAY_SIZE(ctlModesFor11g) - SUB_NUM_CTL_MODES_AT_2G_40;
9415 pCtlMode = ctlModesFor11g;
9417 @@ -671,7 +654,6 @@ static void ath9k_hw_4k_set_txpower(stru
9418 struct ath9k_channel *chan,
9420 u8 twiceAntennaReduction,
9421 - u8 twiceMaxRegulatoryPower,
9422 u8 powerLimit, bool test)
9424 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9425 @@ -691,7 +673,6 @@ static void ath9k_hw_4k_set_txpower(stru
9426 ath9k_hw_set_4k_power_per_rate_table(ah, chan,
9427 &ratesArray[0], cfgCtl,
9428 twiceAntennaReduction,
9429 - twiceMaxRegulatoryPower,
9432 ath9k_hw_set_4k_power_cal_table(ah, chan);
9433 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
9434 +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
9435 @@ -308,8 +308,6 @@ static u32 ath9k_hw_ar9287_get_eeprom(st
9436 return get_unaligned_be16(pBase->macAddr + 4);
9438 return pBase->regDmn[0];
9440 - return pBase->regDmn[1];
9442 return pBase->deviceCap;
9444 @@ -336,6 +334,9 @@ static u32 ath9k_hw_ar9287_get_eeprom(st
9445 return pBase->tempSensSlopePalOn;
9448 + case EEP_ANTENNA_GAIN_2G:
9449 + return max_t(u8, pModal->antennaGainCh[0],
9450 + pModal->antennaGainCh[1]);
9454 @@ -554,8 +555,7 @@ static void ath9k_hw_set_ar9287_power_pe
9455 struct ath9k_channel *chan,
9456 int16_t *ratesArray,
9458 - u16 AntennaReduction,
9459 - u16 twiceMaxRegulatoryPower,
9460 + u16 antenna_reduction,
9464 @@ -569,12 +569,8 @@ static void ath9k_hw_set_ar9287_power_pe
9465 #define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6
9466 #define REDUCE_SCALED_POWER_BY_THREE_CHAIN 10
9468 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9469 u16 twiceMaxEdgePower = MAX_RATE_POWER;
9470 - static const u16 tpScaleReductionTable[5] =
9471 - { 0, 3, 6, 9, MAX_RATE_POWER };
9473 - int16_t twiceLargestAntenna;
9474 struct cal_ctl_data_ar9287 *rep;
9475 struct cal_target_power_leg targetPowerOfdm = {0, {0, 0, 0, 0} },
9476 targetPowerCck = {0, {0, 0, 0, 0} };
9477 @@ -582,7 +578,7 @@ static void ath9k_hw_set_ar9287_power_pe
9478 targetPowerCckExt = {0, {0, 0, 0, 0} };
9479 struct cal_target_power_ht targetPowerHt20,
9480 targetPowerHt40 = {0, {0, 0, 0, 0} };
9481 - u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
9482 + u16 scaledPower = 0, minCtlPower;
9483 static const u16 ctlModesFor11g[] = {
9484 CTL_11B, CTL_11G, CTL_2GHT20,
9485 CTL_11B_EXT, CTL_11G_EXT, CTL_2GHT40
9486 @@ -597,24 +593,7 @@ static void ath9k_hw_set_ar9287_power_pe
9487 tx_chainmask = ah->txchainmask;
9489 ath9k_hw_get_channel_centers(ah, chan, ¢ers);
9491 - /* Compute TxPower reduction due to Antenna Gain */
9492 - twiceLargestAntenna = max(pEepData->modalHeader.antennaGainCh[0],
9493 - pEepData->modalHeader.antennaGainCh[1]);
9494 - twiceLargestAntenna = (int16_t)min((AntennaReduction) -
9495 - twiceLargestAntenna, 0);
9498 - * scaledPower is the minimum of the user input power level
9499 - * and the regulatory allowed power level.
9501 - maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
9503 - if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX)
9504 - maxRegAllowedPower -=
9505 - (tpScaleReductionTable[(regulatory->tp_scale)] * 2);
9507 - scaledPower = min(powerLimit, maxRegAllowedPower);
9508 + scaledPower = powerLimit - antenna_reduction;
9511 * Reduce scaled Power by number of chains active
9512 @@ -815,7 +794,6 @@ static void ath9k_hw_set_ar9287_power_pe
9513 static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah,
9514 struct ath9k_channel *chan, u16 cfgCtl,
9515 u8 twiceAntennaReduction,
9516 - u8 twiceMaxRegulatoryPower,
9517 u8 powerLimit, bool test)
9519 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9520 @@ -834,7 +812,6 @@ static void ath9k_hw_ar9287_set_txpower(
9521 ath9k_hw_set_ar9287_power_per_rate_table(ah, chan,
9522 &ratesArray[0], cfgCtl,
9523 twiceAntennaReduction,
9524 - twiceMaxRegulatoryPower,
9527 ath9k_hw_set_ar9287_power_cal_table(ah, chan);
9528 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
9529 +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
9530 @@ -400,6 +400,7 @@ static u32 ath9k_hw_def_get_eeprom(struc
9531 struct ar5416_eeprom_def *eep = &ah->eeprom.def;
9532 struct modal_eep_header *pModal = eep->modalHeader;
9533 struct base_eep_header *pBase = &eep->baseEepHeader;
9537 case EEP_NFTHRESH_5:
9538 @@ -414,8 +415,6 @@ static u32 ath9k_hw_def_get_eeprom(struc
9539 return get_unaligned_be16(pBase->macAddr + 4);
9541 return pBase->regDmn[0];
9543 - return pBase->regDmn[1];
9545 return pBase->deviceCap;
9547 @@ -467,6 +466,14 @@ static u32 ath9k_hw_def_get_eeprom(struc
9548 return pBase->pwr_table_offset;
9550 return AR5416_PWR_TABLE_OFFSET_DB;
9551 + case EEP_ANTENNA_GAIN_2G:
9553 + /* fall through */
9554 + case EEP_ANTENNA_GAIN_5G:
9555 + return max_t(u8, max_t(u8,
9556 + pModal[band].antennaGainCh[0],
9557 + pModal[band].antennaGainCh[1]),
9558 + pModal[band].antennaGainCh[2]);
9562 @@ -986,21 +993,15 @@ static void ath9k_hw_set_def_power_per_r
9563 struct ath9k_channel *chan,
9564 int16_t *ratesArray,
9566 - u16 AntennaReduction,
9567 - u16 twiceMaxRegulatoryPower,
9568 + u16 antenna_reduction,
9571 #define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */
9572 #define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */
9574 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9575 struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
9576 u16 twiceMaxEdgePower = MAX_RATE_POWER;
9577 - static const u16 tpScaleReductionTable[5] =
9578 - { 0, 3, 6, 9, MAX_RATE_POWER };
9581 - int16_t twiceLargestAntenna;
9582 struct cal_ctl_data *rep;
9583 struct cal_target_power_leg targetPowerOfdm, targetPowerCck = {
9585 @@ -1012,7 +1013,7 @@ static void ath9k_hw_set_def_power_per_r
9586 struct cal_target_power_ht targetPowerHt20, targetPowerHt40 = {
9589 - u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
9590 + u16 scaledPower = 0, minCtlPower;
9591 static const u16 ctlModesFor11a[] = {
9592 CTL_11A, CTL_5GHT20, CTL_11A_EXT, CTL_5GHT40
9594 @@ -1031,27 +1032,7 @@ static void ath9k_hw_set_def_power_per_r
9596 ath9k_hw_get_channel_centers(ah, chan, ¢ers);
9598 - twiceLargestAntenna = max(
9599 - pEepData->modalHeader
9600 - [IS_CHAN_2GHZ(chan)].antennaGainCh[0],
9601 - pEepData->modalHeader
9602 - [IS_CHAN_2GHZ(chan)].antennaGainCh[1]);
9604 - twiceLargestAntenna = max((u8)twiceLargestAntenna,
9605 - pEepData->modalHeader
9606 - [IS_CHAN_2GHZ(chan)].antennaGainCh[2]);
9608 - twiceLargestAntenna = (int16_t)min(AntennaReduction -
9609 - twiceLargestAntenna, 0);
9611 - maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
9613 - if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX) {
9614 - maxRegAllowedPower -=
9615 - (tpScaleReductionTable[(regulatory->tp_scale)] * 2);
9618 - scaledPower = min(powerLimit, maxRegAllowedPower);
9619 + scaledPower = powerLimit - antenna_reduction;
9621 switch (ar5416_get_ntxchains(tx_chainmask)) {
9623 @@ -1256,7 +1237,6 @@ static void ath9k_hw_def_set_txpower(str
9624 struct ath9k_channel *chan,
9626 u8 twiceAntennaReduction,
9627 - u8 twiceMaxRegulatoryPower,
9628 u8 powerLimit, bool test)
9630 #define RT_AR_DELTA(x) (ratesArray[x] - cck_ofdm_delta)
9631 @@ -1278,7 +1258,6 @@ static void ath9k_hw_def_set_txpower(str
9632 ath9k_hw_set_def_power_per_rate_table(ah, chan,
9633 &ratesArray[0], cfgCtl,
9634 twiceAntennaReduction,
9635 - twiceMaxRegulatoryPower,
9638 ath9k_hw_set_def_power_cal_table(ah, chan);
9639 --- a/drivers/net/wireless/ath/ath9k/gpio.c
9640 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
9641 @@ -48,8 +48,8 @@ void ath_init_leds(struct ath_softc *sc)
9642 sc->sc_ah->led_pin = ATH_LED_PIN_9485;
9643 else if (AR_SREV_9300(sc->sc_ah))
9644 sc->sc_ah->led_pin = ATH_LED_PIN_9300;
9645 - else if (AR_SREV_9480(sc->sc_ah))
9646 - sc->sc_ah->led_pin = ATH_LED_PIN_9480;
9647 + else if (AR_SREV_9462(sc->sc_ah))
9648 + sc->sc_ah->led_pin = ATH_LED_PIN_9462;
9650 sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
9652 @@ -155,7 +155,7 @@ static void ath9k_gen_timer_start(struct
9653 if ((ah->imask & ATH9K_INT_GENTIMER) == 0) {
9654 ath9k_hw_disable_interrupts(ah);
9655 ah->imask |= ATH9K_INT_GENTIMER;
9656 - ath9k_hw_set_interrupts(ah, ah->imask);
9657 + ath9k_hw_set_interrupts(ah);
9658 ath9k_hw_enable_interrupts(ah);
9661 @@ -170,7 +170,7 @@ static void ath9k_gen_timer_stop(struct
9662 if (timer_table->timer_mask.val == 0) {
9663 ath9k_hw_disable_interrupts(ah);
9664 ah->imask &= ~ATH9K_INT_GENTIMER;
9665 - ath9k_hw_set_interrupts(ah, ah->imask);
9666 + ath9k_hw_set_interrupts(ah);
9667 ath9k_hw_enable_interrupts(ah);
9670 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h
9671 +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
9672 @@ -205,4 +205,11 @@ static inline void ath9k_hw_setup_calibr
9673 ath9k_hw_private_ops(ah)->setup_calibration(ah, currCal);
9676 +static inline int ath9k_hw_fast_chan_change(struct ath_hw *ah,
9677 + struct ath9k_channel *chan,
9680 + return ath9k_hw_private_ops(ah)->fast_chan_change(ah, chan,
9683 #endif /* ATH9K_HW_OPS_H */
9684 --- a/drivers/net/wireless/ath/ath9k/hw.c
9685 +++ b/drivers/net/wireless/ath/ath9k/hw.c
9686 @@ -285,7 +285,7 @@ static void ath9k_hw_read_revisions(stru
9687 (val & AR_SREV_VERSION2) >> AR_SREV_TYPE2_S;
9688 ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
9690 - if (AR_SREV_9480(ah))
9691 + if (AR_SREV_9462(ah))
9692 ah->is_pciexpress = true;
9694 ah->is_pciexpress = (val &
9695 @@ -433,7 +433,6 @@ static void ath9k_hw_init_defaults(struc
9697 regulatory->country_code = CTRY_DEFAULT;
9698 regulatory->power_limit = MAX_RATE_POWER;
9699 - regulatory->tp_scale = ATH9K_TP_SCALE_MAX;
9701 ah->hw_version.magic = AR5416_MAGIC;
9702 ah->hw_version.subvendorid = 0;
9703 @@ -542,6 +541,9 @@ static int __ath9k_hw_init(struct ath_hw
9707 + if (AR_SREV_9462(ah))
9708 + ah->WARegVal &= ~AR_WA_D3_L1_DISABLE;
9710 ath9k_hw_init_defaults(ah);
9711 ath9k_hw_init_config(ah);
9713 @@ -585,7 +587,7 @@ static int __ath9k_hw_init(struct ath_hw
9714 case AR_SREV_VERSION_9330:
9715 case AR_SREV_VERSION_9485:
9716 case AR_SREV_VERSION_9340:
9717 - case AR_SREV_VERSION_9480:
9718 + case AR_SREV_VERSION_9462:
9722 @@ -670,7 +672,7 @@ int ath9k_hw_init(struct ath_hw *ah)
9723 case AR9300_DEVID_AR9330:
9724 case AR9300_DEVID_AR9340:
9725 case AR9300_DEVID_AR9580:
9726 - case AR9300_DEVID_AR9480:
9727 + case AR9300_DEVID_AR9462:
9730 if (common->bus_ops->ath_bus_type == ATH_USB)
9731 @@ -1389,11 +1391,17 @@ static bool ath9k_hw_chip_reset(struct a
9732 static bool ath9k_hw_channel_change(struct ath_hw *ah,
9733 struct ath9k_channel *chan)
9735 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9736 struct ath_common *common = ath9k_hw_common(ah);
9737 - struct ieee80211_channel *channel = chan->chan;
9740 + bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
9741 + bool band_switch, mode_diff;
9744 + band_switch = (chan->channelFlags & (CHANNEL_2GHZ | CHANNEL_5GHZ)) !=
9745 + (ah->curchan->channelFlags & (CHANNEL_2GHZ |
9747 + mode_diff = (chan->chanmode != ah->curchan->chanmode);
9749 for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
9750 if (ath9k_hw_numtxpending(ah, qnum)) {
9751 @@ -1408,6 +1416,18 @@ static bool ath9k_hw_channel_change(stru
9755 + if (edma && (band_switch || mode_diff)) {
9756 + ath9k_hw_mark_phy_inactive(ah);
9759 + ath9k_hw_init_pll(ah, NULL);
9761 + if (ath9k_hw_fast_chan_change(ah, chan, &ini_reloaded)) {
9762 + ath_err(common, "Failed to do fast channel change\n");
9767 ath9k_hw_set_channel_regs(ah, chan);
9769 r = ath9k_hw_rf_set_freq(ah, chan);
9770 @@ -1416,14 +1436,7 @@ static bool ath9k_hw_channel_change(stru
9773 ath9k_hw_set_clockrate(ah);
9775 - ah->eep_ops->set_txpower(ah, chan,
9776 - ath9k_regd_get_ctl(regulatory, chan),
9777 - channel->max_antenna_gain * 2,
9778 - channel->max_power * 2,
9779 - min((u32) MAX_RATE_POWER,
9780 - (u32) regulatory->power_limit), false);
9782 + ath9k_hw_apply_txpower(ah, chan);
9783 ath9k_hw_rfbus_done(ah);
9785 if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan))
9786 @@ -1431,6 +1444,18 @@ static bool ath9k_hw_channel_change(stru
9788 ath9k_hw_spur_mitigate_freq(ah, chan);
9790 + if (edma && (band_switch || mode_diff)) {
9791 + ah->ah_flags |= AH_FASTCC;
9792 + if (band_switch || ini_reloaded)
9793 + ah->eep_ops->set_board_values(ah, chan);
9795 + ath9k_hw_init_bb(ah, chan);
9797 + if (band_switch || ini_reloaded)
9798 + ath9k_hw_init_cal(ah, chan);
9799 + ah->ah_flags &= ~AH_FASTCC;
9805 @@ -1486,6 +1511,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
9809 + bool allow_fbs = false;
9811 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
9813 @@ -1504,16 +1530,22 @@ int ath9k_hw_reset(struct ath_hw *ah, st
9815 ah->noise = ath9k_hw_getchan_noise(ah, chan);
9817 - if ((AR_SREV_9280(ah) && common->bus_ops->ath_bus_type == ATH_PCI) ||
9818 - (AR_SREV_9300_20_OR_LATER(ah) && IS_CHAN_5GHZ(chan)))
9819 + if (AR_SREV_9280(ah) && common->bus_ops->ath_bus_type == ATH_PCI)
9820 bChannelChange = false;
9823 + caldata->done_txiqcal_once &&
9824 + caldata->done_txclcal_once &&
9825 + caldata->rtt_hist.num_readings)
9828 if (bChannelChange &&
9829 (ah->chip_fullsleep != true) &&
9830 (ah->curchan != NULL) &&
9831 (chan->channel != ah->curchan->channel) &&
9832 - ((chan->channelFlags & CHANNEL_ALL) ==
9833 - (ah->curchan->channelFlags & CHANNEL_ALL))) {
9835 + ((chan->channelFlags & CHANNEL_ALL) ==
9836 + (ah->curchan->channelFlags & CHANNEL_ALL)))) {
9837 if (ath9k_hw_channel_change(ah, chan)) {
9838 ath9k_hw_loadnf(ah, ah->curchan);
9839 ath9k_hw_start_nfcal(ah, true);
9840 @@ -1684,6 +1716,11 @@ int ath9k_hw_reset(struct ath_hw *ah, st
9842 ath9k_hw_init_bb(ah, chan);
9845 + caldata->done_txiqcal_once = false;
9846 + caldata->done_txclcal_once = false;
9847 + caldata->rtt_hist.num_readings = 0;
9849 if (!ath9k_hw_init_cal(ah, chan))
9852 @@ -1753,7 +1790,7 @@ static void ath9k_set_power_sleep(struct
9854 REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);
9856 - if (AR_SREV_9480(ah)) {
9857 + if (AR_SREV_9462(ah)) {
9858 REG_WRITE(ah, AR_TIMER_MODE,
9859 REG_READ(ah, AR_TIMER_MODE) & 0xFFFFFF00);
9860 REG_WRITE(ah, AR_NDP2_TIMER_MODE, REG_READ(ah,
9861 @@ -1771,7 +1808,7 @@ static void ath9k_set_power_sleep(struct
9863 REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN);
9865 - if (AR_SREV_9480(ah))
9866 + if (AR_SREV_9462(ah))
9869 if (!AR_SREV_9100(ah) && !AR_SREV_9300_20_OR_LATER(ah))
9870 @@ -1779,15 +1816,14 @@ static void ath9k_set_power_sleep(struct
9872 /* Shutdown chip. Active low */
9873 if (!AR_SREV_5416(ah) &&
9874 - !AR_SREV_9271(ah) && !AR_SREV_9480_10(ah)) {
9875 + !AR_SREV_9271(ah) && !AR_SREV_9462_10(ah)) {
9876 REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
9881 /* Clear Bit 14 of AR_WA after putting chip into Full Sleep mode. */
9882 - if (!AR_SREV_9480(ah))
9883 - REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
9884 + REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
9888 @@ -1818,7 +1854,7 @@ static void ath9k_set_power_network_slee
9889 * SYS_WAKING and SYS_SLEEPING messages which will make
9890 * BT CPU to busy to process.
9892 - if (AR_SREV_9480(ah)) {
9893 + if (AR_SREV_9462(ah)) {
9894 val = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_EN) &
9895 ~AR_MCI_INTERRUPT_RX_HW_MSG_MASK;
9896 REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN, val);
9897 @@ -1830,7 +1866,7 @@ static void ath9k_set_power_network_slee
9898 REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE,
9899 AR_RTC_FORCE_WAKE_EN);
9901 - if (AR_SREV_9480(ah))
9902 + if (AR_SREV_9462(ah))
9906 @@ -2082,11 +2118,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw
9907 eeval = ah->eep_ops->get_eeprom(ah, EEP_REG_0);
9908 regulatory->current_rd = eeval;
9910 - eeval = ah->eep_ops->get_eeprom(ah, EEP_REG_1);
9911 - if (AR_SREV_9285_12_OR_LATER(ah))
9912 - eeval |= AR9285_RDEXT_DEFAULT;
9913 - regulatory->current_rd_ext = eeval;
9915 if (ah->opmode != NL80211_IFTYPE_AP &&
9916 ah->hw_version.subvendorid == AR_SUBVENDOR_ID_NEW_A) {
9917 if (regulatory->current_rd == 0x64 ||
9918 @@ -2294,6 +2325,14 @@ int ath9k_hw_fill_cap_info(struct ath_hw
9922 + if (AR_SREV_9300_20_OR_LATER(ah)) {
9923 + ah->enabled_cals |= TX_IQ_CAL;
9924 + if (!AR_SREV_9330(ah))
9925 + ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
9927 + if (AR_SREV_9462(ah))
9928 + pCap->hw_caps |= ATH9K_HW_CAP_RTT;
9933 @@ -2454,7 +2493,7 @@ void ath9k_hw_setrxfilter(struct ath_hw
9935 ENABLE_REGWRITE_BUFFER(ah);
9937 - if (AR_SREV_9480(ah))
9938 + if (AR_SREV_9462(ah))
9939 bits |= ATH9K_RX_FILTER_CONTROL_WRAPPER;
9941 REG_WRITE(ah, AR_RX_FILTER, bits);
9942 @@ -2498,23 +2537,56 @@ bool ath9k_hw_disable(struct ath_hw *ah)
9944 EXPORT_SYMBOL(ath9k_hw_disable);
9946 +static int get_antenna_gain(struct ath_hw *ah, struct ath9k_channel *chan)
9948 + enum eeprom_param gain_param;
9950 + if (IS_CHAN_2GHZ(chan))
9951 + gain_param = EEP_ANTENNA_GAIN_2G;
9953 + gain_param = EEP_ANTENNA_GAIN_5G;
9955 + return ah->eep_ops->get_eeprom(ah, gain_param);
9958 +void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan)
9960 + struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
9961 + struct ieee80211_channel *channel;
9962 + int chan_pwr, new_pwr, max_gain;
9963 + int ant_gain, ant_reduction = 0;
9968 + channel = chan->chan;
9969 + chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
9970 + new_pwr = min_t(int, chan_pwr, reg->power_limit);
9971 + max_gain = chan_pwr - new_pwr + channel->max_antenna_gain * 2;
9973 + ant_gain = get_antenna_gain(ah, chan);
9974 + if (ant_gain > max_gain)
9975 + ant_reduction = ant_gain - max_gain;
9977 + ah->eep_ops->set_txpower(ah, chan,
9978 + ath9k_regd_get_ctl(reg, chan),
9979 + ant_reduction, new_pwr, false);
9982 void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
9984 - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
9985 + struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
9986 struct ath9k_channel *chan = ah->curchan;
9987 struct ieee80211_channel *channel = chan->chan;
9988 - int reg_pwr = min_t(int, MAX_RATE_POWER, limit);
9989 - int chan_pwr = channel->max_power * 2;
9991 + reg->power_limit = min_t(int, limit, MAX_RATE_POWER);
9993 - reg_pwr = chan_pwr = MAX_RATE_POWER;
9994 + channel->max_power = MAX_RATE_POWER / 2;
9996 - regulatory->power_limit = reg_pwr;
9997 + ath9k_hw_apply_txpower(ah, chan);
9999 - ah->eep_ops->set_txpower(ah, chan,
10000 - ath9k_regd_get_ctl(regulatory, chan),
10001 - channel->max_antenna_gain * 2,
10002 - chan_pwr, reg_pwr, test);
10004 + channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2);
10006 EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit);
10008 @@ -2713,9 +2785,9 @@ void ath9k_hw_gen_timer_start(struct ath
10009 REG_SET_BIT(ah, gen_tmr_configuration[timer->index].mode_addr,
10010 gen_tmr_configuration[timer->index].mode_mask);
10012 - if (AR_SREV_9480(ah)) {
10013 + if (AR_SREV_9462(ah)) {
10015 - * Starting from AR9480, each generic timer can select which tsf
10016 + * Starting from AR9462, each generic timer can select which tsf
10017 * to use. But we still follow the old rule, 0 - 7 use tsf and
10020 @@ -2832,7 +2904,7 @@ static struct {
10021 { AR_SREV_VERSION_9330, "9330" },
10022 { AR_SREV_VERSION_9340, "9340" },
10023 { AR_SREV_VERSION_9485, "9485" },
10024 - { AR_SREV_VERSION_9480, "9480" },
10025 + { AR_SREV_VERSION_9462, "9462" },
10028 /* For devices with external radios */
10029 --- a/drivers/net/wireless/ath/ath9k/hw.h
10030 +++ b/drivers/net/wireless/ath/ath9k/hw.h
10032 #define AR9300_DEVID_AR9340 0x0031
10033 #define AR9300_DEVID_AR9485_PCIE 0x0032
10034 #define AR9300_DEVID_AR9580 0x0033
10035 -#define AR9300_DEVID_AR9480 0x0034
10036 +#define AR9300_DEVID_AR9462 0x0034
10037 #define AR9300_DEVID_AR9330 0x0035
10039 #define AR5416_AR9100_DEVID 0x000b
10040 @@ -202,6 +202,7 @@ enum ath9k_hw_caps {
10041 ATH9K_HW_CAP_2GHZ = BIT(13),
10042 ATH9K_HW_CAP_5GHZ = BIT(14),
10043 ATH9K_HW_CAP_APM = BIT(15),
10044 + ATH9K_HW_CAP_RTT = BIT(16),
10047 struct ath9k_hw_capabilities {
10048 @@ -337,6 +338,16 @@ enum ath9k_int {
10049 CHANNEL_HT40PLUS | \
10052 +#define MAX_RTT_TABLE_ENTRY 6
10053 +#define RTT_HIST_MAX 3
10054 +struct ath9k_rtt_hist {
10055 + u32 table[AR9300_MAX_CHAINS][RTT_HIST_MAX][MAX_RTT_TABLE_ENTRY];
10059 +#define MAX_IQCAL_MEASUREMENT 8
10060 +#define MAX_CL_TAB_ENTRY 16
10062 struct ath9k_hw_cal_data {
10065 @@ -346,9 +357,15 @@ struct ath9k_hw_cal_data {
10067 bool nfcal_pending;
10068 bool nfcal_interference;
10069 + bool done_txiqcal_once;
10070 + bool done_txclcal_once;
10071 u16 small_signal_gain[AR9300_MAX_CHAINS];
10072 u32 pa_table[AR9300_MAX_CHAINS][PAPRD_TABLE_SZ];
10073 + u32 num_measures[AR9300_MAX_CHAINS];
10074 + int tx_corr_coeff[MAX_IQCAL_MEASUREMENT][AR9300_MAX_CHAINS];
10075 + u32 tx_clcal[AR9300_MAX_CHAINS][MAX_CL_TAB_ENTRY];
10076 struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
10077 + struct ath9k_rtt_hist rtt_hist;
10080 struct ath9k_channel {
10081 @@ -390,14 +407,6 @@ enum ath9k_power_mode {
10085 -enum ath9k_tp_scale {
10086 - ATH9K_TP_SCALE_MAX = 0,
10087 - ATH9K_TP_SCALE_50,
10088 - ATH9K_TP_SCALE_25,
10089 - ATH9K_TP_SCALE_12,
10090 - ATH9K_TP_SCALE_MIN
10093 enum ser_reg_mode {
10094 SER_REG_MODE_OFF = 0,
10095 SER_REG_MODE_ON = 1,
10096 @@ -591,6 +600,8 @@ struct ath_hw_private_ops {
10097 void (*do_getnf)(struct ath_hw *ah, int16_t nfarray[NUM_NF_READINGS]);
10098 void (*set_radar_params)(struct ath_hw *ah,
10099 struct ath_hw_radar_conf *conf);
10100 + int (*fast_chan_change)(struct ath_hw *ah, struct ath9k_channel *chan,
10101 + u8 *ini_reloaded);
10104 void (*ani_cache_ini_regs)(struct ath_hw *ah);
10105 @@ -632,9 +643,16 @@ struct ath_nf_limits {
10109 +enum ath_cal_list {
10110 + TX_IQ_CAL = BIT(0),
10111 + TX_IQ_ON_AGC_CAL = BIT(1),
10112 + TX_CL_CAL = BIT(2),
10116 #define AH_USE_EEPROM 0x1
10117 #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
10118 +#define AH_FASTCC 0x4
10121 struct ath_ops reg_ops;
10122 @@ -692,6 +710,7 @@ struct ath_hw {
10123 atomic_t intr_ref_cnt;
10124 bool chip_fullsleep;
10130 @@ -730,6 +749,7 @@ struct ath_hw {
10131 int32_t sign[AR5416_MAX_CHAINS];
10136 u32 sta_id1_defaults;
10138 @@ -968,6 +988,7 @@ void ath9k_hw_htc_resetinit(struct ath_h
10140 void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled,
10141 u32 *coef_mantissa, u32 *coef_exponent);
10142 +void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan);
10145 * Code Specific to AR5008, AR9001 or AR9002,
10146 --- a/drivers/net/wireless/ath/ath9k/init.c
10147 +++ b/drivers/net/wireless/ath/ath9k/init.c
10148 @@ -626,7 +626,6 @@ static void ath9k_init_band_txpower(stru
10149 struct ieee80211_supported_band *sband;
10150 struct ieee80211_channel *chan;
10151 struct ath_hw *ah = sc->sc_ah;
10152 - struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
10155 sband = &sc->sbands[band];
10156 @@ -635,7 +634,6 @@ static void ath9k_init_band_txpower(stru
10157 ah->curchan = &ah->channels[chan->hw_value];
10158 ath9k_cmn_update_ichannel(ah->curchan, chan, NL80211_CHAN_HT20);
10159 ath9k_hw_set_txpowerlimit(ah, MAX_RATE_POWER, true);
10160 - chan->max_power = reg->max_power_level / 2;
10164 --- a/drivers/net/wireless/ath/ath9k/mac.c
10165 +++ b/drivers/net/wireless/ath/ath9k/mac.c
10166 @@ -620,8 +620,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
10167 rs->rs_status |= ATH9K_RXERR_DECRYPT;
10168 else if (ads.ds_rxstatus8 & AR_MichaelErr)
10169 rs->rs_status |= ATH9K_RXERR_MIC;
10170 - else if (ads.ds_rxstatus8 & AR_KeyMiss)
10171 - rs->rs_status |= ATH9K_RXERR_DECRYPT;
10172 + if (ads.ds_rxstatus8 & AR_KeyMiss)
10173 + rs->rs_status |= ATH9K_RXERR_KEYMISS;
10177 @@ -827,9 +827,9 @@ void ath9k_hw_enable_interrupts(struct a
10179 EXPORT_SYMBOL(ath9k_hw_enable_interrupts);
10181 -void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
10182 +void ath9k_hw_set_interrupts(struct ath_hw *ah)
10184 - enum ath9k_int omask = ah->imask;
10185 + enum ath9k_int ints = ah->imask;
10187 struct ath9k_hw_capabilities *pCap = &ah->caps;
10188 struct ath_common *common = ath9k_hw_common(ah);
10189 @@ -837,7 +837,7 @@ void ath9k_hw_set_interrupts(struct ath_
10190 if (!(ints & ATH9K_INT_GLOBAL))
10191 ath9k_hw_disable_interrupts(ah);
10193 - ath_dbg(common, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints);
10194 + ath_dbg(common, ATH_DBG_INTERRUPT, "New interrupt mask 0x%x\n", ints);
10196 mask = ints & ATH9K_INT_COMMON;
10198 --- a/drivers/net/wireless/ath/ath9k/mac.h
10199 +++ b/drivers/net/wireless/ath/ath9k/mac.h
10201 #define ATH9K_TXERR_XTXOP 0x08
10202 #define ATH9K_TXERR_TIMER_EXPIRED 0x10
10203 #define ATH9K_TX_ACKED 0x20
10204 +#define ATH9K_TX_FLUSH 0x40
10205 #define ATH9K_TXERR_MASK \
10206 (ATH9K_TXERR_XRETRY | ATH9K_TXERR_FILT | ATH9K_TXERR_FIFO | \
10207 - ATH9K_TXERR_XTXOP | ATH9K_TXERR_TIMER_EXPIRED)
10208 + ATH9K_TXERR_XTXOP | ATH9K_TXERR_TIMER_EXPIRED | ATH9K_TX_FLUSH)
10210 #define ATH9K_TX_BA 0x01
10211 #define ATH9K_TX_PWRMGMT 0x02
10212 @@ -181,6 +182,7 @@ struct ath_htc_rx_status {
10213 #define ATH9K_RXERR_FIFO 0x04
10214 #define ATH9K_RXERR_DECRYPT 0x08
10215 #define ATH9K_RXERR_MIC 0x10
10216 +#define ATH9K_RXERR_KEYMISS 0x20
10218 #define ATH9K_RX_MORE 0x01
10219 #define ATH9K_RX_MORE_AGGR 0x02
10220 @@ -734,7 +736,7 @@ int ath9k_hw_beaconq_setup(struct ath_hw
10222 /* Interrupt Handling */
10223 bool ath9k_hw_intrpend(struct ath_hw *ah);
10224 -void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints);
10225 +void ath9k_hw_set_interrupts(struct ath_hw *ah);
10226 void ath9k_hw_enable_interrupts(struct ath_hw *ah);
10227 void ath9k_hw_disable_interrupts(struct ath_hw *ah);
10229 --- a/drivers/net/wireless/ath/ath9k/main.c
10230 +++ b/drivers/net/wireless/ath/ath9k/main.c
10231 @@ -273,7 +273,7 @@ static bool ath_complete_reset(struct at
10233 ath9k_cmn_update_txpow(ah, sc->curtxpow,
10234 sc->config.txpowlimit, &sc->curtxpow);
10235 - ath9k_hw_set_interrupts(ah, ah->imask);
10236 + ath9k_hw_set_interrupts(ah);
10237 ath9k_hw_enable_interrupts(ah);
10239 if (!(sc->sc_flags & (SC_OP_OFFCHANNEL)) && start) {
10240 @@ -679,6 +679,16 @@ void ath9k_tasklet(unsigned long data)
10242 if ((status & ATH9K_INT_FATAL) ||
10243 (status & ATH9K_INT_BB_WATCHDOG)) {
10244 +#ifdef CONFIG_ATH9K_DEBUGFS
10245 + enum ath_reset_type type;
10247 + if (status & ATH9K_INT_FATAL)
10248 + type = RESET_TYPE_FATAL_INT;
10250 + type = RESET_TYPE_BB_WATCHDOG;
10252 + RESET_STAT_INC(sc, type);
10254 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
10257 @@ -823,7 +833,7 @@ irqreturn_t ath_isr(int irq, void *dev)
10259 if (status & ATH9K_INT_RXEOL) {
10260 ah->imask &= ~(ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
10261 - ath9k_hw_set_interrupts(ah, ah->imask);
10262 + ath9k_hw_set_interrupts(ah);
10265 if (status & ATH9K_INT_MIB) {
10266 @@ -995,8 +1005,10 @@ void ath_hw_check(struct work_struct *wo
10267 ath_dbg(common, ATH_DBG_RESET, "Possible baseband hang, "
10268 "busy=%d (try %d)\n", busy, sc->hw_busy_count + 1);
10270 - if (++sc->hw_busy_count >= 3)
10271 + if (++sc->hw_busy_count >= 3) {
10272 + RESET_STAT_INC(sc, RESET_TYPE_BB_HANG);
10273 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
10276 } else if (busy >= 0)
10277 sc->hw_busy_count = 0;
10278 @@ -1016,6 +1028,7 @@ static void ath_hw_pll_rx_hang_check(str
10279 /* Rx is hung for more than 500ms. Reset it */
10280 ath_dbg(common, ATH_DBG_RESET,
10281 "Possible RX hang, resetting");
10282 + RESET_STAT_INC(sc, RESET_TYPE_PLL_HANG);
10283 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
10286 @@ -1396,7 +1409,7 @@ static void ath9k_calculate_summary_stat
10287 ah->imask &= ~ATH9K_INT_TSFOOR;
10290 - ath9k_hw_set_interrupts(ah, ah->imask);
10291 + ath9k_hw_set_interrupts(ah);
10294 if (iter_data.naps > 0) {
10295 @@ -1571,7 +1584,7 @@ static void ath9k_enable_ps(struct ath_s
10296 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
10297 if ((ah->imask & ATH9K_INT_TIM_TIMER) == 0) {
10298 ah->imask |= ATH9K_INT_TIM_TIMER;
10299 - ath9k_hw_set_interrupts(ah, ah->imask);
10300 + ath9k_hw_set_interrupts(ah);
10302 ath9k_hw_setrxabort(ah, 1);
10304 @@ -1591,7 +1604,7 @@ static void ath9k_disable_ps(struct ath_
10305 PS_WAIT_FOR_TX_ACK);
10306 if (ah->imask & ATH9K_INT_TIM_TIMER) {
10307 ah->imask &= ~ATH9K_INT_TIM_TIMER;
10308 - ath9k_hw_set_interrupts(ah, ah->imask);
10309 + ath9k_hw_set_interrupts(ah);
10313 --- a/drivers/net/wireless/ath/ath9k/pci.c
10314 +++ b/drivers/net/wireless/ath/ath9k/pci.c
10315 @@ -33,7 +33,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
10316 { PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E AR9300 */
10317 { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */
10318 { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */
10319 - { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9480 */
10320 + { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */
10324 --- a/drivers/net/wireless/ath/ath9k/recv.c
10325 +++ b/drivers/net/wireless/ath/ath9k/recv.c
10326 @@ -433,12 +433,9 @@ void ath_rx_cleanup(struct ath_softc *sc
10328 u32 ath_calcrxfilter(struct ath_softc *sc)
10330 -#define RX_FILTER_PRESERVE (ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR)
10334 - rfilt = (ath9k_hw_getrxfilter(sc->sc_ah) & RX_FILTER_PRESERVE)
10335 - | ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
10336 + rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
10337 | ATH9K_RX_FILTER_MCAST;
10339 if (sc->rx.rxfilter & FIF_PROBE_REQ)
10340 @@ -811,6 +808,7 @@ static bool ath9k_rx_accept(struct ath_c
10341 struct ath_rx_status *rx_stats,
10342 bool *decrypt_error)
10344 + struct ath_softc *sc = (struct ath_softc *) common->priv;
10345 bool is_mc, is_valid_tkip, strip_mic, mic_error;
10346 struct ath_hw *ah = common->ah;
10348 @@ -823,7 +821,8 @@ static bool ath9k_rx_accept(struct ath_c
10349 test_bit(rx_stats->rs_keyix, common->tkip_keymap);
10350 strip_mic = is_valid_tkip && ieee80211_is_data(fc) &&
10351 !(rx_stats->rs_status &
10352 - (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC));
10353 + (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
10354 + ATH9K_RXERR_KEYMISS));
10356 if (!rx_stats->rs_datalen)
10358 @@ -851,6 +850,8 @@ static bool ath9k_rx_accept(struct ath_c
10361 if (rx_stats->rs_status != 0) {
10364 if (rx_stats->rs_status & ATH9K_RXERR_CRC) {
10365 rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
10367 @@ -858,7 +859,8 @@ static bool ath9k_rx_accept(struct ath_c
10368 if (rx_stats->rs_status & ATH9K_RXERR_PHY)
10371 - if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
10372 + if ((rx_stats->rs_status & ATH9K_RXERR_DECRYPT) ||
10373 + (!is_mc && (rx_stats->rs_status & ATH9K_RXERR_KEYMISS))) {
10374 *decrypt_error = true;
10377 @@ -868,17 +870,14 @@ static bool ath9k_rx_accept(struct ath_c
10378 * decryption and MIC failures. For monitor mode,
10379 * we also ignore the CRC error.
10381 - if (ah->is_monitoring) {
10382 - if (rx_stats->rs_status &
10383 - ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
10384 - ATH9K_RXERR_CRC))
10387 - if (rx_stats->rs_status &
10388 - ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC)) {
10392 + status_mask = ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
10393 + ATH9K_RXERR_KEYMISS;
10395 + if (ah->is_monitoring && (sc->rx.rxfilter & FIF_FCSFAIL))
10396 + status_mask |= ATH9K_RXERR_CRC;
10398 + if (rx_stats->rs_status & ~status_mask)
10403 @@ -1973,7 +1972,7 @@ requeue:
10405 if (!(ah->imask & ATH9K_INT_RXEOL)) {
10406 ah->imask |= (ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
10407 - ath9k_hw_set_interrupts(ah, ah->imask);
10408 + ath9k_hw_set_interrupts(ah);
10412 --- a/drivers/net/wireless/ath/ath9k/reg.h
10413 +++ b/drivers/net/wireless/ath/ath9k/reg.h
10414 @@ -796,9 +796,9 @@
10415 #define AR_SREV_VERSION_9340 0x300
10416 #define AR_SREV_VERSION_9580 0x1C0
10417 #define AR_SREV_REVISION_9580_10 4 /* AR9580 1.0 */
10418 -#define AR_SREV_VERSION_9480 0x280
10419 -#define AR_SREV_REVISION_9480_10 0
10420 -#define AR_SREV_REVISION_9480_20 2
10421 +#define AR_SREV_VERSION_9462 0x280
10422 +#define AR_SREV_REVISION_9462_10 0
10423 +#define AR_SREV_REVISION_9462_20 2
10425 #define AR_SREV_5416(_ah) \
10426 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \
10427 @@ -895,20 +895,20 @@
10428 (AR_SREV_9285_12_OR_LATER(_ah) && \
10429 ((REG_READ(_ah, AR_AN_SYNTH9) & 0x7) == 0x1))
10431 -#define AR_SREV_9480(_ah) \
10432 - (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9480))
10433 +#define AR_SREV_9462(_ah) \
10434 + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462))
10436 -#define AR_SREV_9480_10(_ah) \
10437 - (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9480) && \
10438 - ((_ah)->hw_version.macRev == AR_SREV_REVISION_9480_10))
10440 -#define AR_SREV_9480_20(_ah) \
10441 - (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9480) && \
10442 - ((_ah)->hw_version.macRev == AR_SREV_REVISION_9480_20))
10444 -#define AR_SREV_9480_20_OR_LATER(_ah) \
10445 - (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9480) && \
10446 - ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9480_20))
10447 +#define AR_SREV_9462_10(_ah) \
10448 + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462) && \
10449 + ((_ah)->hw_version.macRev == AR_SREV_REVISION_9462_10))
10451 +#define AR_SREV_9462_20(_ah) \
10452 + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462) && \
10453 + ((_ah)->hw_version.macRev == AR_SREV_REVISION_9462_20))
10455 +#define AR_SREV_9462_20_OR_LATER(_ah) \
10456 + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462) && \
10457 + ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9462_20))
10459 #define AR_SREV_9580(_ah) \
10460 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9580) && \
10461 @@ -1933,6 +1933,7 @@ enum {
10462 #define AR_PHY_AGC_CONTROL_NO_UPDATE_NF 0x00020000 /* don't update noise floor automatically */
10463 #define AR_PHY_AGC_CONTROL_EXT_NF_PWR_MEAS 0x00040000 /* extend noise floor power measurement */
10464 #define AR_PHY_AGC_CONTROL_CLC_SUCCESS 0x00080000 /* carrier leak calibration done */
10465 +#define AR_PHY_AGC_CONTROL_PKDET_CAL 0x00100000
10466 #define AR_PHY_AGC_CONTROL_YCOK_MAX 0x000003c0
10467 #define AR_PHY_AGC_CONTROL_YCOK_MAX_S 6
10469 --- a/drivers/net/wireless/ath/ath9k/xmit.c
10470 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
10471 @@ -373,7 +373,7 @@ static void ath_tx_complete_aggr(struct
10472 struct ath_frame_info *fi;
10475 - bool clear_filter;
10476 + bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
10479 hdr = (struct ieee80211_hdr *)skb->data;
10480 @@ -462,12 +462,12 @@ static void ath_tx_complete_aggr(struct
10481 * the un-acked sub-frames
10484 + } else if (flush) {
10486 } else if (fi->retries < ATH_MAX_SW_RETRIES) {
10487 - if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
10489 + if (txok || !an->sleeping)
10490 ath_tx_set_retry(sc, txq, bf->bf_mpdu);
10492 - clear_filter = true;
10496 @@ -521,7 +521,8 @@ static void ath_tx_complete_aggr(struct
10498 ath_tx_complete_buf(sc, bf, txq,
10506 @@ -545,11 +546,13 @@ static void ath_tx_complete_aggr(struct
10507 ieee80211_sta_set_buffered(sta, tid->tidno, true);
10509 spin_lock_bh(&txq->axq_lock);
10510 - if (clear_filter)
10511 - tid->ac->clear_ps_filter = true;
10512 skb_queue_splice(&bf_pending, &tid->buf_q);
10513 - if (!an->sleeping)
10514 + if (!an->sleeping) {
10515 ath_tx_queue_tid(txq, tid);
10517 + if (ts->ts_status & ATH9K_TXERR_FILT)
10518 + tid->ac->clear_ps_filter = true;
10520 spin_unlock_bh(&txq->axq_lock);
10523 @@ -564,8 +567,10 @@ static void ath_tx_complete_aggr(struct
10529 + RESET_STAT_INC(sc, RESET_TYPE_TX_ERROR);
10530 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
10534 static bool ath_lookup_legacy(struct ath_buf *bf)
10535 @@ -1407,6 +1412,7 @@ static void ath_drain_txq_list(struct at
10536 struct ath_tx_status ts;
10538 memset(&ts, 0, sizeof(ts));
10539 + ts.ts_status = ATH9K_TX_FLUSH;
10540 INIT_LIST_HEAD(&bf_head);
10542 while (!list_empty(list)) {
10543 @@ -1473,7 +1479,8 @@ bool ath_drain_all_txq(struct ath_softc
10544 struct ath_hw *ah = sc->sc_ah;
10545 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
10546 struct ath_txq *txq;
10547 - int i, npend = 0;
10551 if (sc->sc_flags & SC_OP_INVALID)
10553 @@ -1485,11 +1492,12 @@ bool ath_drain_all_txq(struct ath_softc
10554 if (!ATH_TXQ_SETUP(sc, i))
10557 - npend += ath9k_hw_numtxpending(ah, sc->tx.txq[i].axq_qnum);
10558 + if (ath9k_hw_numtxpending(ah, sc->tx.txq[i].axq_qnum))
10563 - ath_err(common, "Failed to stop TX DMA!\n");
10564 + ath_err(common, "Failed to stop TX DMA, queues=0x%03x!\n", npend);
10566 for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
10567 if (!ATH_TXQ_SETUP(sc, i))
10568 @@ -2211,6 +2219,7 @@ static void ath_tx_complete_poll_work(st
10570 ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,
10571 "tx hung, resetting the chip\n");
10572 + RESET_STAT_INC(sc, RESET_TYPE_TX_HANG);
10573 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
10576 --- a/drivers/net/wireless/ath/carl9170/main.c
10577 +++ b/drivers/net/wireless/ath/carl9170/main.c
10578 @@ -1914,7 +1914,6 @@ static int carl9170_parse_eeprom(struct
10579 ar->hw->channel_change_time = 80 * 1000;
10581 regulatory->current_rd = le16_to_cpu(ar->eeprom.reg_domain[0]);
10582 - regulatory->current_rd_ext = le16_to_cpu(ar->eeprom.reg_domain[1]);
10584 /* second part of wiphy init */
10585 SET_IEEE80211_PERM_ADDR(ar->hw, ar->eeprom.mac_address);
10586 --- a/include/net/cfg80211.h
10587 +++ b/include/net/cfg80211.h
10588 @@ -1119,6 +1119,7 @@ struct cfg80211_ibss_params {
10591 struct ieee80211_channel *channel;
10592 + enum nl80211_channel_type channel_type;
10594 u8 ssid_len, ie_len;
10595 u16 beacon_interval;
10596 @@ -3185,6 +3186,16 @@ void cfg80211_gtk_rekey_notify(struct ne
10597 void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
10598 const u8 *bssid, bool preauth, gfp_t gfp);
10601 + * cfg80211_can_use_ext_chan - test if ht40 on extension channel can be used
10602 + * @wiphy: the wiphy
10603 + * @chan: main channel
10604 + * @channel_type: HT mode
10606 +bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
10607 + struct ieee80211_channel *chan,
10608 + enum nl80211_channel_type channel_type);
10610 /* Logging, debugging and troubleshooting/diagnostic helpers. */
10612 /* wiphy_printk helpers, similar to dev_printk */
10613 --- a/net/mac80211/agg-rx.c
10614 +++ b/net/mac80211/agg-rx.c
10615 @@ -180,6 +180,10 @@ static void ieee80211_send_addba_resp(st
10616 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
10617 else if (sdata->vif.type == NL80211_IFTYPE_STATION)
10618 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
10619 + else if (sdata->vif.type == NL80211_IFTYPE_WDS)
10620 + memcpy(mgmt->bssid, da, ETH_ALEN);
10621 + else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
10622 + memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
10624 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
10625 IEEE80211_STYPE_ACTION);
10626 --- a/net/mac80211/agg-tx.c
10627 +++ b/net/mac80211/agg-tx.c
10628 @@ -77,10 +77,13 @@ static void ieee80211_send_addba_request
10629 memcpy(mgmt->da, da, ETH_ALEN);
10630 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
10631 if (sdata->vif.type == NL80211_IFTYPE_AP ||
10632 - sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
10633 + sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
10634 + sdata->vif.type == NL80211_IFTYPE_WDS)
10635 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
10636 else if (sdata->vif.type == NL80211_IFTYPE_STATION)
10637 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
10638 + else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
10639 + memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
10641 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
10642 IEEE80211_STYPE_ACTION);
10643 @@ -397,7 +400,9 @@ int ieee80211_start_tx_ba_session(struct
10645 if (sdata->vif.type != NL80211_IFTYPE_STATION &&
10646 sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
10647 - sdata->vif.type != NL80211_IFTYPE_AP)
10648 + sdata->vif.type != NL80211_IFTYPE_AP &&
10649 + sdata->vif.type != NL80211_IFTYPE_ADHOC &&
10650 + sdata->vif.type != NL80211_IFTYPE_WDS)
10653 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) {
10654 --- a/net/mac80211/cfg.c
10655 +++ b/net/mac80211/cfg.c
10656 @@ -1886,7 +1886,7 @@ ieee80211_offchan_tx_done(struct ieee802
10657 * so in that case userspace will have to deal with it.
10660 - if (wk->offchan_tx.wait && wk->offchan_tx.frame)
10661 + if (wk->offchan_tx.wait && !wk->offchan_tx.status)
10662 cfg80211_mgmt_tx_status(wk->sdata->dev,
10663 (unsigned long) wk->offchan_tx.frame,
10664 wk->ie, wk->ie_len, false, GFP_KERNEL);
10665 --- a/net/mac80211/debugfs_sta.c
10666 +++ b/net/mac80211/debugfs_sta.c
10667 @@ -63,11 +63,11 @@ static ssize_t sta_flags_read(struct fil
10668 test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
10670 int res = scnprintf(buf, sizeof(buf),
10671 - "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
10672 + "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
10673 TEST(AUTH), TEST(ASSOC), TEST(PS_STA),
10674 TEST(PS_DRIVER), TEST(AUTHORIZED),
10675 TEST(SHORT_PREAMBLE), TEST(ASSOC_AP),
10676 - TEST(WME), TEST(WDS), TEST(CLEAR_PS_FILT),
10677 + TEST(WME), TEST(CLEAR_PS_FILT),
10678 TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
10679 TEST(UAPSD), TEST(SP), TEST(TDLS_PEER),
10680 TEST(TDLS_PEER_AUTH));
10681 --- a/net/mac80211/ht.c
10682 +++ b/net/mac80211/ht.c
10683 @@ -199,6 +199,8 @@ void ieee80211_send_delba(struct ieee802
10684 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
10685 else if (sdata->vif.type == NL80211_IFTYPE_STATION)
10686 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
10687 + else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
10688 + memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
10690 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
10691 IEEE80211_STYPE_ACTION);
10692 --- a/net/mac80211/ibss.c
10693 +++ b/net/mac80211/ibss.c
10694 @@ -77,6 +77,7 @@ static void __ieee80211_sta_join_ibss(st
10695 struct cfg80211_bss *bss;
10697 u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
10698 + enum nl80211_channel_type channel_type;
10700 lockdep_assert_held(&ifibss->mtx);
10702 @@ -104,8 +105,16 @@ static void __ieee80211_sta_join_ibss(st
10704 sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
10706 - local->oper_channel = chan;
10707 - WARN_ON(!ieee80211_set_channel_type(local, sdata, NL80211_CHAN_NO_HT));
10708 + channel_type = ifibss->channel_type;
10709 + if (channel_type > NL80211_CHAN_HT20 &&
10710 + !cfg80211_can_beacon_sec_chan(local->hw.wiphy, chan, channel_type))
10711 + channel_type = NL80211_CHAN_HT20;
10712 + if (!ieee80211_set_channel_type(local, sdata, channel_type)) {
10713 + /* can only fail due to HT40+/- mismatch */
10714 + channel_type = NL80211_CHAN_HT20;
10715 + WARN_ON(!ieee80211_set_channel_type(local, sdata,
10716 + NL80211_CHAN_HT20));
10718 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
10720 sband = local->hw.wiphy->bands[chan->band];
10721 @@ -171,6 +180,18 @@ static void __ieee80211_sta_join_ibss(st
10722 memcpy(skb_put(skb, ifibss->ie_len),
10723 ifibss->ie, ifibss->ie_len);
10725 + /* add HT capability and information IEs */
10726 + if (channel_type && sband->ht_cap.ht_supported) {
10727 + pos = skb_put(skb, 4 +
10728 + sizeof(struct ieee80211_ht_cap) +
10729 + sizeof(struct ieee80211_ht_info));
10730 + pos = ieee80211_ie_build_ht_cap(pos, sband, sband->ht_cap.cap);
10731 + pos = ieee80211_ie_build_ht_info(pos,
10737 if (local->hw.queues >= 4) {
10738 pos = skb_put(skb, 9);
10739 *pos++ = WLAN_EID_VENDOR_SPECIFIC;
10740 @@ -194,6 +215,7 @@ static void __ieee80211_sta_join_ibss(st
10741 bss_change |= BSS_CHANGED_BEACON;
10742 bss_change |= BSS_CHANGED_BEACON_ENABLED;
10743 bss_change |= BSS_CHANGED_BASIC_RATES;
10744 + bss_change |= BSS_CHANGED_HT;
10745 bss_change |= BSS_CHANGED_IBSS;
10746 sdata->vif.bss_conf.ibss_joined = true;
10747 ieee80211_bss_info_change_notify(sdata, bss_change);
10748 @@ -266,6 +288,7 @@ static void ieee80211_rx_bss_info(struct
10749 u64 beacon_timestamp, rx_timestamp;
10750 u32 supp_rates = 0;
10751 enum ieee80211_band band = rx_status->band;
10752 + struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
10754 if (elems->ds_params && elems->ds_params_len == 1)
10755 freq = ieee80211_channel_to_frequency(elems->ds_params[0],
10756 @@ -275,7 +298,10 @@ static void ieee80211_rx_bss_info(struct
10758 channel = ieee80211_get_channel(local->hw.wiphy, freq);
10760 - if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
10762 + channel->flags & (IEEE80211_CHAN_DISABLED ||
10763 + IEEE80211_CHAN_NO_IBSS ||
10764 + IEEE80211_CHAN_RADAR))
10767 if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
10768 @@ -313,8 +339,41 @@ static void ieee80211_rx_bss_info(struct
10772 - if (sta && elems->wmm_info)
10773 - set_sta_flag(sta, WLAN_STA_WME);
10775 + if (elems->wmm_info)
10776 + set_sta_flag(sta, WLAN_STA_WME);
10778 + /* we both use HT */
10779 + if (elems->ht_info_elem && elems->ht_cap_elem &&
10780 + sdata->u.ibss.channel_type) {
10781 + enum nl80211_channel_type channel_type =
10782 + ieee80211_ht_info_to_channel_type(
10783 + elems->ht_info_elem);
10784 + struct ieee80211_sta_ht_cap sta_ht_cap_new;
10787 + * fall back to HT20 if we don't use or use
10788 + * the other extension channel
10790 + if (channel_type > NL80211_CHAN_HT20 &&
10791 + channel_type != sdata->u.ibss.channel_type)
10792 + channel_type = NL80211_CHAN_HT20;
10794 + ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
10795 + elems->ht_cap_elem,
10796 + &sta_ht_cap_new);
10797 + if (memcmp(&sta->sta.ht_cap, &sta_ht_cap_new,
10798 + sizeof(sta_ht_cap_new))) {
10799 + memcpy(&sta->sta.ht_cap,
10801 + sizeof(sta_ht_cap_new));
10802 + rate_control_rate_update(local, sband,
10804 + IEEE80211_RC_HT_CHANGED,
10812 @@ -896,10 +955,15 @@ int ieee80211_ibss_join(struct ieee80211
10813 struct sk_buff *skb;
10815 skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom +
10816 - 36 /* bitrates */ +
10818 - 3 /* DS params */ +
10819 - 4 /* IBSS params */ +
10820 + sizeof(struct ieee80211_hdr_3addr) +
10821 + 12 /* struct ieee80211_mgmt.u.beacon */ +
10822 + 2 + IEEE80211_MAX_SSID_LEN /* max SSID */ +
10823 + 2 + 8 /* max Supported Rates */ +
10824 + 3 /* max DS params */ +
10825 + 4 /* IBSS params */ +
10826 + 2 + (IEEE80211_MAX_SUPP_RATES - 8) +
10827 + 2 + sizeof(struct ieee80211_ht_cap) +
10828 + 2 + sizeof(struct ieee80211_ht_info) +
10832 @@ -920,13 +984,15 @@ int ieee80211_ibss_join(struct ieee80211
10833 sdata->vif.bss_conf.beacon_int = params->beacon_interval;
10835 sdata->u.ibss.channel = params->channel;
10836 + sdata->u.ibss.channel_type = params->channel_type;
10837 sdata->u.ibss.fixed_channel = params->channel_fixed;
10839 /* fix ourselves to that channel now already */
10840 if (params->channel_fixed) {
10841 sdata->local->oper_channel = params->channel;
10842 - WARN_ON(!ieee80211_set_channel_type(sdata->local, sdata,
10843 - NL80211_CHAN_NO_HT));
10844 + if (!ieee80211_set_channel_type(sdata->local, sdata,
10845 + params->channel_type))
10850 --- a/net/mac80211/ieee80211_i.h
10851 +++ b/net/mac80211/ieee80211_i.h
10852 @@ -346,6 +346,7 @@ struct ieee80211_work {
10854 struct sk_buff *frame;
10860 @@ -465,6 +466,7 @@ struct ieee80211_if_ibss {
10861 u8 ssid_len, ie_len;
10863 struct ieee80211_channel *channel;
10864 + enum nl80211_channel_type channel_type;
10866 unsigned long ibss_join_req;
10867 /* probe response/beacon for IBSS */
10868 @@ -1351,6 +1353,12 @@ void ieee80211_recalc_smps(struct ieee80
10869 size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
10870 const u8 *ids, int n_ids, size_t offset);
10871 size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
10872 +u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband,
10874 +u8 *ieee80211_ie_build_ht_info(u8 *pos,
10875 + struct ieee80211_sta_ht_cap *ht_cap,
10876 + struct ieee80211_channel *channel,
10877 + enum nl80211_channel_type channel_type);
10879 /* internal work items */
10880 void ieee80211_work_init(struct ieee80211_local *local);
10881 @@ -1379,6 +1387,8 @@ ieee80211_get_channel_mode(struct ieee80
10882 bool ieee80211_set_channel_type(struct ieee80211_local *local,
10883 struct ieee80211_sub_if_data *sdata,
10884 enum nl80211_channel_type chantype);
10885 +enum nl80211_channel_type
10886 +ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info);
10888 #ifdef CONFIG_MAC80211_NOINLINE
10889 #define debug_noinline noinline
10890 --- a/net/mac80211/iface.c
10891 +++ b/net/mac80211/iface.c
10892 @@ -178,7 +178,6 @@ static int ieee80211_do_open(struct net_
10894 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
10895 struct ieee80211_local *local = sdata->local;
10896 - struct sta_info *sta;
10899 u32 hw_reconf_flags = 0;
10900 @@ -290,27 +289,6 @@ static int ieee80211_do_open(struct net_
10902 set_bit(SDATA_STATE_RUNNING, &sdata->state);
10904 - if (sdata->vif.type == NL80211_IFTYPE_WDS) {
10905 - /* Create STA entry for the WDS peer */
10906 - sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
10910 - goto err_del_interface;
10913 - /* no atomic bitop required since STA is not live yet */
10914 - set_sta_flag(sta, WLAN_STA_AUTHORIZED);
10916 - res = sta_info_insert(sta);
10918 - /* STA has been freed */
10919 - goto err_del_interface;
10922 - rate_control_rate_init(sta);
10926 * set_multicast_list will be invoked by the networking core
10927 * which will check whether any increments here were done in
10928 @@ -344,8 +322,7 @@ static int ieee80211_do_open(struct net_
10929 netif_tx_start_all_queues(dev);
10932 - err_del_interface:
10933 - drv_remove_interface(local, &sdata->vif);
10936 if (!local->open_count)
10938 @@ -716,6 +693,70 @@ static void ieee80211_if_setup(struct ne
10939 dev->destructor = free_netdev;
10942 +static void ieee80211_wds_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
10943 + struct sk_buff *skb)
10945 + struct ieee80211_local *local = sdata->local;
10946 + struct ieee80211_rx_status *rx_status;
10947 + struct ieee802_11_elems elems;
10948 + struct ieee80211_mgmt *mgmt;
10949 + struct sta_info *sta;
10953 + bool new = false;
10954 + enum ieee80211_band band = local->hw.conf.channel->band;
10955 + struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
10957 + rx_status = IEEE80211_SKB_RXCB(skb);
10958 + mgmt = (struct ieee80211_mgmt *) skb->data;
10959 + stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE;
10961 + if (stype != IEEE80211_STYPE_BEACON)
10964 + baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
10965 + if (baselen > skb->len)
10968 + ieee802_11_parse_elems(mgmt->u.probe_resp.variable,
10969 + skb->len - baselen, &elems);
10971 + rates = ieee80211_sta_get_rates(local, &elems, band);
10975 + sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
10978 + rcu_read_unlock();
10979 + sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
10987 + sta->last_rx = jiffies;
10988 + sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
10990 + if (elems.ht_cap_elem)
10991 + ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
10992 + elems.ht_cap_elem, &sta->sta.ht_cap);
10994 + if (elems.wmm_param)
10995 + set_sta_flag(sta, WLAN_STA_WME);
10998 + set_sta_flag(sta, WLAN_STA_AUTHORIZED);
10999 + rate_control_rate_init(sta);
11000 + sta_info_insert_rcu(sta);
11003 + rcu_read_unlock();
11006 static void ieee80211_iface_work(struct work_struct *work)
11008 struct ieee80211_sub_if_data *sdata =
11009 @@ -820,6 +861,9 @@ static void ieee80211_iface_work(struct
11011 ieee80211_mesh_rx_queued_mgmt(sdata, skb);
11013 + case NL80211_IFTYPE_WDS:
11014 + ieee80211_wds_rx_queued_mgmt(sdata, skb);
11017 WARN(1, "frame for unexpected interface type");
11019 --- a/net/mac80211/rx.c
11020 +++ b/net/mac80211/rx.c
11021 @@ -2211,7 +2211,9 @@ ieee80211_rx_h_action(struct ieee80211_r
11023 if (sdata->vif.type != NL80211_IFTYPE_STATION &&
11024 sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
11025 - sdata->vif.type != NL80211_IFTYPE_AP)
11026 + sdata->vif.type != NL80211_IFTYPE_AP &&
11027 + sdata->vif.type != NL80211_IFTYPE_ADHOC &&
11028 + sdata->vif.type != NL80211_IFTYPE_WDS)
11031 /* verify action_code is present */
11032 @@ -2426,13 +2428,14 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
11034 if (!ieee80211_vif_is_mesh(&sdata->vif) &&
11035 sdata->vif.type != NL80211_IFTYPE_ADHOC &&
11036 - sdata->vif.type != NL80211_IFTYPE_STATION)
11037 + sdata->vif.type != NL80211_IFTYPE_STATION &&
11038 + sdata->vif.type != NL80211_IFTYPE_WDS)
11039 return RX_DROP_MONITOR;
11042 case cpu_to_le16(IEEE80211_STYPE_BEACON):
11043 case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
11044 - /* process for all: mesh, mlme, ibss */
11045 + /* process for all: mesh, mlme, ibss, wds */
11047 case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
11048 case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
11049 @@ -2775,10 +2778,16 @@ static int prepare_for_handlers(struct i
11052 case NL80211_IFTYPE_WDS:
11053 - if (bssid || !ieee80211_is_data(hdr->frame_control))
11055 if (compare_ether_addr(sdata->u.wds.remote_addr, hdr->addr2))
11058 + if (ieee80211_is_data(hdr->frame_control) ||
11059 + ieee80211_is_action(hdr->frame_control)) {
11060 + if (compare_ether_addr(sdata->vif.addr, hdr->addr1))
11062 + } else if (!ieee80211_is_beacon(hdr->frame_control))
11067 /* should never get here */
11068 --- a/net/mac80211/sta_info.h
11069 +++ b/net/mac80211/sta_info.h
11072 * @WLAN_STA_ASSOC_AP: We're associated to that station, it is an AP.
11073 * @WLAN_STA_WME: Station is a QoS-STA.
11074 - * @WLAN_STA_WDS: Station is one of our WDS peers.
11075 * @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the
11076 * IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
11077 * frame to this station is transmitted.
11078 @@ -61,7 +60,6 @@ enum ieee80211_sta_info_flags {
11079 WLAN_STA_SHORT_PREAMBLE,
11083 WLAN_STA_CLEAR_PS_FILT,
11086 --- a/net/mac80211/status.c
11087 +++ b/net/mac80211/status.c
11088 @@ -429,7 +429,7 @@ void ieee80211_tx_status(struct ieee8021
11090 if (wk->offchan_tx.frame != skb)
11092 - wk->offchan_tx.frame = NULL;
11093 + wk->offchan_tx.status = true;
11097 --- a/net/mac80211/util.c
11098 +++ b/net/mac80211/util.c
11099 @@ -836,23 +836,8 @@ int ieee80211_build_preq_ies(struct ieee
11103 - if (sband->ht_cap.ht_supported) {
11104 - u16 cap = sband->ht_cap.cap;
11107 - *pos++ = WLAN_EID_HT_CAPABILITY;
11108 - *pos++ = sizeof(struct ieee80211_ht_cap);
11109 - memset(pos, 0, sizeof(struct ieee80211_ht_cap));
11110 - tmp = cpu_to_le16(cap);
11111 - memcpy(pos, &tmp, sizeof(u16));
11112 - pos += sizeof(u16);
11113 - *pos++ = sband->ht_cap.ampdu_factor |
11114 - (sband->ht_cap.ampdu_density <<
11115 - IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
11116 - memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
11117 - pos += sizeof(sband->ht_cap.mcs);
11118 - pos += 2 + 4 + 1; /* ext info, BF cap, antsel */
11120 + if (sband->ht_cap.ht_supported)
11121 + pos = ieee80211_ie_build_ht_cap(pos, sband, sband->ht_cap.cap);
11124 * If adding more here, adjust code in main.c
11125 @@ -1443,3 +1428,100 @@ int ieee80211_add_ext_srates_ie(struct i
11130 +u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband,
11135 + *pos++ = WLAN_EID_HT_CAPABILITY;
11136 + *pos++ = sizeof(struct ieee80211_ht_cap);
11137 + memset(pos, 0, sizeof(struct ieee80211_ht_cap));
11139 + /* capability flags */
11140 + tmp = cpu_to_le16(cap);
11141 + memcpy(pos, &tmp, sizeof(u16));
11142 + pos += sizeof(u16);
11144 + /* AMPDU parameters */
11145 + *pos++ = sband->ht_cap.ampdu_factor |
11146 + (sband->ht_cap.ampdu_density <<
11147 + IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
11150 + memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
11151 + pos += sizeof(sband->ht_cap.mcs);
11153 + /* extended capabilities */
11154 + pos += sizeof(__le16);
11156 + /* BF capabilities */
11157 + pos += sizeof(__le32);
11159 + /* antenna selection */
11160 + pos += sizeof(u8);
11165 +u8 *ieee80211_ie_build_ht_info(u8 *pos,
11166 + struct ieee80211_sta_ht_cap *ht_cap,
11167 + struct ieee80211_channel *channel,
11168 + enum nl80211_channel_type channel_type)
11170 + struct ieee80211_ht_info *ht_info;
11171 + /* Build HT Information */
11172 + *pos++ = WLAN_EID_HT_INFORMATION;
11173 + *pos++ = sizeof(struct ieee80211_ht_info);
11174 + ht_info = (struct ieee80211_ht_info *)pos;
11175 + ht_info->control_chan =
11176 + ieee80211_frequency_to_channel(channel->center_freq);
11177 + switch (channel_type) {
11178 + case NL80211_CHAN_HT40MINUS:
11179 + ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
11181 + case NL80211_CHAN_HT40PLUS:
11182 + ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
11184 + case NL80211_CHAN_HT20:
11186 + ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE;
11189 + if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
11190 + ht_info->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
11191 + ht_info->operation_mode = 0x0000;
11192 + ht_info->stbc_param = 0x0000;
11194 + /* It seems that Basic MCS set and Supported MCS set
11195 + are identical for the first 10 bytes */
11196 + memset(&ht_info->basic_set, 0, 16);
11197 + memcpy(&ht_info->basic_set, &ht_cap->mcs, 10);
11199 + return pos + sizeof(struct ieee80211_ht_info);
11202 +enum nl80211_channel_type
11203 +ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info)
11205 + enum nl80211_channel_type channel_type;
11208 + return NL80211_CHAN_NO_HT;
11210 + switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
11211 + case IEEE80211_HT_PARAM_CHA_SEC_NONE:
11212 + channel_type = NL80211_CHAN_HT20;
11214 + case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
11215 + channel_type = NL80211_CHAN_HT40PLUS;
11217 + case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
11218 + channel_type = NL80211_CHAN_HT40MINUS;
11221 + channel_type = NL80211_CHAN_NO_HT;
11224 + return channel_type;
11226 --- a/net/mac80211/work.c
11227 +++ b/net/mac80211/work.c
11228 @@ -118,7 +118,6 @@ static void ieee80211_add_ht_ie(struct s
11230 u32 flags = channel->flags;
11231 u16 cap = sband->ht_cap.cap;
11234 if (!sband->ht_cap.ht_supported)
11236 @@ -169,34 +168,8 @@ static void ieee80211_add_ht_ie(struct s
11239 /* reserve and fill IE */
11241 pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
11242 - *pos++ = WLAN_EID_HT_CAPABILITY;
11243 - *pos++ = sizeof(struct ieee80211_ht_cap);
11244 - memset(pos, 0, sizeof(struct ieee80211_ht_cap));
11246 - /* capability flags */
11247 - tmp = cpu_to_le16(cap);
11248 - memcpy(pos, &tmp, sizeof(u16));
11249 - pos += sizeof(u16);
11251 - /* AMPDU parameters */
11252 - *pos++ = sband->ht_cap.ampdu_factor |
11253 - (sband->ht_cap.ampdu_density <<
11254 - IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
11257 - memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
11258 - pos += sizeof(sband->ht_cap.mcs);
11260 - /* extended capabilities */
11261 - pos += sizeof(__le16);
11263 - /* BF capabilities */
11264 - pos += sizeof(__le32);
11266 - /* antenna selection */
11267 - pos += sizeof(u8);
11268 + ieee80211_ie_build_ht_cap(pos, sband, cap);
11271 static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
11272 @@ -592,7 +565,7 @@ ieee80211_offchannel_tx(struct ieee80211
11274 * After this, offchan_tx.frame remains but now is no
11275 * longer a valid pointer -- we still need it as the
11276 - * cookie for canceling this work.
11277 + * cookie for canceling this work/status matching.
11279 ieee80211_tx_skb(wk->sdata, wk->offchan_tx.frame);
11281 --- a/net/wireless/chan.c
11282 +++ b/net/wireless/chan.c
11283 @@ -44,9 +44,9 @@ rdev_freq_to_chan(struct cfg80211_regist
11287 -static bool can_beacon_sec_chan(struct wiphy *wiphy,
11288 - struct ieee80211_channel *chan,
11289 - enum nl80211_channel_type channel_type)
11290 +bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
11291 + struct ieee80211_channel *chan,
11292 + enum nl80211_channel_type channel_type)
11294 struct ieee80211_channel *sec_chan;
11296 @@ -75,6 +75,7 @@ static bool can_beacon_sec_chan(struct w
11300 +EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan);
11302 int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
11303 struct wireless_dev *wdev, int freq,
11304 @@ -109,8 +110,8 @@ int cfg80211_set_freq(struct cfg80211_re
11305 switch (channel_type) {
11306 case NL80211_CHAN_HT40PLUS:
11307 case NL80211_CHAN_HT40MINUS:
11308 - if (!can_beacon_sec_chan(&rdev->wiphy, chan,
11310 + if (!cfg80211_can_beacon_sec_chan(&rdev->wiphy, chan,
11313 "cfg80211: Secondary channel not "
11314 "allowed to initiate communication\n");
11315 --- a/net/wireless/nl80211.c
11316 +++ b/net/wireless/nl80211.c
11317 @@ -4570,13 +4570,34 @@ static int nl80211_join_ibss(struct sk_b
11318 ibss.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
11321 - ibss.channel = ieee80211_get_channel(wiphy,
11322 - nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]));
11323 + if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) {
11324 + enum nl80211_channel_type channel_type;
11326 + channel_type = nla_get_u32(
11327 + info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]);
11328 + if (channel_type > NL80211_CHAN_HT40PLUS)
11330 + ibss.channel_type = channel_type;
11332 + ibss.channel_type = NL80211_CHAN_NO_HT;
11335 + ibss.channel = rdev_freq_to_chan(rdev,
11336 + nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]),
11337 + ibss.channel_type);
11338 if (!ibss.channel ||
11339 + ibss.channel->flags & IEEE80211_CHAN_RADAR ||
11340 ibss.channel->flags & IEEE80211_CHAN_NO_IBSS ||
11341 ibss.channel->flags & IEEE80211_CHAN_DISABLED)
11344 + /* Both channels should be able to initiate communication */
11345 + if ((ibss.channel_type == NL80211_CHAN_HT40PLUS ||
11346 + ibss.channel_type == NL80211_CHAN_HT40MINUS) &&
11347 + !cfg80211_can_beacon_sec_chan(&rdev->wiphy, ibss.channel,
11348 + ibss.channel_type))
11351 ibss.channel_fixed = !!info->attrs[NL80211_ATTR_FREQ_FIXED];
11352 ibss.privacy = !!info->attrs[NL80211_ATTR_PRIVACY];