]>
Commit | Line | Data |
---|---|---|
40fd095b | 1 | Index: wireless-2.6/net/ieee80211/ieee80211_module.c |
2 | =================================================================== | |
3 | --- wireless-2.6.orig/net/ieee80211/ieee80211_module.c | |
4 | +++ wireless-2.6/net/ieee80211/ieee80211_module.c | |
5 | @@ -229,6 +229,7 @@ void free_ieee80211(struct net_device *d | |
6 | ||
7 | static int debug = 0; | |
8 | u32 ieee80211_debug_level = 0; | |
9 | +EXPORT_SYMBOL_GPL(ieee80211_debug_level); | |
10 | static struct proc_dir_entry *ieee80211_proc = NULL; | |
11 | ||
12 | static int show_debug_level(char *page, char **start, off_t offset, | |
13 | Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c | |
14 | =================================================================== | |
15 | --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c | |
16 | +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c | |
17 | @@ -32,7 +32,7 @@ | |
18 | #include <linux/netdevice.h> | |
19 | #include <linux/pci.h> | |
20 | #include <linux/string.h> | |
21 | -#include <linux/utsrelease.h> | |
22 | +#include <linux/utsname.h> | |
23 | ||
24 | ||
25 | static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |
26 | @@ -40,7 +40,7 @@ static void bcm43xx_get_drvinfo(struct n | |
27 | struct bcm43xx_private *bcm = bcm43xx_priv(dev); | |
28 | ||
29 | strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); | |
30 | - strncpy(info->version, UTS_RELEASE, sizeof(info->version)); | |
31 | + strncpy(info->version, utsname()->release, sizeof(info->version)); | |
32 | strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN); | |
33 | } | |
34 | ||
35 | Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h | |
36 | =================================================================== | |
37 | --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx.h | |
38 | +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h | |
39 | @@ -277,11 +277,14 @@ | |
40 | #define BCM43xx_SBTMSTATELOW_REJECT 0x02 | |
41 | #define BCM43xx_SBTMSTATELOW_CLOCK 0x10000 | |
42 | #define BCM43xx_SBTMSTATELOW_FORCE_GATE_CLOCK 0x20000 | |
43 | +#define BCM43xx_SBTMSTATELOW_G_MODE_ENABLE 0x20000000 | |
44 | ||
45 | /* sbtmstatehigh state flags */ | |
46 | #define BCM43xx_SBTMSTATEHIGH_SERROR 0x00000001 | |
47 | #define BCM43xx_SBTMSTATEHIGH_BUSY 0x00000004 | |
48 | #define BCM43xx_SBTMSTATEHIGH_TIMEOUT 0x00000020 | |
49 | +#define BCM43xx_SBTMSTATEHIGH_G_PHY_AVAIL 0x00010000 | |
50 | +#define BCM43xx_SBTMSTATEHIGH_A_PHY_AVAIL 0x00020000 | |
51 | #define BCM43xx_SBTMSTATEHIGH_COREFLAGS 0x1FFF0000 | |
52 | #define BCM43xx_SBTMSTATEHIGH_DMA64BIT 0x10000000 | |
53 | #define BCM43xx_SBTMSTATEHIGH_GATEDCLK 0x20000000 | |
54 | Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |
55 | =================================================================== | |
56 | --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |
57 | +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |
58 | @@ -1407,7 +1407,7 @@ void bcm43xx_wireless_core_reset(struct | |
59 | & ~(BCM43xx_SBF_MAC_ENABLED | 0x00000002)); | |
60 | } else { | |
61 | if (connect_phy) | |
62 | - flags |= 0x20000000; | |
63 | + flags |= BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; | |
64 | bcm43xx_phy_connect(bcm, connect_phy); | |
65 | bcm43xx_core_enable(bcm, flags); | |
66 | bcm43xx_write16(bcm, 0x03E6, 0x0000); | |
67 | @@ -2406,13 +2406,15 @@ static int bcm43xx_chip_init(struct bcm4 | |
68 | if (value32 == BCM43xx_IRQ_READY) | |
69 | break; | |
70 | i++; | |
71 | - if (i >= BCM43xx_IRQWAIT_MAX_RETRIES) { | |
72 | + if (i >= 10 * BCM43xx_IRQWAIT_MAX_RETRIES) { | |
73 | printk(KERN_ERR PFX "IRQ_READY timeout\n"); | |
74 | err = -ENODEV; | |
75 | goto err_release_fw; | |
76 | } | |
77 | udelay(10); | |
78 | } | |
79 | + if (i > BCM43xx_IRQWAIT_MAX_RETRIES) | |
80 | + printk(KERN_INFO PFX "CAUTION: IRQ_READY took %d tries in chip_init\n", i); | |
81 | bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ | |
82 | ||
83 | value16 = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, | |
84 | @@ -3604,7 +3606,7 @@ int bcm43xx_select_wireless_core(struct | |
85 | u32 sbtmstatelow; | |
86 | ||
87 | sbtmstatelow = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); | |
88 | - sbtmstatelow |= 0x20000000; | |
89 | + sbtmstatelow |= BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; | |
90 | bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, sbtmstatelow); | |
91 | } | |
92 | err = wireless_core_up(bcm, 1); | |
93 | Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.c | |
94 | =================================================================== | |
95 | --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_phy.c | |
96 | +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.c | |
97 | @@ -168,16 +168,16 @@ int bcm43xx_phy_connect(struct bcm43xx_p | |
98 | ||
99 | flags = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH); | |
100 | if (connect) { | |
101 | - if (!(flags & 0x00010000)) | |
102 | + if (!(flags & BCM43xx_SBTMSTATEHIGH_G_PHY_AVAIL)) | |
103 | return -ENODEV; | |
104 | flags = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); | |
105 | - flags |= (0x800 << 18); | |
106 | + flags |= BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; | |
107 | bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, flags); | |
108 | } else { | |
109 | - if (!(flags & 0x00020000)) | |
110 | + if (!(flags & BCM43xx_SBTMSTATEHIGH_A_PHY_AVAIL)) | |
111 | return -ENODEV; | |
112 | flags = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); | |
113 | - flags &= ~(0x800 << 18); | |
114 | + flags &= ~BCM43xx_SBTMSTATELOW_G_MODE_ENABLE; | |
115 | bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, flags); | |
116 | } | |
117 | out: | |
118 | @@ -300,16 +300,20 @@ static void bcm43xx_phy_agcsetup(struct | |
119 | ||
120 | if (phy->rev > 2) { | |
121 | bcm43xx_phy_write(bcm, 0x0422, 0x287A); | |
122 | - bcm43xx_phy_write(bcm, 0x0420, (bcm43xx_phy_read(bcm, 0x0420) & 0x0FFF) | 0x3000); | |
123 | + bcm43xx_phy_write(bcm, 0x0420, (bcm43xx_phy_read(bcm, 0x0420) | |
124 | + & 0x0FFF) | 0x3000); | |
125 | } | |
126 | ||
127 | - bcm43xx_phy_write(bcm, 0x04A8, (bcm43xx_phy_read(bcm, 0x04A8) & 0x8080) | 0x7874); | |
128 | + bcm43xx_phy_write(bcm, 0x04A8, (bcm43xx_phy_read(bcm, 0x04A8) & 0x8080) | |
129 | + | 0x7874); | |
130 | bcm43xx_phy_write(bcm, 0x048E, 0x1C00); | |
131 | ||
132 | if (phy->rev == 1) { | |
133 | - bcm43xx_phy_write(bcm, 0x04AB, (bcm43xx_phy_read(bcm, 0x04AB) & 0xF0FF) | 0x0600); | |
134 | + bcm43xx_phy_write(bcm, 0x04AB, (bcm43xx_phy_read(bcm, 0x04AB) | |
135 | + & 0xF0FF) | 0x0600); | |
136 | bcm43xx_phy_write(bcm, 0x048B, 0x005E); | |
137 | - bcm43xx_phy_write(bcm, 0x048C, (bcm43xx_phy_read(bcm, 0x048C) & 0xFF00) | 0x001E); | |
138 | + bcm43xx_phy_write(bcm, 0x048C, (bcm43xx_phy_read(bcm, 0x048C) | |
139 | + & 0xFF00) | 0x001E); | |
140 | bcm43xx_phy_write(bcm, 0x048D, 0x0002); | |
141 | } | |
142 | ||
143 | @@ -335,7 +339,8 @@ static void bcm43xx_phy_setupg(struct bc | |
144 | if (phy->rev == 1) { | |
145 | bcm43xx_phy_write(bcm, 0x0406, 0x4F19); | |
146 | bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, | |
147 | - (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) & 0xFC3F) | 0x0340); | |
148 | + (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) | |
149 | + & 0xFC3F) | 0x0340); | |
150 | bcm43xx_phy_write(bcm, 0x042C, 0x005A); | |
151 | bcm43xx_phy_write(bcm, 0x0427, 0x001A); | |
152 | ||
153 | Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.h | |
154 | =================================================================== | |
155 | --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_phy.h | |
156 | +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.h | |
157 | @@ -48,6 +48,10 @@ void bcm43xx_raw_phy_unlock(struct bcm43 | |
158 | local_irq_restore(flags); \ | |
159 | } while (0) | |
160 | ||
161 | +/* Card uses the loopback gain stuff */ | |
162 | +#define has_loopback_gain(phy) \ | |
163 | + (((phy)->rev > 1) || ((phy)->connected)) | |
164 | + | |
165 | u16 bcm43xx_phy_read(struct bcm43xx_private *bcm, u16 offset); | |
166 | void bcm43xx_phy_write(struct bcm43xx_private *bcm, u16 offset, u16 val); | |
167 | ||
168 | Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_radio.c | |
169 | =================================================================== | |
170 | --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_radio.c | |
171 | +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_radio.c | |
172 | @@ -1343,11 +1343,110 @@ u16 bcm43xx_radio_calibrationvalue(struc | |
173 | return ret; | |
174 | } | |
175 | ||
176 | +#define LPD(L, P, D) (((L) << 2) | ((P) << 1) | ((D) << 0)) | |
177 | +static u16 bcm43xx_get_812_value(struct bcm43xx_private *bcm, u8 lpd) | |
178 | +{ | |
179 | + struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); | |
180 | + struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); | |
181 | + u16 loop_or = 0; | |
182 | + u16 adj_loopback_gain = phy->loopback_gain[0]; | |
183 | + u8 loop; | |
184 | + u16 extern_lna_control; | |
185 | + | |
186 | + if (!phy->connected) | |
187 | + return 0; | |
188 | + if (!has_loopback_gain(phy)) { | |
189 | + if (phy->rev < 7 || !(bcm->sprom.boardflags | |
190 | + & BCM43xx_BFL_EXTLNA)) { | |
191 | + switch (lpd) { | |
192 | + case LPD(0, 1, 1): | |
193 | + return 0x0FB2; | |
194 | + case LPD(0, 0, 1): | |
195 | + return 0x00B2; | |
196 | + case LPD(1, 0, 1): | |
197 | + return 0x30B2; | |
198 | + case LPD(1, 0, 0): | |
199 | + return 0x30B3; | |
200 | + default: | |
201 | + assert(0); | |
202 | + } | |
203 | + } else { | |
204 | + switch (lpd) { | |
205 | + case LPD(0, 1, 1): | |
206 | + return 0x8FB2; | |
207 | + case LPD(0, 0, 1): | |
208 | + return 0x80B2; | |
209 | + case LPD(1, 0, 1): | |
210 | + return 0x20B2; | |
211 | + case LPD(1, 0, 0): | |
212 | + return 0x20B3; | |
213 | + default: | |
214 | + assert(0); | |
215 | + } | |
216 | + } | |
217 | + } else { | |
218 | + if (radio->revision == 8) | |
219 | + adj_loopback_gain += 0x003E; | |
220 | + else | |
221 | + adj_loopback_gain += 0x0026; | |
222 | + if (adj_loopback_gain >= 0x46) { | |
223 | + adj_loopback_gain -= 0x46; | |
224 | + extern_lna_control = 0x3000; | |
225 | + } else if (adj_loopback_gain >= 0x3A) { | |
226 | + adj_loopback_gain -= 0x3A; | |
227 | + extern_lna_control = 0x2000; | |
228 | + } else if (adj_loopback_gain >= 0x2E) { | |
229 | + adj_loopback_gain -= 0x2E; | |
230 | + extern_lna_control = 0x1000; | |
231 | + } else { | |
232 | + adj_loopback_gain -= 0x10; | |
233 | + extern_lna_control = 0x0000; | |
234 | + } | |
235 | + for (loop = 0; loop < 16; loop++) { | |
236 | + u16 tmp = adj_loopback_gain - 6 * loop; | |
237 | + if (tmp < 6) | |
238 | + break; | |
239 | + } | |
240 | + | |
241 | + loop_or = (loop << 8) | extern_lna_control; | |
242 | + if (phy->rev >= 7 && bcm->sprom.boardflags | |
243 | + & BCM43xx_BFL_EXTLNA) { | |
244 | + if (extern_lna_control) | |
245 | + loop_or |= 0x8000; | |
246 | + switch (lpd) { | |
247 | + case LPD(0, 1, 1): | |
248 | + return 0x8F92; | |
249 | + case LPD(0, 0, 1): | |
250 | + return (0x8092 | loop_or); | |
251 | + case LPD(1, 0, 1): | |
252 | + return (0x2092 | loop_or); | |
253 | + case LPD(1, 0, 0): | |
254 | + return (0x2093 | loop_or); | |
255 | + default: | |
256 | + assert(0); | |
257 | + } | |
258 | + } else { | |
259 | + switch (lpd) { | |
260 | + case LPD(0, 1, 1): | |
261 | + return 0x0F92; | |
262 | + case LPD(0, 0, 1): | |
263 | + case LPD(1, 0, 1): | |
264 | + return (0x0092 | loop_or); | |
265 | + case LPD(1, 0, 0): | |
266 | + return (0x0093 | loop_or); | |
267 | + default: | |
268 | + assert(0); | |
269 | + } | |
270 | + } | |
271 | + } | |
272 | + return 0; | |
273 | +} | |
274 | + | |
275 | u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm) | |
276 | { | |
277 | struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); | |
278 | struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); | |
279 | - u16 backup[19] = { 0 }; | |
280 | + u16 backup[21] = { 0 }; | |
281 | u16 ret; | |
282 | u16 i, j; | |
283 | u32 tmp1 = 0, tmp2 = 0; | |
284 | @@ -1373,19 +1472,36 @@ u16 bcm43xx_radio_init2050(struct bcm43x | |
285 | backup[8] = bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS); | |
286 | backup[9] = bcm43xx_phy_read(bcm, 0x0802); | |
287 | bcm43xx_phy_write(bcm, 0x0814, | |
288 | - (bcm43xx_phy_read(bcm, 0x0814) | 0x0003)); | |
289 | + (bcm43xx_phy_read(bcm, 0x0814) | |
290 | + | 0x0003)); | |
291 | bcm43xx_phy_write(bcm, 0x0815, | |
292 | - (bcm43xx_phy_read(bcm, 0x0815) & 0xFFFC)); | |
293 | + (bcm43xx_phy_read(bcm, 0x0815) | |
294 | + & 0xFFFC)); | |
295 | bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, | |
296 | - (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) & 0x7FFF)); | |
297 | + (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) | |
298 | + & 0x7FFF)); | |
299 | bcm43xx_phy_write(bcm, 0x0802, | |
300 | (bcm43xx_phy_read(bcm, 0x0802) & 0xFFFC)); | |
301 | - bcm43xx_phy_write(bcm, 0x0811, 0x01B3); | |
302 | - bcm43xx_phy_write(bcm, 0x0812, 0x0FB2); | |
303 | + if (phy->rev > 1) { /* loopback gain enabled */ | |
304 | + backup[19] = bcm43xx_phy_read(bcm, 0x080F); | |
305 | + backup[20] = bcm43xx_phy_read(bcm, 0x0810); | |
306 | + if (phy->rev >= 3) | |
307 | + bcm43xx_phy_write(bcm, 0x080F, 0xC020); | |
308 | + else | |
309 | + bcm43xx_phy_write(bcm, 0x080F, 0x8020); | |
310 | + bcm43xx_phy_write(bcm, 0x0810, 0x0000); | |
311 | + } | |
312 | + bcm43xx_phy_write(bcm, 0x0812, | |
313 | + bcm43xx_get_812_value(bcm, LPD(0, 1, 1))); | |
314 | + if (phy->rev < 7 || !(bcm->sprom.boardflags | |
315 | + & BCM43xx_BFL_EXTLNA)) | |
316 | + bcm43xx_phy_write(bcm, 0x0811, 0x01B3); | |
317 | + else | |
318 | + bcm43xx_phy_write(bcm, 0x0811, 0x09B3); | |
319 | } | |
320 | - bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO, | |
321 | - (bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_RADIO) | 0x8000)); | |
322 | } | |
323 | + bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO, | |
324 | + (bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_RADIO) | 0x8000)); | |
325 | backup[10] = bcm43xx_phy_read(bcm, 0x0035); | |
326 | bcm43xx_phy_write(bcm, 0x0035, | |
327 | (bcm43xx_phy_read(bcm, 0x0035) & 0xFF7F)); | |
328 | @@ -1397,10 +1513,12 @@ u16 bcm43xx_radio_init2050(struct bcm43x | |
329 | bcm43xx_write16(bcm, 0x03E6, 0x0122); | |
330 | } else { | |
331 | if (phy->analog >= 2) | |
332 | - bcm43xx_phy_write(bcm, 0x0003, (bcm43xx_phy_read(bcm, 0x0003) | |
333 | - & 0xFFBF) | 0x0040); | |
334 | + bcm43xx_phy_write(bcm, 0x0003, | |
335 | + (bcm43xx_phy_read(bcm, 0x0003) | |
336 | + & 0xFFBF) | 0x0040); | |
337 | bcm43xx_write16(bcm, BCM43xx_MMIO_CHANNEL_EXT, | |
338 | - (bcm43xx_read16(bcm, BCM43xx_MMIO_CHANNEL_EXT) | 0x2000)); | |
339 | + (bcm43xx_read16(bcm, BCM43xx_MMIO_CHANNEL_EXT) | |
340 | + | 0x2000)); | |
341 | } | |
342 | ||
343 | ret = bcm43xx_radio_calibrationvalue(bcm); | |
344 | @@ -1408,16 +1526,25 @@ u16 bcm43xx_radio_init2050(struct bcm43x | |
345 | if (phy->type == BCM43xx_PHYTYPE_B) | |
346 | bcm43xx_radio_write16(bcm, 0x0078, 0x0026); | |
347 | ||
348 | + if (phy->connected) | |
349 | + bcm43xx_phy_write(bcm, 0x0812, | |
350 | + bcm43xx_get_812_value(bcm, LPD(0, 1, 1))); | |
351 | bcm43xx_phy_write(bcm, 0x0015, 0xBFAF); | |
352 | bcm43xx_phy_write(bcm, 0x002B, 0x1403); | |
353 | if (phy->connected) | |
354 | - bcm43xx_phy_write(bcm, 0x0812, 0x00B2); | |
355 | + bcm43xx_phy_write(bcm, 0x0812, | |
356 | + bcm43xx_get_812_value(bcm, LPD(0, 0, 1))); | |
357 | bcm43xx_phy_write(bcm, 0x0015, 0xBFA0); | |
358 | bcm43xx_radio_write16(bcm, 0x0051, | |
359 | (bcm43xx_radio_read16(bcm, 0x0051) | 0x0004)); | |
360 | - bcm43xx_radio_write16(bcm, 0x0052, 0x0000); | |
361 | - bcm43xx_radio_write16(bcm, 0x0043, | |
362 | - (bcm43xx_radio_read16(bcm, 0x0043) & 0xFFF0) | 0x0009); | |
363 | + if (radio->revision == 8) | |
364 | + bcm43xx_radio_write16(bcm, 0x0043, 0x001F); | |
365 | + else { | |
366 | + bcm43xx_radio_write16(bcm, 0x0052, 0x0000); | |
367 | + bcm43xx_radio_write16(bcm, 0x0043, | |
368 | + (bcm43xx_radio_read16(bcm, 0x0043) & 0xFFF0) | |
369 | + | 0x0009); | |
370 | + } | |
371 | bcm43xx_phy_write(bcm, 0x0058, 0x0000); | |
372 | ||
373 | for (i = 0; i < 16; i++) { | |
374 | @@ -1425,21 +1552,25 @@ u16 bcm43xx_radio_init2050(struct bcm43x | |
375 | bcm43xx_phy_write(bcm, 0x0059, 0xC810); | |
376 | bcm43xx_phy_write(bcm, 0x0058, 0x000D); | |
377 | if (phy->connected) | |
378 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
379 | + bcm43xx_phy_write(bcm, 0x0812, | |
380 | + bcm43xx_get_812_value(bcm, LPD(1, 0, 1))); | |
381 | bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); | |
382 | udelay(10); | |
383 | if (phy->connected) | |
384 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
385 | + bcm43xx_phy_write(bcm, 0x0812, | |
386 | + bcm43xx_get_812_value(bcm, LPD(1, 0, 1))); | |
387 | bcm43xx_phy_write(bcm, 0x0015, 0xEFB0); | |
388 | udelay(10); | |
389 | if (phy->connected) | |
390 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
391 | + bcm43xx_phy_write(bcm, 0x0812, | |
392 | + bcm43xx_get_812_value(bcm, LPD(1, 0, 0))); | |
393 | bcm43xx_phy_write(bcm, 0x0015, 0xFFF0); | |
394 | - udelay(10); | |
395 | + udelay(20); | |
396 | tmp1 += bcm43xx_phy_read(bcm, 0x002D); | |
397 | bcm43xx_phy_write(bcm, 0x0058, 0x0000); | |
398 | if (phy->connected) | |
399 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
400 | + bcm43xx_phy_write(bcm, 0x0812, | |
401 | + bcm43xx_get_812_value(bcm, LPD(1, 0, 1))); | |
402 | bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); | |
403 | } | |
404 | ||
405 | @@ -1457,21 +1588,29 @@ u16 bcm43xx_radio_init2050(struct bcm43x | |
406 | bcm43xx_phy_write(bcm, 0x0059, 0xC810); | |
407 | bcm43xx_phy_write(bcm, 0x0058, 0x000D); | |
408 | if (phy->connected) | |
409 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
410 | + bcm43xx_phy_write(bcm, 0x0812, | |
411 | + bcm43xx_get_812_value(bcm, | |
412 | + LPD(1, 0, 1))); | |
413 | bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); | |
414 | udelay(10); | |
415 | if (phy->connected) | |
416 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
417 | + bcm43xx_phy_write(bcm, 0x0812, | |
418 | + bcm43xx_get_812_value(bcm, | |
419 | + LPD(1, 0, 1))); | |
420 | bcm43xx_phy_write(bcm, 0x0015, 0xEFB0); | |
421 | udelay(10); | |
422 | if (phy->connected) | |
423 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B3); /* 0x30B3 is not a typo */ | |
424 | + bcm43xx_phy_write(bcm, 0x0812, | |
425 | + bcm43xx_get_812_value(bcm, | |
426 | + LPD(1, 0, 0))); | |
427 | bcm43xx_phy_write(bcm, 0x0015, 0xFFF0); | |
428 | udelay(10); | |
429 | tmp2 += bcm43xx_phy_read(bcm, 0x002D); | |
430 | bcm43xx_phy_write(bcm, 0x0058, 0x0000); | |
431 | if (phy->connected) | |
432 | - bcm43xx_phy_write(bcm, 0x0812, 0x30B2); | |
433 | + bcm43xx_phy_write(bcm, 0x0812, | |
434 | + bcm43xx_get_812_value(bcm, | |
435 | + LPD(1, 0, 1))); | |
436 | bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); | |
437 | } | |
438 | tmp2++; | |
439 | @@ -1497,15 +1636,20 @@ u16 bcm43xx_radio_init2050(struct bcm43x | |
440 | bcm43xx_phy_write(bcm, 0x0030, backup[2]); | |
441 | bcm43xx_write16(bcm, 0x03EC, backup[3]); | |
442 | } else { | |
443 | - bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO, | |
444 | - (bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_RADIO) & 0x7FFF)); | |
445 | if (phy->connected) { | |
446 | + bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO, | |
447 | + (bcm43xx_read16(bcm, | |
448 | + BCM43xx_MMIO_PHY_RADIO) & 0x7FFF)); | |
449 | bcm43xx_phy_write(bcm, 0x0811, backup[4]); | |
450 | bcm43xx_phy_write(bcm, 0x0812, backup[5]); | |
451 | bcm43xx_phy_write(bcm, 0x0814, backup[6]); | |
452 | bcm43xx_phy_write(bcm, 0x0815, backup[7]); | |
453 | bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, backup[8]); | |
454 | bcm43xx_phy_write(bcm, 0x0802, backup[9]); | |
455 | + if (phy->rev > 1) { | |
456 | + bcm43xx_phy_write(bcm, 0x080F, backup[19]); | |
457 | + bcm43xx_phy_write(bcm, 0x0810, backup[20]); | |
458 | + } | |
459 | } | |
460 | } | |
461 | if (i >= 15) | |
462 | Index: linux-2.6/net/ieee80211/ieee80211_crypt.c | |
463 | =================================================================== | |
464 | --- linux-2.6.orig/net/ieee80211/ieee80211_crypt.c | |
465 | +++ linux-2.6/net/ieee80211/ieee80211_crypt.c | |
466 | @@ -1,7 +1,7 @@ | |
467 | /* | |
468 | * Host AP crypto routines | |
469 | * | |
470 | - * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> | |
471 | + * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi> | |
472 | * Portions Copyright (C) 2004, Intel Corporation <jketreno@linux.intel.com> | |
473 | * | |
474 | * This program is free software; you can redistribute it and/or modify | |
475 | Index: linux-2.6/net/ieee80211/ieee80211_crypt_ccmp.c | |
476 | =================================================================== | |
477 | --- linux-2.6.orig/net/ieee80211/ieee80211_crypt_ccmp.c | |
478 | +++ linux-2.6/net/ieee80211/ieee80211_crypt_ccmp.c | |
479 | @@ -1,7 +1,7 @@ | |
480 | /* | |
481 | * Host AP crypt: host-based CCMP encryption implementation for Host AP driver | |
482 | * | |
483 | - * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi> | |
484 | + * Copyright (c) 2003-2004, Jouni Malinen <j@w1.fi> | |
485 | * | |
486 | * This program is free software; you can redistribute it and/or modify | |
487 | * it under the terms of the GNU General Public License version 2 as | |
488 | @@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct | |
489 | ||
490 | if (ccmp_replay_check(pn, key->rx_pn)) { | |
491 | if (net_ratelimit()) { | |
492 | - printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT | |
493 | + IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=" MAC_FMT | |
494 | " previous PN %02x%02x%02x%02x%02x%02x " | |
495 | "received PN %02x%02x%02x%02x%02x%02x\n", | |
496 | MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), | |
497 | Index: linux-2.6/net/ieee80211/ieee80211_crypt_tkip.c | |
498 | =================================================================== | |
499 | --- linux-2.6.orig/net/ieee80211/ieee80211_crypt_tkip.c | |
500 | +++ linux-2.6/net/ieee80211/ieee80211_crypt_tkip.c | |
501 | @@ -1,7 +1,7 @@ | |
502 | /* | |
503 | * Host AP crypt: host-based TKIP encryption implementation for Host AP driver | |
504 | * | |
505 | - * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi> | |
506 | + * Copyright (c) 2003-2004, Jouni Malinen <j@w1.fi> | |
507 | * | |
508 | * This program is free software; you can redistribute it and/or modify | |
509 | * it under the terms of the GNU General Public License version 2 as | |
510 | @@ -465,7 +465,7 @@ static int ieee80211_tkip_decrypt(struct | |
511 | ||
512 | if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { | |
513 | if (net_ratelimit()) { | |
514 | - printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT | |
515 | + IEEE80211_DEBUG_DROP("TKIP: replay detected: STA=" MAC_FMT | |
516 | " previous TSC %08x%04x received TSC " | |
517 | "%08x%04x\n", MAC_ARG(hdr->addr2), | |
518 | tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); | |
519 | @@ -507,7 +507,7 @@ static int ieee80211_tkip_decrypt(struct | |
520 | tkey->rx_phase1_done = 0; | |
521 | } | |
522 | if (net_ratelimit()) { | |
523 | - printk(KERN_DEBUG "TKIP: ICV error detected: STA=" | |
524 | + IEEE80211_DEBUG_DROP("TKIP: ICV error detected: STA=" | |
525 | MAC_FMT "\n", MAC_ARG(hdr->addr2)); | |
526 | } | |
527 | tkey->dot11RSNAStatsTKIPICVErrors++; | |
528 | Index: linux-2.6/net/ieee80211/ieee80211_crypt_wep.c | |
529 | =================================================================== | |
530 | --- linux-2.6.orig/net/ieee80211/ieee80211_crypt_wep.c | |
531 | +++ linux-2.6/net/ieee80211/ieee80211_crypt_wep.c | |
532 | @@ -1,7 +1,7 @@ | |
533 | /* | |
534 | * Host AP crypt: host-based WEP encryption implementation for Host AP driver | |
535 | * | |
536 | - * Copyright (c) 2002-2004, Jouni Malinen <jkmaline@cc.hut.fi> | |
537 | + * Copyright (c) 2002-2004, Jouni Malinen <j@w1.fi> | |
538 | * | |
539 | * This program is free software; you can redistribute it and/or modify | |
540 | * it under the terms of the GNU General Public License version 2 as | |
541 | Index: linux-2.6/net/ieee80211/ieee80211_module.c | |
542 | =================================================================== | |
543 | --- linux-2.6.orig/net/ieee80211/ieee80211_module.c | |
544 | +++ linux-2.6/net/ieee80211/ieee80211_module.c | |
545 | @@ -5,8 +5,8 @@ | |
546 | Portions of this file are based on the WEP enablement code provided by the | |
547 | Host AP project hostap-drivers v0.1.3 | |
548 | Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen | |
549 | - <jkmaline@cc.hut.fi> | |
550 | - Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> | |
551 | + <j@w1.fi> | |
552 | + Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi> | |
553 | ||
554 | This program is free software; you can redistribute it and/or modify it | |
555 | under the terms of version 2 of the GNU General Public License as | |
556 | Index: linux-2.6/net/ieee80211/ieee80211_rx.c | |
557 | =================================================================== | |
558 | --- linux-2.6.orig/net/ieee80211/ieee80211_rx.c | |
559 | +++ linux-2.6/net/ieee80211/ieee80211_rx.c | |
560 | @@ -3,8 +3,8 @@ | |
561 | * for Intersil Prism2/2.5/3 - hostap.o module, common routines | |
562 | * | |
563 | * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen | |
564 | - * <jkmaline@cc.hut.fi> | |
565 | - * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> | |
566 | + * <j@w1.fi> | |
567 | + * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi> | |
568 | * Copyright (c) 2004-2005, Intel Corporation | |
569 | * | |
570 | * This program is free software; you can redistribute it and/or modify | |
571 | Index: linux-2.6/net/ieee80211/ieee80211_wx.c | |
572 | =================================================================== | |
573 | --- linux-2.6.orig/net/ieee80211/ieee80211_wx.c | |
574 | +++ linux-2.6/net/ieee80211/ieee80211_wx.c | |
575 | @@ -5,8 +5,8 @@ | |
576 | Portions of this file are based on the WEP enablement code provided by the | |
577 | Host AP project hostap-drivers v0.1.3 | |
578 | Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen | |
579 | - <jkmaline@cc.hut.fi> | |
580 | - Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> | |
581 | + <j@w1.fi> | |
582 | + Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi> | |
583 | ||
584 | This program is free software; you can redistribute it and/or modify it | |
585 | under the terms of version 2 of the GNU General Public License as |