Lines Matching +full:0 +full:- +full:4
24 * Copyright (c) 2007-2008 Atheros Communications, Inc.
48 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE_MAX, 0x7f); in carl9170_init_power_cal()
49 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE1, 0x3f3f3f3f); in carl9170_init_power_cal()
50 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE2, 0x3f3f3f3f); in carl9170_init_power_cal()
51 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE3, 0x3f3f3f3f); in carl9170_init_power_cal()
52 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE4, 0x3f3f3f3f); in carl9170_init_power_cal()
53 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE5, 0x3f3f3f3f); in carl9170_init_power_cal()
54 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE6, 0x3f3f3f3f); in carl9170_init_power_cal()
55 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE7, 0x3f3f3f3f); in carl9170_init_power_cal()
56 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE8, 0x3f3f3f3f); in carl9170_init_power_cal()
57 carl9170_regwrite(AR9170_PHY_REG_POWER_TX_RATE9, 0x3f3f3f3f); in carl9170_init_power_cal()
68 { 0x1c5800, 0x00000007, 0x00000007, 0x00000007, 0x00000007, },
69 { 0x1c5804, 0x00000300, 0x000003c4, 0x000003c4, 0x00000300, },
70 { 0x1c5808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
71 { 0x1c580c, 0xad848e19, 0xad848e19, 0xad848e19, 0xad848e19, },
72 { 0x1c5810, 0x7d14e000, 0x7d14e000, 0x7d14e000, 0x7d14e000, },
73 { 0x1c5814, 0x9c0a9f6b, 0x9c0a9f6b, 0x9c0a9f6b, 0x9c0a9f6b, },
74 { 0x1c5818, 0x00000090, 0x00000090, 0x00000090, 0x00000090, },
75 { 0x1c581c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
76 { 0x1c5820, 0x02020200, 0x02020200, 0x02020200, 0x02020200, },
77 { 0x1c5824, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, },
78 { 0x1c5828, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001, },
79 { 0x1c582c, 0x0000a000, 0x0000a000, 0x0000a000, 0x0000a000, },
80 { 0x1c5830, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
81 { 0x1c5834, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, },
82 { 0x1c5838, 0x00000007, 0x00000007, 0x00000007, 0x00000007, },
83 { 0x1c583c, 0x00200400, 0x00200400, 0x00200400, 0x00200400, },
84 { 0x1c5840, 0x206a002e, 0x206a002e, 0x206a002e, 0x206a002e, },
85 { 0x1c5844, 0x1372161e, 0x13721c1e, 0x13721c24, 0x137216a4, },
86 { 0x1c5848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, },
87 { 0x1c584c, 0x1284233c, 0x1284233c, 0x1284233c, 0x1284233c, },
88 { 0x1c5850, 0x6c48b4e4, 0x6d48b4e4, 0x6d48b0e4, 0x6c48b0e4, },
89 { 0x1c5854, 0x00000859, 0x00000859, 0x00000859, 0x00000859, },
90 { 0x1c5858, 0x7ec80d2e, 0x7ec80d2e, 0x7ec80d2e, 0x7ec80d2e, },
91 { 0x1c585c, 0x31395c5e, 0x3139605e, 0x3139605e, 0x31395c5e, },
92 { 0x1c5860, 0x0004dd10, 0x0004dd10, 0x0004dd20, 0x0004dd20, },
93 { 0x1c5864, 0x0001c600, 0x0001c600, 0x0001c600, 0x0001c600, },
94 { 0x1c5868, 0x409a4190, 0x409a4190, 0x409a4190, 0x409a4190, },
95 { 0x1c586c, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081, },
96 { 0x1c5900, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
97 { 0x1c5904, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
98 { 0x1c5908, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
99 { 0x1c590c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
100 { 0x1c5914, 0x000007d0, 0x000007d0, 0x00000898, 0x00000898, },
101 { 0x1c5918, 0x00000118, 0x00000230, 0x00000268, 0x00000134, },
102 { 0x1c591c, 0x10000fff, 0x10000fff, 0x10000fff, 0x10000fff, },
103 { 0x1c5920, 0x0510081c, 0x0510081c, 0x0510001c, 0x0510001c, },
104 { 0x1c5924, 0xd0058a15, 0xd0058a15, 0xd0058a15, 0xd0058a15, },
105 { 0x1c5928, 0x00000001, 0x00000001, 0x00000001, 0x00000001, },
106 { 0x1c592c, 0x00000004, 0x00000004, 0x00000004, 0x00000004, },
107 { 0x1c5934, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
108 { 0x1c5938, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
109 { 0x1c593c, 0x0000007f, 0x0000007f, 0x0000007f, 0x0000007f, },
110 { 0x1c5944, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020, },
111 { 0x1c5948, 0x9280b212, 0x9280b212, 0x9280b212, 0x9280b212, },
112 { 0x1c594c, 0x00020028, 0x00020028, 0x00020028, 0x00020028, },
113 { 0x1c5954, 0x5d50e188, 0x5d50e188, 0x5d50e188, 0x5d50e188, },
114 { 0x1c5958, 0x00081fff, 0x00081fff, 0x00081fff, 0x00081fff, },
115 { 0x1c5960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, },
116 { 0x1c5964, 0x00001120, 0x00001120, 0x00001120, 0x00001120, },
117 { 0x1c5970, 0x190fb515, 0x190fb515, 0x190fb515, 0x190fb515, },
118 { 0x1c5974, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
119 { 0x1c5978, 0x00000001, 0x00000001, 0x00000001, 0x00000001, },
120 { 0x1c597c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
121 { 0x1c5980, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
122 { 0x1c5984, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
123 { 0x1c5988, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
124 { 0x1c598c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
125 { 0x1c5990, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
126 { 0x1c5994, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
127 { 0x1c5998, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
128 { 0x1c599c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
129 { 0x1c59a0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
130 { 0x1c59a4, 0x00000007, 0x00000007, 0x00000007, 0x00000007, },
131 { 0x1c59a8, 0x001fff00, 0x001fff00, 0x001fff00, 0x001fff00, },
132 { 0x1c59ac, 0x006f00c4, 0x006f00c4, 0x006f00c4, 0x006f00c4, },
133 { 0x1c59b0, 0x03051000, 0x03051000, 0x03051000, 0x03051000, },
134 { 0x1c59b4, 0x00000820, 0x00000820, 0x00000820, 0x00000820, },
135 { 0x1c59bc, 0x00181400, 0x00181400, 0x00181400, 0x00181400, },
136 { 0x1c59c0, 0x038919be, 0x038919be, 0x038919be, 0x038919be, },
137 { 0x1c59c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, },
138 { 0x1c59c8, 0x6af6532c, 0x6af6532c, 0x6af6532c, 0x6af6532c, },
139 { 0x1c59cc, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8, },
140 { 0x1c59d0, 0x00046384, 0x00046384, 0x00046384, 0x00046384, },
141 { 0x1c59d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
142 { 0x1c59d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
143 { 0x1c59dc, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
144 { 0x1c59e0, 0x00000200, 0x00000200, 0x00000200, 0x00000200, },
145 { 0x1c59e4, 0x64646464, 0x64646464, 0x64646464, 0x64646464, },
146 { 0x1c59e8, 0x3c787878, 0x3c787878, 0x3c787878, 0x3c787878, },
147 { 0x1c59ec, 0x000000aa, 0x000000aa, 0x000000aa, 0x000000aa, },
148 { 0x1c59f0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
149 { 0x1c59fc, 0x00001042, 0x00001042, 0x00001042, 0x00001042, },
150 { 0x1c5a00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
151 { 0x1c5a04, 0x00000040, 0x00000040, 0x00000040, 0x00000040, },
152 { 0x1c5a08, 0x00000080, 0x00000080, 0x00000080, 0x00000080, },
153 { 0x1c5a0c, 0x000001a1, 0x000001a1, 0x00000141, 0x00000141, },
154 { 0x1c5a10, 0x000001e1, 0x000001e1, 0x00000181, 0x00000181, },
155 { 0x1c5a14, 0x00000021, 0x00000021, 0x000001c1, 0x000001c1, },
156 { 0x1c5a18, 0x00000061, 0x00000061, 0x00000001, 0x00000001, },
157 { 0x1c5a1c, 0x00000168, 0x00000168, 0x00000041, 0x00000041, },
158 { 0x1c5a20, 0x000001a8, 0x000001a8, 0x000001a8, 0x000001a8, },
159 { 0x1c5a24, 0x000001e8, 0x000001e8, 0x000001e8, 0x000001e8, },
160 { 0x1c5a28, 0x00000028, 0x00000028, 0x00000028, 0x00000028, },
161 { 0x1c5a2c, 0x00000068, 0x00000068, 0x00000068, 0x00000068, },
162 { 0x1c5a30, 0x00000189, 0x00000189, 0x000000a8, 0x000000a8, },
163 { 0x1c5a34, 0x000001c9, 0x000001c9, 0x00000169, 0x00000169, },
164 { 0x1c5a38, 0x00000009, 0x00000009, 0x000001a9, 0x000001a9, },
165 { 0x1c5a3c, 0x00000049, 0x00000049, 0x000001e9, 0x000001e9, },
166 { 0x1c5a40, 0x00000089, 0x00000089, 0x00000029, 0x00000029, },
167 { 0x1c5a44, 0x00000170, 0x00000170, 0x00000069, 0x00000069, },
168 { 0x1c5a48, 0x000001b0, 0x000001b0, 0x00000190, 0x00000190, },
169 { 0x1c5a4c, 0x000001f0, 0x000001f0, 0x000001d0, 0x000001d0, },
170 { 0x1c5a50, 0x00000030, 0x00000030, 0x00000010, 0x00000010, },
171 { 0x1c5a54, 0x00000070, 0x00000070, 0x00000050, 0x00000050, },
172 { 0x1c5a58, 0x00000191, 0x00000191, 0x00000090, 0x00000090, },
173 { 0x1c5a5c, 0x000001d1, 0x000001d1, 0x00000151, 0x00000151, },
174 { 0x1c5a60, 0x00000011, 0x00000011, 0x00000191, 0x00000191, },
175 { 0x1c5a64, 0x00000051, 0x00000051, 0x000001d1, 0x000001d1, },
176 { 0x1c5a68, 0x00000091, 0x00000091, 0x00000011, 0x00000011, },
177 { 0x1c5a6c, 0x000001b8, 0x000001b8, 0x00000051, 0x00000051, },
178 { 0x1c5a70, 0x000001f8, 0x000001f8, 0x00000198, 0x00000198, },
179 { 0x1c5a74, 0x00000038, 0x00000038, 0x000001d8, 0x000001d8, },
180 { 0x1c5a78, 0x00000078, 0x00000078, 0x00000018, 0x00000018, },
181 { 0x1c5a7c, 0x00000199, 0x00000199, 0x00000058, 0x00000058, },
182 { 0x1c5a80, 0x000001d9, 0x000001d9, 0x00000098, 0x00000098, },
183 { 0x1c5a84, 0x00000019, 0x00000019, 0x00000159, 0x00000159, },
184 { 0x1c5a88, 0x00000059, 0x00000059, 0x00000199, 0x00000199, },
185 { 0x1c5a8c, 0x00000099, 0x00000099, 0x000001d9, 0x000001d9, },
186 { 0x1c5a90, 0x000000d9, 0x000000d9, 0x00000019, 0x00000019, },
187 { 0x1c5a94, 0x000000f9, 0x000000f9, 0x00000059, 0x00000059, },
188 { 0x1c5a98, 0x000000f9, 0x000000f9, 0x00000099, 0x00000099, },
189 { 0x1c5a9c, 0x000000f9, 0x000000f9, 0x000000d9, 0x000000d9, },
190 { 0x1c5aa0, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
191 { 0x1c5aa4, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
192 { 0x1c5aa8, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
193 { 0x1c5aac, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
194 { 0x1c5ab0, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
195 { 0x1c5ab4, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
196 { 0x1c5ab8, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
197 { 0x1c5abc, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
198 { 0x1c5ac0, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
199 { 0x1c5ac4, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
200 { 0x1c5ac8, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
201 { 0x1c5acc, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
202 { 0x1c5ad0, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
203 { 0x1c5ad4, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
204 { 0x1c5ad8, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
205 { 0x1c5adc, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
206 { 0x1c5ae0, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
207 { 0x1c5ae4, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
208 { 0x1c5ae8, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
209 { 0x1c5aec, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
210 { 0x1c5af0, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
211 { 0x1c5af4, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
212 { 0x1c5af8, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
213 { 0x1c5afc, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, },
214 { 0x1c5b00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
215 { 0x1c5b04, 0x00000001, 0x00000001, 0x00000001, 0x00000001, },
216 { 0x1c5b08, 0x00000002, 0x00000002, 0x00000002, 0x00000002, },
217 { 0x1c5b0c, 0x00000003, 0x00000003, 0x00000003, 0x00000003, },
218 { 0x1c5b10, 0x00000004, 0x00000004, 0x00000004, 0x00000004, },
219 { 0x1c5b14, 0x00000005, 0x00000005, 0x00000005, 0x00000005, },
220 { 0x1c5b18, 0x00000008, 0x00000008, 0x00000008, 0x00000008, },
221 { 0x1c5b1c, 0x00000009, 0x00000009, 0x00000009, 0x00000009, },
222 { 0x1c5b20, 0x0000000a, 0x0000000a, 0x0000000a, 0x0000000a, },
223 { 0x1c5b24, 0x0000000b, 0x0000000b, 0x0000000b, 0x0000000b, },
224 { 0x1c5b28, 0x0000000c, 0x0000000c, 0x0000000c, 0x0000000c, },
225 { 0x1c5b2c, 0x0000000d, 0x0000000d, 0x0000000d, 0x0000000d, },
226 { 0x1c5b30, 0x00000010, 0x00000010, 0x00000010, 0x00000010, },
227 { 0x1c5b34, 0x00000011, 0x00000011, 0x00000011, 0x00000011, },
228 { 0x1c5b38, 0x00000012, 0x00000012, 0x00000012, 0x00000012, },
229 { 0x1c5b3c, 0x00000013, 0x00000013, 0x00000013, 0x00000013, },
230 { 0x1c5b40, 0x00000014, 0x00000014, 0x00000014, 0x00000014, },
231 { 0x1c5b44, 0x00000015, 0x00000015, 0x00000015, 0x00000015, },
232 { 0x1c5b48, 0x00000018, 0x00000018, 0x00000018, 0x00000018, },
233 { 0x1c5b4c, 0x00000019, 0x00000019, 0x00000019, 0x00000019, },
234 { 0x1c5b50, 0x0000001a, 0x0000001a, 0x0000001a, 0x0000001a, },
235 { 0x1c5b54, 0x0000001b, 0x0000001b, 0x0000001b, 0x0000001b, },
236 { 0x1c5b58, 0x0000001c, 0x0000001c, 0x0000001c, 0x0000001c, },
237 { 0x1c5b5c, 0x0000001d, 0x0000001d, 0x0000001d, 0x0000001d, },
238 { 0x1c5b60, 0x00000020, 0x00000020, 0x00000020, 0x00000020, },
239 { 0x1c5b64, 0x00000021, 0x00000021, 0x00000021, 0x00000021, },
240 { 0x1c5b68, 0x00000022, 0x00000022, 0x00000022, 0x00000022, },
241 { 0x1c5b6c, 0x00000023, 0x00000023, 0x00000023, 0x00000023, },
242 { 0x1c5b70, 0x00000024, 0x00000024, 0x00000024, 0x00000024, },
243 { 0x1c5b74, 0x00000025, 0x00000025, 0x00000025, 0x00000025, },
244 { 0x1c5b78, 0x00000028, 0x00000028, 0x00000028, 0x00000028, },
245 { 0x1c5b7c, 0x00000029, 0x00000029, 0x00000029, 0x00000029, },
246 { 0x1c5b80, 0x0000002a, 0x0000002a, 0x0000002a, 0x0000002a, },
247 { 0x1c5b84, 0x0000002b, 0x0000002b, 0x0000002b, 0x0000002b, },
248 { 0x1c5b88, 0x0000002c, 0x0000002c, 0x0000002c, 0x0000002c, },
249 { 0x1c5b8c, 0x0000002d, 0x0000002d, 0x0000002d, 0x0000002d, },
250 { 0x1c5b90, 0x00000030, 0x00000030, 0x00000030, 0x00000030, },
251 { 0x1c5b94, 0x00000031, 0x00000031, 0x00000031, 0x00000031, },
252 { 0x1c5b98, 0x00000032, 0x00000032, 0x00000032, 0x00000032, },
253 { 0x1c5b9c, 0x00000033, 0x00000033, 0x00000033, 0x00000033, },
254 { 0x1c5ba0, 0x00000034, 0x00000034, 0x00000034, 0x00000034, },
255 { 0x1c5ba4, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
256 { 0x1c5ba8, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
257 { 0x1c5bac, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
258 { 0x1c5bb0, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
259 { 0x1c5bb4, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
260 { 0x1c5bb8, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
261 { 0x1c5bbc, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
262 { 0x1c5bc0, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
263 { 0x1c5bc4, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
264 { 0x1c5bc8, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
265 { 0x1c5bcc, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
266 { 0x1c5bd0, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
267 { 0x1c5bd4, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
268 { 0x1c5bd8, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
269 { 0x1c5bdc, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
270 { 0x1c5be0, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
271 { 0x1c5be4, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
272 { 0x1c5be8, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
273 { 0x1c5bec, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
274 { 0x1c5bf0, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
275 { 0x1c5bf4, 0x00000035, 0x00000035, 0x00000035, 0x00000035, },
276 { 0x1c5bf8, 0x00000010, 0x00000010, 0x00000010, 0x00000010, },
277 { 0x1c5bfc, 0x0000001a, 0x0000001a, 0x0000001a, 0x0000001a, },
278 { 0x1c5c00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
279 { 0x1c5c0c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
280 { 0x1c5c10, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
281 { 0x1c5c14, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
282 { 0x1c5c18, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
283 { 0x1c5c1c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
284 { 0x1c5c20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
285 { 0x1c5c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
286 { 0x1c5c28, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
287 { 0x1c5c2c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
288 { 0x1c5c30, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
289 { 0x1c5c34, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
290 { 0x1c5c38, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
291 { 0x1c5c3c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
292 { 0x1c5cf0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
293 { 0x1c5cf4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
294 { 0x1c5cf8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
295 { 0x1c5cfc, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
296 { 0x1c6200, 0x00000008, 0x00000008, 0x0000000e, 0x0000000e, },
297 { 0x1c6204, 0x00000440, 0x00000440, 0x00000440, 0x00000440, },
298 { 0x1c6208, 0xd6be4788, 0xd6be4788, 0xd03e4788, 0xd03e4788, },
299 { 0x1c620c, 0x012e8160, 0x012e8160, 0x012a8160, 0x012a8160, },
300 { 0x1c6210, 0x40806333, 0x40806333, 0x40806333, 0x40806333, },
301 { 0x1c6214, 0x00106c10, 0x00106c10, 0x00106c10, 0x00106c10, },
302 { 0x1c6218, 0x009c4060, 0x009c4060, 0x009c4060, 0x009c4060, },
303 { 0x1c621c, 0x1883800a, 0x1883800a, 0x1883800a, 0x1883800a, },
304 { 0x1c6220, 0x018830c6, 0x018830c6, 0x018830c6, 0x018830c6, },
305 { 0x1c6224, 0x00000400, 0x00000400, 0x00000400, 0x00000400, },
306 { 0x1c6228, 0x000009b5, 0x000009b5, 0x000009b5, 0x000009b5, },
307 { 0x1c622c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
308 { 0x1c6230, 0x00000108, 0x00000210, 0x00000210, 0x00000108, },
309 { 0x1c6234, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
310 { 0x1c6238, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
311 { 0x1c623c, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, },
312 { 0x1c6240, 0x38490a20, 0x38490a20, 0x38490a20, 0x38490a20, },
313 { 0x1c6244, 0x00007bb6, 0x00007bb6, 0x00007bb6, 0x00007bb6, },
314 { 0x1c6248, 0x0fff3ffc, 0x0fff3ffc, 0x0fff3ffc, 0x0fff3ffc, },
315 { 0x1c624c, 0x00000001, 0x00000001, 0x00000001, 0x00000001, },
316 { 0x1c6250, 0x0000a000, 0x0000a000, 0x0000a000, 0x0000a000, },
317 { 0x1c6254, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
318 { 0x1c6258, 0x0cc75380, 0x0cc75380, 0x0cc75380, 0x0cc75380, },
319 { 0x1c625c, 0x0f0f0f01, 0x0f0f0f01, 0x0f0f0f01, 0x0f0f0f01, },
320 { 0x1c6260, 0xdfa91f01, 0xdfa91f01, 0xdfa91f01, 0xdfa91f01, },
321 { 0x1c6264, 0x00418a11, 0x00418a11, 0x00418a11, 0x00418a11, },
322 { 0x1c6268, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
323 { 0x1c626c, 0x09249126, 0x09249126, 0x09249126, 0x09249126, },
324 { 0x1c6274, 0x0a1a9caa, 0x0a1a9caa, 0x0a1a7caa, 0x0a1a7caa, },
325 { 0x1c6278, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, },
326 { 0x1c627c, 0x051701ce, 0x051701ce, 0x051701ce, 0x051701ce, },
327 { 0x1c6300, 0x18010000, 0x18010000, 0x18010000, 0x18010000, },
328 { 0x1c6304, 0x30032602, 0x30032602, 0x2e032402, 0x2e032402, },
329 { 0x1c6308, 0x48073e06, 0x48073e06, 0x4a0a3c06, 0x4a0a3c06, },
330 { 0x1c630c, 0x560b4c0a, 0x560b4c0a, 0x621a540b, 0x621a540b, },
331 { 0x1c6310, 0x641a600f, 0x641a600f, 0x764f6c1b, 0x764f6c1b, },
332 { 0x1c6314, 0x7a4f6e1b, 0x7a4f6e1b, 0x845b7a5a, 0x845b7a5a, },
333 { 0x1c6318, 0x8c5b7e5a, 0x8c5b7e5a, 0x950f8ccf, 0x950f8ccf, },
334 { 0x1c631c, 0x9d0f96cf, 0x9d0f96cf, 0xa5cf9b4f, 0xa5cf9b4f, },
335 { 0x1c6320, 0xb51fa69f, 0xb51fa69f, 0xbddfaf1f, 0xbddfaf1f, },
336 { 0x1c6324, 0xcb3fbd07, 0xcb3fbcbf, 0xd1ffc93f, 0xd1ffc93f, },
337 { 0x1c6328, 0x0000d7bf, 0x0000d7bf, 0x00000000, 0x00000000, },
338 { 0x1c632c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
339 { 0x1c6330, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
340 { 0x1c6334, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
341 { 0x1c6338, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
342 { 0x1c633c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
343 { 0x1c6340, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
344 { 0x1c6344, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
345 { 0x1c6348, 0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, },
346 { 0x1c634c, 0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, },
347 { 0x1c6350, 0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, },
348 { 0x1c6354, 0x0003ffff, 0x0003ffff, 0x0003ffff, 0x0003ffff, },
349 { 0x1c6358, 0x79a8aa1f, 0x79a8aa1f, 0x79a8aa1f, 0x79a8aa1f, },
350 { 0x1c6388, 0x08000000, 0x08000000, 0x08000000, 0x08000000, },
351 { 0x1c638c, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
352 { 0x1c6390, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
353 { 0x1c6394, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, },
354 { 0x1c6398, 0x000001ce, 0x000001ce, 0x000001ce, 0x000001ce, },
355 { 0x1c639c, 0x00000007, 0x00000007, 0x00000007, 0x00000007, },
356 { 0x1c63a0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
357 { 0x1c63a4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
358 { 0x1c63a8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
359 { 0x1c63ac, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
360 { 0x1c63b0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
361 { 0x1c63b4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
362 { 0x1c63b8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
363 { 0x1c63bc, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
364 { 0x1c63c0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
365 { 0x1c63c4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
366 { 0x1c63c8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
367 { 0x1c63cc, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
368 { 0x1c63d0, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
369 { 0x1c63d4, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, 0x3f3f3f3f, },
370 { 0x1c63d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
371 { 0x1c63dc, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, },
372 { 0x1c63e0, 0x000000c0, 0x000000c0, 0x000000c0, 0x000000c0, },
373 { 0x1c6848, 0x00180a65, 0x00180a65, 0x00180a68, 0x00180a68, },
374 { 0x1c6920, 0x0510001c, 0x0510001c, 0x0510001c, 0x0510001c, },
375 { 0x1c6960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, },
376 { 0x1c720c, 0x012e8160, 0x012e8160, 0x012a8160, 0x012a8160, },
377 { 0x1c726c, 0x09249126, 0x09249126, 0x09249126, 0x09249126, },
378 { 0x1c7848, 0x00180a65, 0x00180a65, 0x00180a68, 0x00180a68, },
379 { 0x1c7920, 0x0510001c, 0x0510001c, 0x0510001c, 0x0510001c, },
380 { 0x1c7960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, },
381 { 0x1c820c, 0x012e8160, 0x012e8160, 0x012a8160, 0x012a8160, },
382 { 0x1c826c, 0x09249126, 0x09249126, 0x09249126, 0x09249126, },
383 /* { 0x1c8864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, }, */
384 { 0x1c8864, 0x0001c600, 0x0001c600, 0x0001c600, 0x0001c600, },
385 { 0x1c895c, 0x004b6a8e, 0x004b6a8e, 0x004b6a8e, 0x004b6a8e, },
386 { 0x1c8968, 0x000003ce, 0x000003ce, 0x000003ce, 0x000003ce, },
387 { 0x1c89bc, 0x00181400, 0x00181400, 0x00181400, 0x00181400, },
388 { 0x1c9270, 0x00820820, 0x00820820, 0x00820820, 0x00820820, },
389 { 0x1c935c, 0x066c420f, 0x066c420f, 0x066c420f, 0x066c420f, },
390 { 0x1c9360, 0x0f282207, 0x0f282207, 0x0f282207, 0x0f282207, },
391 { 0x1c9364, 0x17601685, 0x17601685, 0x17601685, 0x17601685, },
392 { 0x1c9368, 0x1f801104, 0x1f801104, 0x1f801104, 0x1f801104, },
393 { 0x1c936c, 0x37a00c03, 0x37a00c03, 0x37a00c03, 0x37a00c03, },
394 { 0x1c9370, 0x3fc40883, 0x3fc40883, 0x3fc40883, 0x3fc40883, },
395 { 0x1c9374, 0x57c00803, 0x57c00803, 0x57c00803, 0x57c00803, },
396 { 0x1c9378, 0x5fd80682, 0x5fd80682, 0x5fd80682, 0x5fd80682, },
397 { 0x1c937c, 0x7fe00482, 0x7fe00482, 0x7fe00482, 0x7fe00482, },
398 { 0x1c9380, 0x7f3c7bba, 0x7f3c7bba, 0x7f3c7bba, 0x7f3c7bba, },
399 { 0x1c9384, 0xf3307ff0, 0xf3307ff0, 0xf3307ff0, 0xf3307ff0, }
404 * for the band and bandwidth given. Return 0 if register address not found.
409 for (i = 0; i < ARRAY_SIZE(ar5416_phy_init); i++) { in carl9170_def_val()
425 return 0; in carl9170_def_val()
436 0x2, 0x2, 0x2, 0x1, 0x2, 0x2, 0x6, 0x2, in carl9170_init_phy_from_eeprom()
437 0x2, 0x3, 0x7, 0x2, 0xb, 0x2, 0x2, 0x2 in carl9170_init_phy_from_eeprom()
440 struct ar9170_eeprom_modal *m = &ar->eeprom.modal_header[is_2ghz]; in carl9170_init_phy_from_eeprom()
445 /* ant common control (index 0) */ in carl9170_init_phy_from_eeprom()
447 le32_to_cpu(m->antCtrlCommon)); in carl9170_init_phy_from_eeprom()
449 /* ant control chain 0 (index 1) */ in carl9170_init_phy_from_eeprom()
451 le32_to_cpu(m->antCtrlChain[0])); in carl9170_init_phy_from_eeprom()
455 le32_to_cpu(m->antCtrlChain[1])); in carl9170_init_phy_from_eeprom()
461 SET_VAL(AR9170_PHY_SETTLING_SWITCH, val, m->switchSettling); in carl9170_init_phy_from_eeprom()
465 /* adcDesired, pdaDesired (index 4) */ in carl9170_init_phy_from_eeprom()
467 SET_VAL(AR9170_PHY_DESIRED_SZ_PGA, val, m->pgaDesiredSize); in carl9170_init_phy_from_eeprom()
468 SET_VAL(AR9170_PHY_DESIRED_SZ_ADC, val, m->adcDesiredSize); in carl9170_init_phy_from_eeprom()
473 SET_VAL(AR9170_PHY_RF_CTL4_TX_END_XPAB_OFF, val, m->txEndToXpaOff); in carl9170_init_phy_from_eeprom()
474 SET_VAL(AR9170_PHY_RF_CTL4_TX_END_XPAA_OFF, val, m->txEndToXpaOff); in carl9170_init_phy_from_eeprom()
475 SET_VAL(AR9170_PHY_RF_CTL4_FRAME_XPAB_ON, val, m->txFrameToXpaOn); in carl9170_init_phy_from_eeprom()
476 SET_VAL(AR9170_PHY_RF_CTL4_FRAME_XPAA_ON, val, m->txFrameToXpaOn); in carl9170_init_phy_from_eeprom()
481 SET_VAL(AR9170_PHY_RF_CTL3_TX_END_TO_A2_RX_ON, val, m->txEndToRxOn); in carl9170_init_phy_from_eeprom()
485 val = carl9170_def_val(0x1c8864, is_2ghz, is_40mhz); in carl9170_init_phy_from_eeprom()
486 val = (val & ~0x7f000) | (m->thresh62 << 12); in carl9170_init_phy_from_eeprom()
487 carl9170_regwrite(0x1c8864, val); in carl9170_init_phy_from_eeprom()
489 /* tx/rx attenuation chain 0 (index 8) */ in carl9170_init_phy_from_eeprom()
491 SET_VAL(AR9170_PHY_RXGAIN_TXRX_ATTEN, val, m->txRxAttenCh[0]); in carl9170_init_phy_from_eeprom()
497 SET_VAL(AR9170_PHY_RXGAIN_TXRX_ATTEN, val, m->txRxAttenCh[1]); in carl9170_init_phy_from_eeprom()
500 /* tx/rx margin chain 0 (index 10) */ in carl9170_init_phy_from_eeprom()
502 SET_VAL(AR9170_PHY_GAIN_2GHZ_RXTX_MARGIN, val, m->rxTxMarginCh[0]); in carl9170_init_phy_from_eeprom()
503 /* bsw margin chain 0 for 5GHz only */ in carl9170_init_phy_from_eeprom()
505 SET_VAL(AR9170_PHY_GAIN_2GHZ_BSW_MARGIN, val, m->bswMargin[0]); in carl9170_init_phy_from_eeprom()
511 SET_VAL(AR9170_PHY_GAIN_2GHZ_RXTX_MARGIN, val, m->rxTxMarginCh[1]); in carl9170_init_phy_from_eeprom()
514 /* iqCall, iqCallq chain 0 (index 12) */ in carl9170_init_phy_from_eeprom()
515 val = carl9170_def_val(AR9170_PHY_REG_TIMING_CTRL4(0), in carl9170_init_phy_from_eeprom()
517 SET_VAL(AR9170_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF, val, m->iqCalICh[0]); in carl9170_init_phy_from_eeprom()
518 SET_VAL(AR9170_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, val, m->iqCalQCh[0]); in carl9170_init_phy_from_eeprom()
519 carl9170_regwrite(AR9170_PHY_REG_TIMING_CTRL4(0), val); in carl9170_init_phy_from_eeprom()
524 SET_VAL(AR9170_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF, val, m->iqCalICh[1]); in carl9170_init_phy_from_eeprom()
525 SET_VAL(AR9170_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, val, m->iqCalQCh[1]); in carl9170_init_phy_from_eeprom()
531 xpd2pd[m->xpdGain & 0xf] & 3); in carl9170_init_phy_from_eeprom()
533 xpd2pd[m->xpdGain & 0xf] >> 2); in carl9170_init_phy_from_eeprom()
536 carl9170_regwrite(AR9170_PHY_REG_RX_CHAINMASK, ar->eeprom.rx_mask); in carl9170_init_phy_from_eeprom()
537 carl9170_regwrite(AR9170_PHY_REG_CAL_CHAINMASK, ar->eeprom.rx_mask); in carl9170_init_phy_from_eeprom()
548 bool is_40mhz = conf_is_ht40(&ar->hw->conf); in carl9170_init_phy()
552 for (i = 0; i < ARRAY_SIZE(ar5416_phy_init); i++) { in carl9170_init_phy()
581 if (!ar->fw.hw_counters) { in carl9170_init_phy()
583 is_2ghz ? 0x5163 : 0x5143); in carl9170_init_phy()
594 /* bank 0 */
595 { 0x1c58b0, 0x1e5795e5, 0x1e5795e5},
596 { 0x1c58e0, 0x02008020, 0x02008020},
598 { 0x1c58b0, 0x02108421, 0x02108421},
599 { 0x1c58ec, 0x00000008, 0x00000008},
601 { 0x1c58b0, 0x0e73ff17, 0x0e73ff17},
602 { 0x1c58e0, 0x00000420, 0x00000420},
604 { 0x1c58f0, 0x01400018, 0x01c00018},
605 /* bank 4 */
606 { 0x1c58b0, 0x000001a1, 0x000001a1},
607 { 0x1c58e8, 0x00000001, 0x00000001},
609 { 0x1c58b0, 0x00000013, 0x00000013},
610 { 0x1c58e4, 0x00000002, 0x00000002},
612 { 0x1c58b0, 0x00000000, 0x00000000},
613 { 0x1c58b0, 0x00000000, 0x00000000},
614 { 0x1c58b0, 0x00000000, 0x00000000},
615 { 0x1c58b0, 0x00000000, 0x00000000},
616 { 0x1c58b0, 0x00000000, 0x00000000},
617 { 0x1c58b0, 0x00004000, 0x00004000},
618 { 0x1c58b0, 0x00006c00, 0x00006c00},
619 { 0x1c58b0, 0x00002c00, 0x00002c00},
620 { 0x1c58b0, 0x00004800, 0x00004800},
621 { 0x1c58b0, 0x00004000, 0x00004000},
622 { 0x1c58b0, 0x00006000, 0x00006000},
623 { 0x1c58b0, 0x00001000, 0x00001000},
624 { 0x1c58b0, 0x00004000, 0x00004000},
625 { 0x1c58b0, 0x00007c00, 0x00007c00},
626 { 0x1c58b0, 0x00007c00, 0x00007c00},
627 { 0x1c58b0, 0x00007c00, 0x00007c00},
628 { 0x1c58b0, 0x00007c00, 0x00007c00},
629 { 0x1c58b0, 0x00007c00, 0x00007c00},
630 { 0x1c58b0, 0x00087c00, 0x00087c00},
631 { 0x1c58b0, 0x00007c00, 0x00007c00},
632 { 0x1c58b0, 0x00005400, 0x00005400},
633 { 0x1c58b0, 0x00000c00, 0x00000c00},
634 { 0x1c58b0, 0x00001800, 0x00001800},
635 { 0x1c58b0, 0x00007c00, 0x00007c00},
636 { 0x1c58b0, 0x00006c00, 0x00006c00},
637 { 0x1c58b0, 0x00006c00, 0x00006c00},
638 { 0x1c58b0, 0x00007c00, 0x00007c00},
639 { 0x1c58b0, 0x00002c00, 0x00002c00},
640 { 0x1c58b0, 0x00003c00, 0x00003c00},
641 { 0x1c58b0, 0x00003800, 0x00003800},
642 { 0x1c58b0, 0x00001c00, 0x00001c00},
643 { 0x1c58b0, 0x00000800, 0x00000800},
644 { 0x1c58b0, 0x00000408, 0x00000408},
645 { 0x1c58b0, 0x00004c15, 0x00004c15},
646 { 0x1c58b0, 0x00004188, 0x00004188},
647 { 0x1c58b0, 0x0000201e, 0x0000201e},
648 { 0x1c58b0, 0x00010408, 0x00010408},
649 { 0x1c58b0, 0x00000801, 0x00000801},
650 { 0x1c58b0, 0x00000c08, 0x00000c08},
651 { 0x1c58b0, 0x0000181e, 0x0000181e},
652 { 0x1c58b0, 0x00001016, 0x00001016},
653 { 0x1c58b0, 0x00002800, 0x00002800},
654 { 0x1c58b0, 0x00004010, 0x00004010},
655 { 0x1c58b0, 0x0000081c, 0x0000081c},
656 { 0x1c58b0, 0x00000115, 0x00000115},
657 { 0x1c58b0, 0x00000015, 0x00000015},
658 { 0x1c58b0, 0x00000066, 0x00000066},
659 { 0x1c58b0, 0x0000001c, 0x0000001c},
660 { 0x1c58b0, 0x00000000, 0x00000000},
661 { 0x1c58b0, 0x00000004, 0x00000004},
662 { 0x1c58b0, 0x00000015, 0x00000015},
663 { 0x1c58b0, 0x0000001f, 0x0000001f},
664 { 0x1c58e0, 0x00000000, 0x00000400},
666 { 0x1c58b0, 0x000000a0, 0x000000a0},
667 { 0x1c58b0, 0x00000000, 0x00000000},
668 { 0x1c58b0, 0x00000040, 0x00000040},
669 { 0x1c58f0, 0x0000001c, 0x0000001c},
678 for (i = 0; i < ARRAY_SIZE(carl9170_rf_initval); i++) in carl9170_init_rf_banks_0_7()
686 wiphy_err(ar->hw->wiphy, "rf init failed\n"); in carl9170_init_rf_banks_0_7()
790 { 4, 21313, 4, 19181, },
791 { 4, 21356, 4, 19220, },
792 { 4, 21269, 4, 19142, },
795 { 4, 21226, 4, 19104, },
796 { 4, 21269, 4, 19142, },
797 { 4, 21183, 4, 19065, },
800 { 4, 21141, 4, 19027, },
801 { 4, 21183, 4, 19065, },
802 { 4, 21098, 4, 18988, },
805 { 4, 21056, 4, 18950, },
806 { 4, 21098, 4, 18988, },
807 { 4, 21014, 4, 18912, },
810 { 4, 20805, 4, 18725, },
811 { 4, 20846, 4, 18762, },
812 { 4, 20764, 4, 18687, },
815 { 4, 20723, 4, 18651, },
816 { 4, 20764, 4, 18687, },
817 { 4, 20682, 4, 18614, },
820 { 4, 20641, 4, 18577, },
821 { 4, 20682, 4, 18614, },
822 { 4, 20601, 4, 18541, },
825 { 4, 20243, 4, 18219, },
826 { 4, 20282, 4, 18254, },
827 { 4, 20204, 4, 18183, },
830 { 4, 20165, 4, 18148, },
831 { 4, 20204, 4, 18183, },
832 { 4, 20126, 4, 18114, },
835 { 4, 20088, 4, 18079, },
836 { 4, 20126, 4, 18114, },
837 { 4, 20049, 4, 18044, },
840 { 4, 20011, 4, 18010, },
841 { 4, 20049, 4, 18044, },
842 { 4, 19973, 4, 17976, },
845 { 4, 19935, 4, 17941, },
846 { 4, 19973, 4, 17976, },
847 { 4, 19897, 4, 17907, },
850 { 4, 19859, 4, 17873, },
851 { 4, 19897, 4, 17907, },
852 { 4, 19822, 4, 17840, },
855 { 4, 19784, 4, 17806, },
856 { 4, 19822, 4, 17840, },
857 { 4, 19747, 4, 17772, },
860 { 4, 19710, 4, 17739, },
861 { 4, 19747, 4, 17772, },
862 { 4, 19673, 4, 17706, },
865 { 4, 19065, 4, 17159, },
866 { 4, 19100, 4, 17190, },
867 { 4, 19030, 4, 17127, },
870 { 4, 18996, 4, 17096, },
871 { 4, 19030, 4, 17127, },
872 { 4, 18962, 4, 17065, },
875 { 4, 18927, 4, 17035, },
876 { 4, 18962, 4, 17065, },
877 { 4, 18893, 4, 17004, },
880 { 4, 18859, 4, 16973, },
881 { 4, 18893, 4, 17004, },
882 { 4, 18825, 4, 16943, },
885 { 4, 18792, 4, 16913, },
886 { 4, 18825, 4, 16943, },
887 { 4, 18758, 4, 16882, },
890 { 4, 18725, 4, 16852, },
891 { 4, 18758, 4, 16882, },
892 { 4, 18691, 4, 16822, },
895 { 4, 18658, 4, 16792, },
896 { 4, 18691, 4, 16822, },
897 { 4, 18625, 4, 16762, },
900 { 4, 18592, 4, 16733, },
901 { 4, 18625, 4, 16762, },
902 { 4, 18559, 4, 16703, },
905 { 4, 18526, 4, 16673, },
906 { 4, 18559, 4, 16703, },
907 { 4, 18493, 4, 16644, },
910 { 4, 18461, 4, 16615, },
911 { 4, 18493, 4, 16644, },
912 { 4, 18428, 4, 16586, },
915 { 4, 18396, 4, 16556, },
916 { 4, 18428, 4, 16586, },
917 { 4, 18364, 4, 16527, },
920 { 4, 18252, 4, 16427, },
921 { 4, 18284, 4, 16455, },
922 { 4, 18220, 4, 16398, },
925 { 4, 18189, 5, 32740, },
926 { 4, 18220, 4, 16398, },
927 { 4, 18157, 5, 32683, },
930 { 4, 18126, 5, 32626, },
931 { 4, 18157, 5, 32683, },
932 { 4, 18094, 5, 32570, },
935 { 4, 18063, 5, 32514, },
936 { 4, 18094, 5, 32570, },
937 { 4, 18032, 5, 32458, },
940 { 4, 18001, 5, 32402, },
941 { 4, 18032, 5, 32458, },
942 { 4, 17970, 5, 32347, },
945 { 4, 20282, 4, 18254, },
946 { 4, 20321, 4, 18289, },
947 { 4, 20243, 4, 18219, },
950 { 4, 20204, 4, 18183, },
951 { 4, 20243, 4, 18219, },
952 { 4, 20165, 4, 18148, },
955 { 4, 20126, 4, 18114, },
956 { 4, 20165, 4, 18148, },
957 { 4, 20088, 4, 18079, },
960 { 4, 20049, 4, 18044, },
961 { 4, 20088, 4, 18079, },
962 { 4, 20011, 4, 18010, },
972 u8 refsel0 = 1, refsel1 = 0; in carl9170_init_rf_bank4_pwr()
973 u8 lf_synth = 0; in carl9170_init_rf_bank4_pwr()
980 freq -= 10; in carl9170_init_rf_bank4_pwr()
986 return -ENOSYS; in carl9170_init_rf_bank4_pwr()
991 chansel = (freq - 4800) / 5; in carl9170_init_rf_bank4_pwr()
993 chansel = ((freq - 4800) / 10) * 2; in carl9170_init_rf_bank4_pwr()
994 refsel0 = 0; in carl9170_init_rf_bank4_pwr()
1000 chansel = 10 + (freq - 2274) / 5; in carl9170_init_rf_bank4_pwr()
1003 chansel = 16 + (freq - 2272) / 5; in carl9170_init_rf_bank4_pwr()
1004 chansel *= 4; in carl9170_init_rf_bank4_pwr()
1009 d0 = 0x21 | in carl9170_init_rf_bank4_pwr()
1013 td0 = d0 & 0x1f; in carl9170_init_rf_bank4_pwr()
1014 td1 = d1 & 0x1f; in carl9170_init_rf_bank4_pwr()
1017 td0 = (d0 >> 5) & 0x7; in carl9170_init_rf_bank4_pwr()
1018 td1 = (d1 >> 5) & 0x7; in carl9170_init_rf_bank4_pwr()
1023 carl9170_regwrite(0x1c58b0, fd0); in carl9170_init_rf_bank4_pwr()
1024 carl9170_regwrite(0x1c58e8, fd1); in carl9170_init_rf_bank4_pwr()
1031 return 0; in carl9170_init_rf_bank4_pwr()
1038 unsigned int chanidx = 0; in carl9170_get_hw_dyn_params()
1042 chanidx = channel->hw_value; in carl9170_get_hw_dyn_params()
1043 freq = channel->center_freq; in carl9170_get_hw_dyn_params()
1057 int idx = nfreqs - 2; in carl9170_find_freq_idx()
1059 while (idx >= 0) { in carl9170_find_freq_idx()
1062 idx--; in carl9170_find_freq_idx()
1065 return 0; in carl9170_find_freq_idx()
1084 return y1 + (((y2 - y1) * (x - x1)) / (x2 - x1)); in carl9170_interpolate_s32()
1100 return (y >> SHIFT) + ((y & (1 << (SHIFT - 1))) >> (SHIFT - 1)); in carl9170_interpolate_u8()
1108 for (i = 0; i < 3; i++) { in carl9170_interpolate_val()
1124 u32 phy_data = 0; in carl9170_set_freq_cal_data()
1127 switch (channel->band) { in carl9170_set_freq_cal_data()
1129 f = channel->center_freq - 2300; in carl9170_set_freq_cal_data()
1130 cal_freq_pier = ar->eeprom.cal_freq_pier_2G; in carl9170_set_freq_cal_data()
1131 i = AR5416_NUM_2G_CAL_PIERS - 1; in carl9170_set_freq_cal_data()
1135 f = (channel->center_freq - 4800) / 5; in carl9170_set_freq_cal_data()
1136 cal_freq_pier = ar->eeprom.cal_freq_pier_5G; in carl9170_set_freq_cal_data()
1137 i = AR5416_NUM_5G_CAL_PIERS - 1; in carl9170_set_freq_cal_data()
1141 return -EINVAL; in carl9170_set_freq_cal_data()
1144 for (; i >= 0; i--) { in carl9170_set_freq_cal_data()
1145 if (cal_freq_pier[i] != 0xff) in carl9170_set_freq_cal_data()
1148 if (i < 0) in carl9170_set_freq_cal_data()
1149 return -EINVAL; in carl9170_set_freq_cal_data()
1155 for (chain = 0; chain < AR5416_MAX_CHAINS; chain++) { in carl9170_set_freq_cal_data()
1156 for (i = 0; i < AR5416_PD_GAIN_ICEPTS; i++) { in carl9170_set_freq_cal_data()
1160 switch (channel->band) { in carl9170_set_freq_cal_data()
1162 cal_pier_data = &ar->eeprom. in carl9170_set_freq_cal_data()
1167 cal_pier_data = &ar->eeprom. in carl9170_set_freq_cal_data()
1172 return -EINVAL; in carl9170_set_freq_cal_data()
1175 for (j = 0; j < 2; j++) { in carl9170_set_freq_cal_data()
1178 cal_pier_data->vpd_pdg[j][i], in carl9170_set_freq_cal_data()
1184 cal_pier_data->pwr_pdg[j][i], in carl9170_set_freq_cal_data()
1190 for (i = 0; i < 76; i++) { in carl9170_set_freq_cal_data()
1192 tmp = carl9170_interpolate_val(i, &pwrs[0][0], in carl9170_set_freq_cal_data()
1193 &vpds[0][0]); in carl9170_set_freq_cal_data()
1195 tmp = carl9170_interpolate_val(i - 12, in carl9170_set_freq_cal_data()
1196 &pwrs[1][0], in carl9170_set_freq_cal_data()
1197 &vpds[1][0]); in carl9170_set_freq_cal_data()
1202 carl9170_regwrite(0x1c6280 + chain * 0x1000 + in carl9170_set_freq_cal_data()
1204 phy_data = 0; in carl9170_set_freq_cal_data()
1209 carl9170_regwrite(0x1c6280 + chain * 0x1000 + (i << 2), in carl9170_set_freq_cal_data()
1210 0x0); in carl9170_set_freq_cal_data()
1224 f = freq - 2300; in carl9170_get_max_edge_power()
1226 f = (freq - 4800) / 5; in carl9170_get_max_edge_power()
1228 for (i = 0; i < AR5416_NUM_BAND_EDGES; i++) { in carl9170_get_max_edge_power()
1229 if (edges[i].channel == 0xff) in carl9170_get_max_edge_power()
1236 if (i > 0 && f < edges[i].channel) { in carl9170_get_max_edge_power()
1237 if (f > edges[i - 1].channel && in carl9170_get_max_edge_power()
1238 edges[i - 1].power_flags & in carl9170_get_max_edge_power()
1241 rc = edges[i - 1].power_flags & in carl9170_get_max_edge_power()
1249 if (f > edges[i - 1].channel && in carl9170_get_max_edge_power()
1250 edges[i - 1].power_flags & AR9170_CALCTL_EDGE_FLAGS) { in carl9170_get_max_edge_power()
1252 rc = edges[i - 1].power_flags & in carl9170_get_max_edge_power()
1264 u8 rc = 0; in carl9170_get_heavy_clip()
1267 f = freq - 2300; in carl9170_get_heavy_clip()
1269 f = (freq - 4800) / 5; in carl9170_get_heavy_clip()
1272 rc |= 0xf0; in carl9170_get_heavy_clip()
1274 for (i = 0; i < AR5416_NUM_BAND_EDGES; i++) { in carl9170_get_heavy_clip()
1275 if (edges[i].channel == 0xff) in carl9170_get_heavy_clip()
1279 rc |= 0x0f; in carl9170_get_heavy_clip()
1289 * and apply them to ar->power* (derived from otus hal/hpmain.c, line 3706)
1308 { CTL_11B, 0, ar->power_2G_cck, 4 }, in carl9170_calc_ctl()
1309 { CTL_11G, 0, ar->power_2G_ofdm, 4 }, in carl9170_calc_ctl()
1310 { CTL_2GHT20, 0, ar->power_2G_ht20, 8 }, in carl9170_calc_ctl()
1311 { CTL_2GHT40, 0, ar->power_2G_ht40, 8 }, in carl9170_calc_ctl()
1314 { CTL_11A, 0, ar->power_5G_leg, 4 }, in carl9170_calc_ctl()
1315 { CTL_5GHT20, 0, ar->power_5G_ht20, 8 }, in carl9170_calc_ctl()
1316 { CTL_5GHT40, 0, ar->power_5G_ht40, 8 }, in carl9170_calc_ctl()
1320 #define EDGES(c, n) (ar->eeprom.ctl_data[c].control_edges[n]) in carl9170_calc_ctl()
1322 ar->heavy_clip = 0; in carl9170_calc_ctl()
1327 * ath/regd.c::ath_regd_get_band_ctl() - in carl9170_calc_ctl()
1332 ctl_grp = ath_regd_get_band_ctl(&ar->common.regulatory, in carl9170_calc_ctl()
1333 ar->hw->conf.chandef.chan->band); in carl9170_calc_ctl()
1335 /* ctl group not found - either invalid band (NO_CTL) or ww roaming */ in carl9170_calc_ctl()
1343 if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) { in carl9170_calc_ctl()
1351 for (i = 0; i < nr_modes; i++) { in carl9170_calc_ctl()
1353 for (ctl_idx = 0; ctl_idx < AR5416_NUM_CTLS; ctl_idx++) in carl9170_calc_ctl()
1354 if (c == ar->eeprom.ctl_index[ctl_idx]) in carl9170_calc_ctl()
1357 int f_off = 0; in carl9170_calc_ctl()
1364 ar->heavy_clip = in carl9170_calc_ctl()
1373 f_off = -10; in carl9170_calc_ctl()
1398 while (k-- > 0) { in carl9170_calc_ctl()
1407 /* apply max power to pwr_cal_data (ar->power_*) */ in carl9170_calc_ctl()
1408 for (j = 0; j < modes[i].pwr_cal_len; j++) { in carl9170_calc_ctl()
1414 if (ar->heavy_clip & 0xf0) { in carl9170_calc_ctl()
1415 ar->power_2G_ht40[0]--; in carl9170_calc_ctl()
1416 ar->power_2G_ht40[1]--; in carl9170_calc_ctl()
1417 ar->power_2G_ht40[2]--; in carl9170_calc_ctl()
1419 if (ar->heavy_clip & 0xf) { in carl9170_calc_ctl()
1420 ar->power_2G_ht20[0]++; in carl9170_calc_ctl()
1421 ar->power_2G_ht20[1]++; in carl9170_calc_ctl()
1422 ar->power_2G_ht20[2]++; in carl9170_calc_ctl()
1440 f = freq - 2300; in carl9170_set_power_cal()
1442 f = (freq - 4800) / 5; in carl9170_set_power_cal()
1449 for (i = 0; i < 3; i++) { in carl9170_set_power_cal()
1451 case 0: /* 5 GHz legacy */ in carl9170_set_power_cal()
1452 ctpl = &ar->eeprom.cal_tgt_pwr_5G[0]; in carl9170_set_power_cal()
1454 ctpres = ar->power_5G_leg; in carl9170_set_power_cal()
1457 ctpl = &ar->eeprom.cal_tgt_pwr_2G_cck[0]; in carl9170_set_power_cal()
1459 ctpres = ar->power_2G_cck; in carl9170_set_power_cal()
1462 ctpl = &ar->eeprom.cal_tgt_pwr_2G_ofdm[0]; in carl9170_set_power_cal()
1464 ctpres = ar->power_2G_ofdm; in carl9170_set_power_cal()
1470 for (n = 0; n < ntargets; n++) { in carl9170_set_power_cal()
1471 if (ctpl[n].freq == 0xff) in carl9170_set_power_cal()
1477 for (n = 0; n < 4; n++) in carl9170_set_power_cal()
1479 ctpl[idx + 0].freq, ctpl[idx + 0].power[n], in carl9170_set_power_cal()
1484 for (i = 0; i < 4; i++) { in carl9170_set_power_cal()
1486 case 0: /* 5 GHz HT 20 */ in carl9170_set_power_cal()
1487 ctph = &ar->eeprom.cal_tgt_pwr_5G_ht20[0]; in carl9170_set_power_cal()
1489 ctpres = ar->power_5G_ht20; in carl9170_set_power_cal()
1492 ctph = &ar->eeprom.cal_tgt_pwr_5G_ht40[0]; in carl9170_set_power_cal()
1494 ctpres = ar->power_5G_ht40; in carl9170_set_power_cal()
1497 ctph = &ar->eeprom.cal_tgt_pwr_2G_ht20[0]; in carl9170_set_power_cal()
1499 ctpres = ar->power_2G_ht20; in carl9170_set_power_cal()
1502 ctph = &ar->eeprom.cal_tgt_pwr_2G_ht40[0]; in carl9170_set_power_cal()
1504 ctpres = ar->power_2G_ht40; in carl9170_set_power_cal()
1510 for (n = 0; n < ntargets; n++) { in carl9170_set_power_cal()
1511 if (ctph[n].freq == 0xff) in carl9170_set_power_cal()
1517 for (n = 0; n < 8; n++) in carl9170_set_power_cal()
1519 ctph[idx + 0].freq, ctph[idx + 0].power[n], in carl9170_set_power_cal()
1523 /* calc. conformance test limits and apply to ar->power*[] */ in carl9170_set_power_cal()
1535 BUILD_BUG_ON(ARRAY_SIZE(phy_regs) != ARRAY_SIZE(ar->noise)); in carl9170_get_noisefloor()
1541 for (i = 0; i < 2; i++) { in carl9170_get_noisefloor()
1542 ar->noise[i] = sign_extend32(GET_VAL( in carl9170_get_noisefloor()
1545 ar->noise[i + 2] = sign_extend32(GET_VAL( in carl9170_get_noisefloor()
1549 if (ar->channel) in carl9170_get_noisefloor()
1550 ar->survey[ar->channel->hw_value].noise = ar->noise[0]; in carl9170_get_noisefloor()
1552 return 0; in carl9170_get_noisefloor()
1576 u32 tmp, offs = 0, new_ht = 0; in carl9170_set_channel()
1583 if (conf_is_ht(&ar->hw->conf)) in carl9170_set_channel()
1586 if (conf_is_ht40(&ar->hw->conf)) in carl9170_set_channel()
1590 if (ar->channel) { in carl9170_set_channel()
1591 old_channel = ar->channel; in carl9170_set_channel()
1592 ar->channel = NULL; in carl9170_set_channel()
1601 err = carl9170_write_reg(ar, AR9170_PWR_REG_RESET, 0x0); in carl9170_set_channel()
1605 err = carl9170_init_phy(ar, channel->band); in carl9170_set_channel()
1610 channel->band == NL80211_BAND_5GHZ); in carl9170_set_channel()
1614 err = carl9170_exec_cmd(ar, CARL9170_CMD_FREQ_START, 0, NULL, 0, NULL); in carl9170_set_channel()
1619 0x200); in carl9170_set_channel()
1624 channel->band == NL80211_BAND_5GHZ, in carl9170_set_channel()
1625 channel->center_freq, bw); in carl9170_set_channel()
1648 return -ENOSYS; in carl9170_set_channel()
1651 if (ar->eeprom.tx_mask != 1) in carl9170_set_channel()
1662 carl9170_set_power_cal(ar, channel->center_freq, bw); in carl9170_set_channel()
1671 if (conf_is_ht40(&ar->hw->conf)) in carl9170_set_channel()
1674 rf.freq = cpu_to_le32(channel->center_freq * 1000); in carl9170_set_channel()
1675 rf.delta_slope_coeff_exp = cpu_to_le32(freqpar->coeff_exp); in carl9170_set_channel()
1676 rf.delta_slope_coeff_man = cpu_to_le32(freqpar->coeff_man); in carl9170_set_channel()
1677 rf.delta_slope_coeff_exp_shgi = cpu_to_le32(freqpar->coeff_exp_shgi); in carl9170_set_channel()
1678 rf.delta_slope_coeff_man_shgi = cpu_to_le32(freqpar->coeff_man_shgi); in carl9170_set_channel()
1686 if (err != 0) { in carl9170_set_channel()
1687 ar->chan_fail++; in carl9170_set_channel()
1688 ar->total_chan_fail++; in carl9170_set_channel()
1690 wiphy_err(ar->hw->wiphy, "channel change: %d -> %d " in carl9170_set_channel()
1692 old_channel->center_freq : -1, channel->center_freq, in carl9170_set_channel()
1695 if (ar->chan_fail > 3) { in carl9170_set_channel()
1703 return 0; in carl9170_set_channel()
1710 ar->chan_fail = 0; in carl9170_set_channel()
1713 if (ar->heavy_clip) { in carl9170_set_channel()
1715 0x200 | ar->heavy_clip); in carl9170_set_channel()
1718 wiphy_err(ar->hw->wiphy, "failed to set " in carl9170_set_channel()
1726 ar->channel = channel; in carl9170_set_channel()
1727 ar->ht_settings = new_ht; in carl9170_set_channel()
1728 return 0; in carl9170_set_channel()