aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-09-12 04:24:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-15 15:00:50 -0400
commit5effb73c529c5d66eecd541d30470b11cc58c64f (patch)
tree6a3ef57161b3f1c311d2d21a7c34df0994142820
parent1f21de53ac8651b1a3e79576f1adf00aabecd052 (diff)
b43: HT-PHY: Update values for frequency calibration
Previous values were extracted from MMIO dump of some old 5.x driver, new ones should improve calibration. This also adds values for 5 GHz. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/radio_2059.c314
1 files changed, 248 insertions, 66 deletions
diff --git a/drivers/net/wireless/b43/radio_2059.c b/drivers/net/wireless/b43/radio_2059.c
index b2a53b233704..a3cf9efd7e21 100644
--- a/drivers/net/wireless/b43/radio_2059.c
+++ b/drivers/net/wireless/b43/radio_2059.c
@@ -65,73 +65,87 @@ static u16 r2059_phy_rev1_init[][2] = {
65 .phy_regs.bw5 = r4, \ 65 .phy_regs.bw5 = r4, \
66 .phy_regs.bw6 = r5 66 .phy_regs.bw6 = r5
67 67
68/* Extracted from MMIO dump of 6.30.223.141
69 * TODO: Values for channels 12 & 13 are outdated (from some old 5.x driver)!
70 */
68static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = { 71static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = {
69 { .freq = 2412, 72 {
70 RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c, 73 .freq = 2412,
71 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03, 74 RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c,
72 0x00, 0x00, 0x00, 0xf0, 0x00), 75 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x73,
73 PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443), 76 0x00, 0x00, 0x00, 0xd0, 0x00),
74 }, 77 PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
75 { .freq = 2417, 78 },
76 RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71, 79 {
77 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03, 80 .freq = 2417,
78 0x00, 0x00, 0x00, 0xf0, 0x00), 81 RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71,
79 PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441), 82 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x73,
80 }, 83 0x00, 0x00, 0x00, 0xd0, 0x00),
81 { .freq = 2422, 84 PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
82 RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76, 85 },
83 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03, 86 {
84 0x00, 0x00, 0x00, 0xf0, 0x00), 87 .freq = 2422,
85 PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f), 88 RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76,
86 }, 89 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x73,
87 { .freq = 2427, 90 0x00, 0x00, 0x00, 0xd0, 0x00),
88 RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b, 91 PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
89 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03, 92 },
90 0x00, 0x00, 0x00, 0xf0, 0x00), 93 {
91 PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d), 94 .freq = 2427,
92 }, 95 RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b,
93 { .freq = 2432, 96 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x73,
94 RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80, 97 0x00, 0x00, 0x00, 0xa0, 0x00),
95 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03, 98 PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
96 0x00, 0x00, 0x00, 0xf0, 0x00), 99 },
97 PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a), 100 {
98 }, 101 .freq = 2432,
99 { .freq = 2437, 102 RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80,
100 RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85, 103 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x73,
101 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03, 104 0x00, 0x00, 0x00, 0xa0, 0x00),
102 0x00, 0x00, 0x00, 0xf0, 0x00), 105 PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
103 PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438), 106 },
104 }, 107 {
105 { .freq = 2442, 108 .freq = 2437,
106 RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a, 109 RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85,
107 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03, 110 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x73,
108 0x00, 0x00, 0x00, 0xf0, 0x00), 111 0x00, 0x00, 0x00, 0xa0, 0x00),
109 PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436), 112 PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
110 }, 113 },
111 { .freq = 2447, 114 {
112 RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f, 115 .freq = 2442,
113 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03, 116 RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a,
114 0x00, 0x00, 0x00, 0xf0, 0x00), 117 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x73,
115 PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434), 118 0x00, 0x00, 0x00, 0x80, 0x00),
116 }, 119 PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
117 { .freq = 2452, 120 },
118 RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94, 121 {
119 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03, 122 .freq = 2447,
120 0x00, 0x00, 0x00, 0xf0, 0x00), 123 RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f,
121 PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431), 124 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x73,
122 }, 125 0x00, 0x00, 0x00, 0x80, 0x00),
123 { .freq = 2457, 126 PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
124 RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99, 127 },
125 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03, 128 {
126 0x00, 0x00, 0x00, 0xf0, 0x00), 129 .freq = 2452,
127 PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f), 130 RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94,
128 }, 131 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x73,
129 { .freq = 2462, 132 0x00, 0x00, 0x00, 0x80, 0x00),
130 RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e, 133 PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
131 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03, 134 },
132 0x00, 0x00, 0x00, 0xf0, 0x00), 135 {
133 PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d), 136 .freq = 2457,
134 }, 137 RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99,
138 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x73,
139 0x00, 0x00, 0x00, 0x60, 0x00),
140 PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
141 },
142 {
143 .freq = 2462,
144 RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e,
145 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x73,
146 0x00, 0x00, 0x00, 0x60, 0x00),
147 PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
148 },
135 { .freq = 2467, 149 { .freq = 2467,
136 RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3, 150 RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3,
137 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03, 151 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
@@ -144,6 +158,174 @@ static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radi
144 0x00, 0x00, 0x00, 0xf0, 0x00), 158 0x00, 0x00, 0x00, 0xf0, 0x00),
145 PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429), 159 PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
146 }, 160 },
161 {
162 .freq = 5180,
163 RADIOREGS(0xbe, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x06,
164 0x02, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
165 0x0f, 0x4f, 0xa3, 0x00, 0xfc),
166 PHYREGS(0x081c, 0x0818, 0x0814, 0x01f9, 0x01fa, 0x01fb),
167 },
168 {
169 .freq = 5200,
170 RADIOREGS(0xc5, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x08,
171 0x02, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
172 0x0f, 0x4f, 0x93, 0x00, 0xfb),
173 PHYREGS(0x0824, 0x0820, 0x081c, 0x01f7, 0x01f8, 0x01f9),
174 },
175 {
176 .freq = 5220,
177 RADIOREGS(0xcc, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x0a,
178 0x02, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
179 0x0f, 0x4f, 0x93, 0x00, 0xea),
180 PHYREGS(0x082c, 0x0828, 0x0824, 0x01f5, 0x01f6, 0x01f7),
181 },
182 {
183 .freq = 5240,
184 RADIOREGS(0xd2, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x0c,
185 0x02, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00,
186 0x0f, 0x4f, 0x93, 0x00, 0xda),
187 PHYREGS(0x0834, 0x0830, 0x082c, 0x01f3, 0x01f4, 0x01f5),
188 },
189 {
190 .freq = 5260,
191 RADIOREGS(0xd9, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x0e,
192 0x02, 0x0b, 0x00, 0x0b, 0x00, 0x0b, 0x00, 0x00,
193 0x0f, 0x4f, 0x93, 0x00, 0xca),
194 PHYREGS(0x083c, 0x0838, 0x0834, 0x01f1, 0x01f2, 0x01f3),
195 },
196 {
197 .freq = 5280,
198 RADIOREGS(0xe0, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x10,
199 0x02, 0x0b, 0x00, 0x0b, 0x00, 0x0b, 0x00, 0x00,
200 0x0f, 0x4f, 0x93, 0x00, 0xb9),
201 PHYREGS(0x0844, 0x0840, 0x083c, 0x01f0, 0x01f0, 0x01f1),
202 },
203 {
204 .freq = 5300,
205 RADIOREGS(0xe6, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x12,
206 0x02, 0x0b, 0x00, 0x0b, 0x00, 0x0b, 0x00, 0x00,
207 0x0f, 0x4c, 0x83, 0x00, 0xb8),
208 PHYREGS(0x084c, 0x0848, 0x0844, 0x01ee, 0x01ef, 0x01f0),
209 },
210 {
211 .freq = 5320,
212 RADIOREGS(0xed, 0x16, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x14,
213 0x02, 0x0b, 0x00, 0x0b, 0x00, 0x0b, 0x00, 0x00,
214 0x0f, 0x4c, 0x83, 0x00, 0xa8),
215 PHYREGS(0x0854, 0x0850, 0x084c, 0x01ec, 0x01ed, 0x01ee),
216 },
217 {
218 .freq = 5500,
219 RADIOREGS(0x29, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x26,
220 0x02, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00,
221 0x0a, 0x46, 0x43, 0x00, 0x75),
222 PHYREGS(0x089c, 0x0898, 0x0894, 0x01dc, 0x01dd, 0x01dd),
223 },
224 {
225 .freq = 5520,
226 RADIOREGS(0x30, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x28,
227 0x02, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00,
228 0x0a, 0x46, 0x43, 0x00, 0x75),
229 PHYREGS(0x08a4, 0x08a0, 0x089c, 0x01da, 0x01db, 0x01dc),
230 },
231 {
232 .freq = 5540,
233 RADIOREGS(0x36, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x2a,
234 0x02, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00,
235 0x0a, 0x46, 0x43, 0x00, 0x75),
236 PHYREGS(0x08ac, 0x08a8, 0x08a4, 0x01d8, 0x01d9, 0x01da),
237 },
238 {
239 .freq = 5560,
240 RADIOREGS(0x3d, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x2c,
241 0x02, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00,
242 0x0a, 0x46, 0x43, 0x00, 0x75),
243 PHYREGS(0x08b4, 0x08b0, 0x08ac, 0x01d7, 0x01d7, 0x01d8),
244 },
245 {
246 .freq = 5580,
247 RADIOREGS(0x44, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x2e,
248 0x02, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00,
249 0x0a, 0x46, 0x43, 0x00, 0x74),
250 PHYREGS(0x08bc, 0x08b8, 0x08b4, 0x01d5, 0x01d6, 0x01d7),
251 },
252 {
253 .freq = 5600,
254 RADIOREGS(0x4a, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x30,
255 0x02, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00,
256 0x09, 0x44, 0x23, 0x00, 0x54),
257 PHYREGS(0x08c4, 0x08c0, 0x08bc, 0x01d3, 0x01d4, 0x01d5),
258 },
259 {
260 .freq = 5620,
261 RADIOREGS(0x51, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x32,
262 0x02, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
263 0x09, 0x44, 0x23, 0x00, 0x54),
264 PHYREGS(0x08cc, 0x08c8, 0x08c4, 0x01d2, 0x01d2, 0x01d3),
265 },
266 {
267 .freq = 5640,
268 RADIOREGS(0x58, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x34,
269 0x02, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
270 0x09, 0x44, 0x23, 0x00, 0x43),
271 PHYREGS(0x08d4, 0x08d0, 0x08cc, 0x01d0, 0x01d1, 0x01d2),
272 },
273 {
274 .freq = 5660,
275 RADIOREGS(0x5e, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x36,
276 0x02, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
277 0x09, 0x43, 0x23, 0x00, 0x43),
278 PHYREGS(0x08dc, 0x08d8, 0x08d4, 0x01ce, 0x01cf, 0x01d0),
279 },
280 {
281 .freq = 5680,
282 RADIOREGS(0x65, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x38,
283 0x02, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
284 0x09, 0x42, 0x23, 0x00, 0x43),
285 PHYREGS(0x08e4, 0x08e0, 0x08dc, 0x01cd, 0x01ce, 0x01ce),
286 },
287 {
288 .freq = 5700,
289 RADIOREGS(0x6c, 0x17, 0x10, 0x1f, 0x08, 0x08, 0x3f, 0x3a,
290 0x02, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
291 0x08, 0x42, 0x13, 0x00, 0x32),
292 PHYREGS(0x08ec, 0x08e8, 0x08e4, 0x01cb, 0x01cc, 0x01cd),
293 },
294 {
295 .freq = 5745,
296 RADIOREGS(0x7b, 0x17, 0x20, 0x1f, 0x08, 0x08, 0x3f, 0x7d,
297 0x04, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00,
298 0x08, 0x42, 0x13, 0x00, 0x21),
299 PHYREGS(0x08fe, 0x08fa, 0x08f6, 0x01c8, 0x01c8, 0x01c9),
300 },
301 {
302 .freq = 5765,
303 RADIOREGS(0x81, 0x17, 0x20, 0x1f, 0x08, 0x08, 0x3f, 0x81,
304 0x04, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00,
305 0x08, 0x42, 0x13, 0x00, 0x11),
306 PHYREGS(0x0906, 0x0902, 0x08fe, 0x01c6, 0x01c7, 0x01c8),
307 },
308 {
309 .freq = 5785,
310 RADIOREGS(0x88, 0x17, 0x20, 0x1f, 0x08, 0x08, 0x3f, 0x85,
311 0x04, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00,
312 0x08, 0x42, 0x13, 0x00, 0x00),
313 PHYREGS(0x090e, 0x090a, 0x0906, 0x01c4, 0x01c5, 0x01c6),
314 },
315 {
316 .freq = 5805,
317 RADIOREGS(0x8f, 0x17, 0x20, 0x1f, 0x08, 0x08, 0x3f, 0x89,
318 0x04, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00,
319 0x06, 0x41, 0x03, 0x00, 0x00),
320 PHYREGS(0x0916, 0x0912, 0x090e, 0x01c3, 0x01c4, 0x01c4),
321 },
322 {
323 .freq = 5825,
324 RADIOREGS(0x95, 0x17, 0x20, 0x1f, 0x08, 0x08, 0x3f, 0x8d,
325 0x04, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00,
326 0x06, 0x41, 0x03, 0x00, 0x00),
327 PHYREGS(0x091e, 0x091a, 0x0916, 0x01c1, 0x01c2, 0x01c3),
328 },
147}; 329};
148 330
149void r2059_upload_inittabs(struct b43_wldev *dev) 331void r2059_upload_inittabs(struct b43_wldev *dev)