1 --- a/drivers/net/wireless/b43/Kconfig
2 +++ b/drivers/net/wireless/b43/Kconfig
3 @@ -90,6 +90,12 @@ config B43_SDIO
5 #Data transfers to the device via PIO. We want it as a fallback even
16 @@ -125,6 +131,14 @@ config B43_PHY_HT
18 Say N, this is BROKEN and crashes driver.
21 + bool "Support for LCN-PHY devices (BROKEN)"
22 + depends on B43 && BROKEN
24 + Support for the LCN-PHY.
26 + Say N, this is BROKEN and crashes driver.
28 # This config option automatically enables b43 LEDS support,
31 --- a/drivers/net/wireless/b43/Makefile
32 +++ b/drivers/net/wireless/b43/Makefile
33 @@ -11,7 +11,9 @@ b43-$(CONFIG_B43_PHY_N) += phy_n.o
34 b43-$(CONFIG_B43_PHY_LP) += phy_lp.o
35 b43-$(CONFIG_B43_PHY_LP) += tables_lpphy.o
36 b43-$(CONFIG_B43_PHY_HT) += phy_ht.o
37 +b43-$(CONFIG_B43_PHY_HT) += tables_phy_ht.o
38 b43-$(CONFIG_B43_PHY_HT) += radio_2059.o
39 +b43-$(CONFIG_B43_PHY_LCN) += phy_lcn.o tables_phy_lcn.o
43 --- a/drivers/net/wireless/b43/b43.h
44 +++ b/drivers/net/wireless/b43/b43.h
45 @@ -433,6 +433,12 @@ enum {
46 #define B43_BCMA_IOCTL_PHY_BW_40MHZ 0x00000080 /* 40 MHz bandwidth, 160 MHz PHY */
47 #define B43_BCMA_IOCTL_GMODE 0x00002000 /* G Mode Enable */
49 +/* BCMA 802.11 core specific IO status (BCMA_IOST) flags */
50 +#define B43_BCMA_IOST_2G_PHY 0x00000001 /* 2.4G capable phy */
51 +#define B43_BCMA_IOST_5G_PHY 0x00000002 /* 5G capable phy */
52 +#define B43_BCMA_IOST_FASTCLKA 0x00000004 /* Fast Clock Available */
53 +#define B43_BCMA_IOST_DUALB_PHY 0x00000008 /* Dualband phy */
55 /* 802.11 core specific TM State Low (SSB_TMSLOW) flags */
56 #define B43_TMSLOW_GMODE 0x20000000 /* G Mode Enable */
57 #define B43_TMSLOW_PHY_BANDWIDTH 0x00C00000 /* PHY band width and clock speed mask (N-PHY only) */
58 @@ -588,6 +594,7 @@ struct b43_dma {
59 struct b43_dmaring *rx_ring;
61 u32 translation; /* Routing bits */
62 + bool parity; /* Check for parity */
65 struct b43_pio_txqueue;
66 @@ -726,7 +733,6 @@ enum {
68 /* Data structure for one wireless device (802.11 core) */
70 - struct ssb_device *sdev; /* TODO: remove when b43_bus_dev is ready */
71 struct b43_bus_dev *dev;
74 --- a/drivers/net/wireless/b43/bus.c
75 +++ b/drivers/net/wireless/b43/bus.c
81 +#ifdef CONFIG_B43_BCMA
82 +static int b43_bus_bcma_bus_may_powerdown(struct b43_bus_dev *dev)
84 + return 0; /* bcma_bus_may_powerdown(dev->bdev->bus); */
86 +static int b43_bus_bcma_bus_powerup(struct b43_bus_dev *dev,
89 + return 0; /* bcma_bus_powerup(dev->sdev->bus, dynamic_pctl); */
91 +static int b43_bus_bcma_device_is_enabled(struct b43_bus_dev *dev)
93 + return bcma_core_is_enabled(dev->bdev);
95 +static void b43_bus_bcma_device_enable(struct b43_bus_dev *dev,
96 + u32 core_specific_flags)
98 + bcma_core_enable(dev->bdev, core_specific_flags);
100 +static void b43_bus_bcma_device_disable(struct b43_bus_dev *dev,
101 + u32 core_specific_flags)
103 + bcma_core_disable(dev->bdev, core_specific_flags);
105 +static u16 b43_bus_bcma_read16(struct b43_bus_dev *dev, u16 offset)
107 + return bcma_read16(dev->bdev, offset);
109 +static u32 b43_bus_bcma_read32(struct b43_bus_dev *dev, u16 offset)
111 + return bcma_read32(dev->bdev, offset);
114 +void b43_bus_bcma_write16(struct b43_bus_dev *dev, u16 offset, u16 value)
116 + bcma_write16(dev->bdev, offset, value);
119 +void b43_bus_bcma_write32(struct b43_bus_dev *dev, u16 offset, u32 value)
121 + bcma_write32(dev->bdev, offset, value);
124 +void b43_bus_bcma_block_read(struct b43_bus_dev *dev, void *buffer,
125 + size_t count, u16 offset, u8 reg_width)
127 + bcma_block_read(dev->bdev, buffer, count, offset, reg_width);
130 +void b43_bus_bcma_block_write(struct b43_bus_dev *dev, const void *buffer,
131 + size_t count, u16 offset, u8 reg_width)
133 + bcma_block_write(dev->bdev, buffer, count, offset, reg_width);
136 +struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core)
138 + struct b43_bus_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
142 + dev->bus_type = B43_BUS_BCMA;
145 + dev->bus_may_powerdown = b43_bus_bcma_bus_may_powerdown;
146 + dev->bus_powerup = b43_bus_bcma_bus_powerup;
147 + dev->device_is_enabled = b43_bus_bcma_device_is_enabled;
148 + dev->device_enable = b43_bus_bcma_device_enable;
149 + dev->device_disable = b43_bus_bcma_device_disable;
151 + dev->read16 = b43_bus_bcma_read16;
152 + dev->read32 = b43_bus_bcma_read32;
153 + dev->write16 = b43_bus_bcma_write16;
154 + dev->write32 = b43_bus_bcma_write32;
155 + dev->block_read = b43_bus_bcma_block_read;
156 + dev->block_write = b43_bus_bcma_block_write;
158 + dev->dev = &core->dev;
159 + dev->dma_dev = core->dma_dev;
160 + dev->irq = core->irq;
163 + dev->board_vendor = core->bus->boardinfo.vendor;
164 + dev->board_type = core->bus->boardinfo.type;
165 + dev->board_rev = core->bus->boardinfo.rev;
168 + dev->chip_id = core->bus->chipinfo.id;
169 + dev->chip_rev = core->bus->chipinfo.rev;
170 + dev->chip_pkg = core->bus->chipinfo.pkg;
172 + dev->bus_sprom = &core->bus->sprom;
174 + dev->core_id = core->id.id;
175 + dev->core_rev = core->id.rev;
179 +#endif /* CONFIG_B43_BCMA */
182 #ifdef CONFIG_B43_SSB
183 -static inline int b43_bus_ssb_bus_may_powerdown(struct b43_bus_dev *dev)
184 +static int b43_bus_ssb_bus_may_powerdown(struct b43_bus_dev *dev)
186 return ssb_bus_may_powerdown(dev->sdev->bus);
188 -static inline int b43_bus_ssb_bus_powerup(struct b43_bus_dev *dev,
189 +static int b43_bus_ssb_bus_powerup(struct b43_bus_dev *dev,
192 return ssb_bus_powerup(dev->sdev->bus, dynamic_pctl);
194 -static inline int b43_bus_ssb_device_is_enabled(struct b43_bus_dev *dev)
195 +static int b43_bus_ssb_device_is_enabled(struct b43_bus_dev *dev)
197 return ssb_device_is_enabled(dev->sdev);
199 -static inline void b43_bus_ssb_device_enable(struct b43_bus_dev *dev,
200 +static void b43_bus_ssb_device_enable(struct b43_bus_dev *dev,
201 u32 core_specific_flags)
203 ssb_device_enable(dev->sdev, core_specific_flags);
205 -static inline void b43_bus_ssb_device_disable(struct b43_bus_dev *dev,
206 +static void b43_bus_ssb_device_disable(struct b43_bus_dev *dev,
207 u32 core_specific_flags)
209 ssb_device_disable(dev->sdev, core_specific_flags);
212 -static inline u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset)
213 +static u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset)
215 return ssb_read16(dev->sdev, offset);
217 -static inline u32 b43_bus_ssb_read32(struct b43_bus_dev *dev, u16 offset)
218 +static u32 b43_bus_ssb_read32(struct b43_bus_dev *dev, u16 offset)
220 return ssb_read32(dev->sdev, offset);
223 -void b43_bus_ssb_write16(struct b43_bus_dev *dev, u16 offset, u16 value)
224 +static void b43_bus_ssb_write16(struct b43_bus_dev *dev, u16 offset, u16 value)
226 ssb_write16(dev->sdev, offset, value);
229 -void b43_bus_ssb_write32(struct b43_bus_dev *dev, u16 offset, u32 value)
230 +static void b43_bus_ssb_write32(struct b43_bus_dev *dev, u16 offset, u32 value)
232 ssb_write32(dev->sdev, offset, value);
235 -void b43_bus_ssb_block_read(struct b43_bus_dev *dev, void *buffer,
236 - size_t count, u16 offset, u8 reg_width)
237 +static void b43_bus_ssb_block_read(struct b43_bus_dev *dev, void *buffer,
238 + size_t count, u16 offset, u8 reg_width)
240 ssb_block_read(dev->sdev, buffer, count, offset, reg_width);
244 void b43_bus_ssb_block_write(struct b43_bus_dev *dev, const void *buffer,
245 size_t count, u16 offset, u8 reg_width)
247 @@ -125,3 +222,32 @@ struct b43_bus_dev *b43_bus_dev_ssb_init
250 #endif /* CONFIG_B43_SSB */
252 +void *b43_bus_get_wldev(struct b43_bus_dev *dev)
254 + switch (dev->bus_type) {
255 +#ifdef CONFIG_B43_BCMA
257 + return bcma_get_drvdata(dev->bdev);
259 +#ifdef CONFIG_B43_SSB
261 + return ssb_get_drvdata(dev->sdev);
267 +void b43_bus_set_wldev(struct b43_bus_dev *dev, void *wldev)
269 + switch (dev->bus_type) {
270 +#ifdef CONFIG_B43_BCMA
272 + bcma_set_drvdata(dev->bdev, wldev);
274 +#ifdef CONFIG_B43_SSB
276 + ssb_set_drvdata(dev->sdev, wldev);
280 --- a/drivers/net/wireless/b43/bus.h
281 +++ b/drivers/net/wireless/b43/bus.h
286 +#ifdef CONFIG_B43_BCMA
293 enum b43_bus_type bus_type;
295 + struct bcma_device *bdev;
296 struct ssb_device *sdev;
299 @@ -57,6 +61,10 @@ static inline bool b43_bus_host_is_sdio(
300 dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO);
303 +struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core);
304 struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev);
306 +void *b43_bus_get_wldev(struct b43_bus_dev *dev);
307 +void b43_bus_set_wldev(struct b43_bus_dev *dev, void *data);
309 #endif /* B43_BUS_H_ */
310 --- a/drivers/net/wireless/b43/dma.c
311 +++ b/drivers/net/wireless/b43/dma.c
312 @@ -174,7 +174,7 @@ static void op64_fill_descriptor(struct
313 addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK);
314 addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK)
315 >> SSB_DMA_TRANSLATION_SHIFT;
316 - addrhi |= (ring->dev->dma.translation << 1);
317 + addrhi |= ring->dev->dma.translation;
318 if (slot == ring->nr_slots - 1)
319 ctl0 |= B43_DMA64_DCTL0_DTABLEEND;
321 @@ -659,6 +659,7 @@ static int dmacontroller_setup(struct b4
324 u32 trans = ring->dev->dma.translation;
325 + bool parity = ring->dev->dma.parity;
328 if (ring->type == B43_DMA_64BIT) {
329 @@ -669,13 +670,15 @@ static int dmacontroller_setup(struct b4
330 value = B43_DMA64_TXENABLE;
331 value |= (addrext << B43_DMA64_TXADDREXT_SHIFT)
332 & B43_DMA64_TXADDREXT_MASK;
334 + value |= B43_DMA64_TXPARITYDISABLE;
335 b43_dma_write(ring, B43_DMA64_TXCTL, value);
336 b43_dma_write(ring, B43_DMA64_TXRINGLO,
337 (ringbase & 0xFFFFFFFF));
338 b43_dma_write(ring, B43_DMA64_TXRINGHI,
340 ~SSB_DMA_TRANSLATION_MASK)
344 u32 ringbase = (u32) (ring->dmabase);
346 @@ -684,6 +687,8 @@ static int dmacontroller_setup(struct b4
347 value = B43_DMA32_TXENABLE;
348 value |= (addrext << B43_DMA32_TXADDREXT_SHIFT)
349 & B43_DMA32_TXADDREXT_MASK;
351 + value |= B43_DMA32_TXPARITYDISABLE;
352 b43_dma_write(ring, B43_DMA32_TXCTL, value);
353 b43_dma_write(ring, B43_DMA32_TXRING,
354 (ringbase & ~SSB_DMA_TRANSLATION_MASK)
355 @@ -702,13 +707,15 @@ static int dmacontroller_setup(struct b4
356 value |= B43_DMA64_RXENABLE;
357 value |= (addrext << B43_DMA64_RXADDREXT_SHIFT)
358 & B43_DMA64_RXADDREXT_MASK;
360 + value |= B43_DMA64_RXPARITYDISABLE;
361 b43_dma_write(ring, B43_DMA64_RXCTL, value);
362 b43_dma_write(ring, B43_DMA64_RXRINGLO,
363 (ringbase & 0xFFFFFFFF));
364 b43_dma_write(ring, B43_DMA64_RXRINGHI,
366 ~SSB_DMA_TRANSLATION_MASK)
369 b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots *
370 sizeof(struct b43_dmadesc64));
372 @@ -720,6 +727,8 @@ static int dmacontroller_setup(struct b4
373 value |= B43_DMA32_RXENABLE;
374 value |= (addrext << B43_DMA32_RXADDREXT_SHIFT)
375 & B43_DMA32_RXADDREXT_MASK;
377 + value |= B43_DMA32_RXPARITYDISABLE;
378 b43_dma_write(ring, B43_DMA32_RXCTL, value);
379 b43_dma_write(ring, B43_DMA32_RXRING,
380 (ringbase & ~SSB_DMA_TRANSLATION_MASK)
381 @@ -1055,7 +1064,26 @@ int b43_dma_init(struct b43_wldev *dev)
382 err = b43_dma_set_mask(dev, dmamask);
385 - dma->translation = ssb_dma_translation(dev->sdev);
387 + switch (dev->dev->bus_type) {
388 +#ifdef CONFIG_B43_BCMA
390 + dma->translation = bcma_core_dma_translation(dev->dev->bdev);
393 +#ifdef CONFIG_B43_SSB
395 + dma->translation = ssb_dma_translation(dev->dev->sdev);
400 + dma->parity = true;
401 +#ifdef CONFIG_B43_BCMA
402 + /* TODO: find out which SSB devices need disabling parity */
403 + if (dev->dev->bus_type == B43_BUS_BCMA)
404 + dma->parity = false;
408 /* setup TX DMA channels. */
409 @@ -1600,6 +1628,7 @@ void b43_dma_rx(struct b43_dmaring *ring
411 update_max_used_slots(ring, ++used_slots);
414 ops->set_current_rxslot(ring, slot);
415 ring->current_slot = slot;
417 --- a/drivers/net/wireless/b43/dma.h
418 +++ b/drivers/net/wireless/b43/dma.h
420 #define B43_DMA32_TXSUSPEND 0x00000002
421 #define B43_DMA32_TXLOOPBACK 0x00000004
422 #define B43_DMA32_TXFLUSH 0x00000010
423 +#define B43_DMA32_TXPARITYDISABLE 0x00000800
424 #define B43_DMA32_TXADDREXT_MASK 0x00030000
425 #define B43_DMA32_TXADDREXT_SHIFT 16
426 #define B43_DMA32_TXRING 0x04
428 #define B43_DMA32_RXFROFF_MASK 0x000000FE
429 #define B43_DMA32_RXFROFF_SHIFT 1
430 #define B43_DMA32_RXDIRECTFIFO 0x00000100
431 +#define B43_DMA32_RXPARITYDISABLE 0x00000800
432 #define B43_DMA32_RXADDREXT_MASK 0x00030000
433 #define B43_DMA32_RXADDREXT_SHIFT 16
434 #define B43_DMA32_RXRING 0x14
435 @@ -84,6 +86,7 @@ struct b43_dmadesc32 {
436 #define B43_DMA64_TXSUSPEND 0x00000002
437 #define B43_DMA64_TXLOOPBACK 0x00000004
438 #define B43_DMA64_TXFLUSH 0x00000010
439 +#define B43_DMA64_TXPARITYDISABLE 0x00000800
440 #define B43_DMA64_TXADDREXT_MASK 0x00030000
441 #define B43_DMA64_TXADDREXT_SHIFT 16
442 #define B43_DMA64_TXINDEX 0x04
443 @@ -111,6 +114,7 @@ struct b43_dmadesc32 {
444 #define B43_DMA64_RXFROFF_MASK 0x000000FE
445 #define B43_DMA64_RXFROFF_SHIFT 1
446 #define B43_DMA64_RXDIRECTFIFO 0x00000100
447 +#define B43_DMA64_RXPARITYDISABLE 0x00000800
448 #define B43_DMA64_RXADDREXT_MASK 0x00030000
449 #define B43_DMA64_RXADDREXT_SHIFT 16
450 #define B43_DMA64_RXINDEX 0x24
451 --- a/drivers/net/wireless/b43/main.c
452 +++ b/drivers/net/wireless/b43/main.c
453 @@ -1136,6 +1136,41 @@ void b43_power_saving_ctl_bits(struct b4
457 +#ifdef CONFIG_B43_BCMA
458 +static void b43_bcma_phy_reset(struct b43_wldev *dev)
462 + /* Put PHY into reset */
463 + flags = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);
464 + flags |= B43_BCMA_IOCTL_PHY_RESET;
465 + flags |= B43_BCMA_IOCTL_PHY_BW_20MHZ; /* Make 20 MHz def */
466 + bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags);
469 + /* Take PHY out of reset */
470 + flags = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);
471 + flags &= ~B43_BCMA_IOCTL_PHY_RESET;
472 + flags |= BCMA_IOCTL_FGC;
473 + bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags);
476 + /* Do not force clock anymore */
477 + flags = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);
478 + flags &= ~BCMA_IOCTL_FGC;
479 + bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags);
483 +static void b43_bcma_wireless_core_reset(struct b43_wldev *dev, bool gmode)
485 + b43_device_enable(dev, B43_BCMA_IOCTL_PHY_CLKEN);
486 + bcma_core_set_clockmode(dev->dev->bdev, BCMA_CLKMODE_FAST);
487 + b43_bcma_phy_reset(dev);
488 + bcma_core_pll_ctl(dev->dev->bdev, 0x300, 0x3000000, true);
492 static void b43_ssb_wireless_core_reset(struct b43_wldev *dev, bool gmode)
494 struct ssb_device *sdev = dev->dev->sdev;
495 @@ -1168,7 +1203,18 @@ void b43_wireless_core_reset(struct b43_
499 - b43_ssb_wireless_core_reset(dev, gmode);
500 + switch (dev->dev->bus_type) {
501 +#ifdef CONFIG_B43_BCMA
503 + b43_bcma_wireless_core_reset(dev, gmode);
506 +#ifdef CONFIG_B43_SSB
508 + b43_ssb_wireless_core_reset(dev, gmode);
513 /* Turn Analog ON, but only if we already know the PHY-type.
514 * This protects against very early setup where we don't know the
515 @@ -1921,7 +1967,7 @@ static irqreturn_t b43_do_interrupt(stru
517 reason &= dev->irq_mask;
519 - return IRQ_HANDLED;
522 dev->dma_reason[0] = b43_read32(dev, B43_MMIO_DMA0_REASON)
524 @@ -2116,21 +2162,43 @@ static int b43_try_request_fw(struct b43
528 + /* Files for HT and LCN were found by trying one by one */
531 - if ((rev >= 5) && (rev <= 10))
532 + if ((rev >= 5) && (rev <= 10)) {
534 - else if ((rev >= 11) && (rev <= 12))
535 + } else if ((rev >= 11) && (rev <= 12)) {
536 filename = "ucode11";
537 - else if (rev == 13)
538 + } else if (rev == 13) {
539 filename = "ucode13";
540 - else if (rev == 14)
541 + } else if (rev == 14) {
542 filename = "ucode14";
543 - else if (rev == 15)
544 + } else if (rev == 15) {
545 filename = "ucode15";
546 - else if ((rev >= 16) && (rev <= 20))
547 - filename = "ucode16_mimo";
551 + switch (dev->phy.type) {
552 + case B43_PHYTYPE_N:
554 + filename = "ucode16_mimo";
558 + case B43_PHYTYPE_HT:
560 + filename = "ucode29_mimo";
564 + case B43_PHYTYPE_LCN:
566 + filename = "ucode24_mimo";
574 err = b43_do_request_fw(ctx, filename, &fw->ucode);
577 @@ -2189,6 +2257,18 @@ static int b43_try_request_fw(struct b43
579 goto err_no_initvals;
581 + case B43_PHYTYPE_HT:
583 + filename = "ht0initvals29";
585 + goto err_no_initvals;
587 + case B43_PHYTYPE_LCN:
589 + filename = "lcn0initvals24";
591 + goto err_no_initvals;
594 goto err_no_initvals;
596 @@ -2236,6 +2316,18 @@ static int b43_try_request_fw(struct b43
598 goto err_no_initvals;
600 + case B43_PHYTYPE_HT:
602 + filename = "ht0bsinitvals29";
604 + goto err_no_initvals;
606 + case B43_PHYTYPE_LCN:
608 + filename = "lcn0bsinitvals24";
610 + goto err_no_initvals;
613 goto err_no_initvals;
615 @@ -2607,11 +2699,24 @@ static int b43_gpio_init(struct b43_wlde
616 if (dev->dev->core_rev >= 2)
617 mask |= 0x0010; /* FIXME: This is redundant. */
619 - gpiodev = b43_ssb_gpio_dev(dev);
621 - ssb_write32(gpiodev, B43_GPIO_CONTROL,
622 - (ssb_read32(gpiodev, B43_GPIO_CONTROL)
624 + switch (dev->dev->bus_type) {
625 +#ifdef CONFIG_B43_BCMA
627 + bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
628 + (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc,
629 + BCMA_CC_GPIOCTL) & mask) | set);
632 +#ifdef CONFIG_B43_SSB
634 + gpiodev = b43_ssb_gpio_dev(dev);
636 + ssb_write32(gpiodev, B43_GPIO_CONTROL,
637 + (ssb_read32(gpiodev, B43_GPIO_CONTROL)
645 @@ -2621,9 +2726,21 @@ static void b43_gpio_cleanup(struct b43_
647 struct ssb_device *gpiodev;
649 - gpiodev = b43_ssb_gpio_dev(dev);
651 - ssb_write32(gpiodev, B43_GPIO_CONTROL, 0);
652 + switch (dev->dev->bus_type) {
653 +#ifdef CONFIG_B43_BCMA
655 + bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
659 +#ifdef CONFIG_B43_SSB
661 + gpiodev = b43_ssb_gpio_dev(dev);
663 + ssb_write32(gpiodev, B43_GPIO_CONTROL, 0);
669 /* http://bcm-specs.sipsolutions.net/EnableMac */
670 @@ -2695,12 +2812,30 @@ out:
671 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/MacPhyClkSet */
672 void b43_mac_phy_clock_set(struct b43_wldev *dev, bool on)
674 - u32 tmslow = ssb_read32(dev->sdev, SSB_TMSLOW);
676 - tmslow |= B43_TMSLOW_MACPHYCLKEN;
678 - tmslow &= ~B43_TMSLOW_MACPHYCLKEN;
679 - ssb_write32(dev->sdev, SSB_TMSLOW, tmslow);
682 + switch (dev->dev->bus_type) {
683 +#ifdef CONFIG_B43_BCMA
685 + tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);
687 + tmp |= B43_BCMA_IOCTL_MACPHYCLKEN;
689 + tmp &= ~B43_BCMA_IOCTL_MACPHYCLKEN;
690 + bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp);
693 +#ifdef CONFIG_B43_SSB
695 + tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);
697 + tmp |= B43_TMSLOW_MACPHYCLKEN;
699 + tmp &= ~B43_TMSLOW_MACPHYCLKEN;
700 + ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);
706 static void b43_adjust_opmode(struct b43_wldev *dev)
707 @@ -2939,8 +3074,20 @@ static int b43_chip_init(struct b43_wlde
709 b43_mac_phy_clock_set(dev, true);
711 - b43_write16(dev, B43_MMIO_POWERUP_DELAY,
712 - dev->sdev->bus->chipco.fast_pwrup_delay);
713 + switch (dev->dev->bus_type) {
714 +#ifdef CONFIG_B43_BCMA
716 + /* FIXME: 0xE74 is quite common, but should be read from CC */
717 + b43_write16(dev, B43_MMIO_POWERUP_DELAY, 0xE74);
720 +#ifdef CONFIG_B43_SSB
722 + b43_write16(dev, B43_MMIO_POWERUP_DELAY,
723 + dev->dev->sdev->bus->chipco.fast_pwrup_delay);
729 b43dbg(dev->wl, "Chip initialized\n");
730 @@ -3456,21 +3603,33 @@ static void b43_op_set_tsf(struct ieee80
732 static void b43_put_phy_into_reset(struct b43_wldev *dev)
734 - struct ssb_device *sdev = dev->sdev;
738 - tmslow = ssb_read32(sdev, SSB_TMSLOW);
739 - tmslow &= ~B43_TMSLOW_GMODE;
740 - tmslow |= B43_TMSLOW_PHYRESET;
741 - tmslow |= SSB_TMSLOW_FGC;
742 - ssb_write32(sdev, SSB_TMSLOW, tmslow);
744 + switch (dev->dev->bus_type) {
745 +#ifdef CONFIG_B43_BCMA
748 + "Putting PHY into reset not supported on BCMA\n");
751 +#ifdef CONFIG_B43_SSB
753 + tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);
754 + tmp &= ~B43_TMSLOW_GMODE;
755 + tmp |= B43_TMSLOW_PHYRESET;
756 + tmp |= SSB_TMSLOW_FGC;
757 + ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);
760 + tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);
761 + tmp &= ~SSB_TMSLOW_FGC;
762 + tmp |= B43_TMSLOW_PHYRESET;
763 + ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);
766 - tmslow = ssb_read32(sdev, SSB_TMSLOW);
767 - tmslow &= ~SSB_TMSLOW_FGC;
768 - tmslow |= B43_TMSLOW_PHYRESET;
769 - ssb_write32(sdev, SSB_TMSLOW, tmslow);
776 static const char *band_to_string(enum ieee80211_band band)
777 @@ -4100,6 +4259,12 @@ static int b43_phy_versioning(struct b43
781 +#ifdef CONFIG_B43_PHY_LCN
782 + case B43_PHYTYPE_LCN:
790 @@ -4113,22 +4278,42 @@ static int b43_phy_versioning(struct b43
791 analog_type, phy_type, phy_rev);
793 /* Get RADIO versioning */
794 - if (dev->dev->chip_id == 0x4317) {
795 - if (dev->dev->chip_rev == 0)
797 - else if (dev->dev->chip_rev == 1)
801 + if (dev->dev->core_rev >= 24) {
804 + for (tmp = 0; tmp < 3; tmp++) {
805 + b43_write16(dev, B43_MMIO_RADIO24_CONTROL, tmp);
806 + radio24[tmp] = b43_read16(dev, B43_MMIO_RADIO24_DATA);
809 + /* Broadcom uses "id" for our "ver" and has separated "ver" */
810 + /* radio_ver = (radio24[0] & 0xF0) >> 4; */
812 + radio_manuf = 0x17F;
813 + radio_ver = (radio24[2] << 8) | radio24[1];
814 + radio_rev = (radio24[0] & 0xF);
816 - b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID);
817 - tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
818 - b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID);
819 - tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH) << 16;
821 - radio_manuf = (tmp & 0x00000FFF);
822 - radio_ver = (tmp & 0x0FFFF000) >> 12;
823 - radio_rev = (tmp & 0xF0000000) >> 28;
824 + if (dev->dev->chip_id == 0x4317) {
825 + if (dev->dev->chip_rev == 0)
827 + else if (dev->dev->chip_rev == 1)
832 + b43_write16(dev, B43_MMIO_RADIO_CONTROL,
834 + tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
835 + b43_write16(dev, B43_MMIO_RADIO_CONTROL,
837 + tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH)
840 + radio_manuf = (tmp & 0x00000FFF);
841 + radio_ver = (tmp & 0x0FFFF000) >> 12;
842 + radio_rev = (tmp & 0xF0000000) >> 28;
845 if (radio_manuf != 0x17F /* Broadcom */)
848 @@ -4160,6 +4345,10 @@ static int b43_phy_versioning(struct b43
849 if (radio_ver != 0x2059)
852 + case B43_PHYTYPE_LCN:
853 + if (radio_ver != 0x2064)
859 @@ -4343,7 +4532,6 @@ static void b43_wireless_core_exit(struc
860 /* Initialize a wireless core */
861 static int b43_wireless_core_init(struct b43_wldev *dev)
863 - struct ssb_bus *bus = dev->sdev->bus;
864 struct ssb_sprom *sprom = dev->dev->bus_sprom;
865 struct b43_phy *phy = &dev->phy;
867 @@ -4362,7 +4550,20 @@ static int b43_wireless_core_init(struct
868 phy->ops->prepare_structs(dev);
870 /* Enable IRQ routing to this device. */
871 - ssb_pcicore_dev_irqvecs_enable(&bus->pcicore, dev->sdev);
872 + switch (dev->dev->bus_type) {
873 +#ifdef CONFIG_B43_BCMA
875 + bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci,
876 + dev->dev->bdev, true);
879 +#ifdef CONFIG_B43_SSB
881 + ssb_pcicore_dev_irqvecs_enable(&dev->dev->sdev->bus->pcicore,
887 b43_imcfglo_timeouts_workaround(dev);
888 b43_bluetooth_coext_disable(dev);
889 @@ -4393,8 +4594,9 @@ static int b43_wireless_core_init(struct
890 if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
891 hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
892 #ifdef CONFIG_SSB_DRIVER_PCICORE
893 - if ((bus->bustype == SSB_BUSTYPE_PCI) &&
894 - (bus->pcicore.dev->id.revision <= 10))
895 + if (dev->dev->bus_type == B43_BUS_SSB &&
896 + dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI &&
897 + dev->dev->sdev->bus->pcicore.dev->id.revision <= 10)
898 hf |= B43_HF_PCISCW; /* PCI slow clock workaround. */
900 hf &= ~B43_HF_SKCFPUP;
901 @@ -4764,9 +4966,9 @@ static void b43_wireless_core_detach(str
902 static int b43_wireless_core_attach(struct b43_wldev *dev)
904 struct b43_wl *wl = dev->wl;
905 - struct ssb_bus *bus = dev->sdev->bus;
906 - struct pci_dev *pdev = (bus->bustype == SSB_BUSTYPE_PCI) ? bus->host_pci : NULL;
907 + struct pci_dev *pdev = NULL;
910 bool have_2ghz_phy = 0, have_5ghz_phy = 0;
912 /* Do NOT do any device initialization here.
913 @@ -4776,20 +4978,38 @@ static int b43_wireless_core_attach(stru
914 * that in core_init(), too.
917 +#ifdef CONFIG_B43_SSB
918 + if (dev->dev->bus_type == B43_BUS_SSB &&
919 + dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI)
920 + pdev = dev->dev->sdev->bus->host_pci;
923 err = b43_bus_powerup(dev, 0);
925 b43err(wl, "Bus powerup failed\n");
928 - /* Get the PHY type. */
929 - if (dev->dev->core_rev >= 5) {
932 - tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH);
933 - have_2ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY);
934 - have_5ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_5GHZ_PHY);
937 + /* Get the PHY type. */
938 + switch (dev->dev->bus_type) {
939 +#ifdef CONFIG_B43_BCMA
941 + tmp = bcma_aread32(dev->dev->bdev, BCMA_IOST);
942 + have_2ghz_phy = !!(tmp & B43_BCMA_IOST_2G_PHY);
943 + have_5ghz_phy = !!(tmp & B43_BCMA_IOST_5G_PHY);
946 +#ifdef CONFIG_B43_SSB
948 + if (dev->dev->core_rev >= 5) {
949 + tmp = ssb_read32(dev->dev->sdev, SSB_TMSHIGH);
950 + have_2ghz_phy = !!(tmp & B43_TMSHIGH_HAVE_2GHZ_PHY);
951 + have_5ghz_phy = !!(tmp & B43_TMSHIGH_HAVE_5GHZ_PHY);
958 dev->phy.gmode = have_2ghz_phy;
959 dev->phy.radio_on = 1;
960 @@ -4815,6 +5035,8 @@ static int b43_wireless_core_attach(stru
964 + case B43_PHYTYPE_HT:
965 + case B43_PHYTYPE_LCN:
969 @@ -4877,13 +5099,13 @@ static void b43_one_core_detach(struct b
970 /* Do not cancel ieee80211-workqueue based work here.
971 * See comment in b43_remove(). */
973 - wldev = ssb_get_drvdata(dev->sdev);
974 + wldev = b43_bus_get_wldev(dev);
976 b43_debugfs_remove_device(wldev);
977 b43_wireless_core_detach(wldev);
978 list_del(&wldev->list);
980 - ssb_set_drvdata(dev->sdev, NULL);
981 + b43_bus_set_wldev(dev, NULL);
985 @@ -4898,7 +5120,6 @@ static int b43_one_core_attach(struct b4
987 wldev->use_pio = b43_modparam_pio;
989 - wldev->sdev = dev->sdev; /* TODO: Remove when not needed */
991 b43_set_status(wldev, B43_STAT_UNINIT);
992 wldev->bad_frames_preempt = modparam_bad_frames_preempt;
993 @@ -4910,7 +5131,7 @@ static int b43_one_core_attach(struct b4
995 list_add(&wldev->list, &wl->devlist);
997 - ssb_set_drvdata(dev->sdev, wldev);
998 + b43_bus_set_wldev(dev, wldev);
999 b43_debugfs_add_device(wldev);
1002 @@ -4959,11 +5180,12 @@ static void b43_wireless_exit(struct b43
1003 ieee80211_free_hw(hw);
1006 -static struct b43_wl *b43_wireless_init(struct ssb_device *dev)
1007 +static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
1009 - struct ssb_sprom *sprom = &dev->bus->sprom;
1010 + struct ssb_sprom *sprom = dev->bus_sprom;
1011 struct ieee80211_hw *hw;
1013 + char chip_name[6];
1015 hw = ieee80211_alloc_hw(sizeof(*wl), &b43_hw_ops);
1017 @@ -5002,21 +5224,70 @@ static struct b43_wl *b43_wireless_init(
1018 INIT_WORK(&wl->tx_work, b43_tx_work);
1019 skb_queue_head_init(&wl->tx_queue);
1021 - b43info(wl, "Broadcom %04X WLAN found (core revision %u)\n",
1022 - dev->bus->chip_id, dev->id.revision);
1023 + snprintf(chip_name, ARRAY_SIZE(chip_name),
1024 + (dev->chip_id > 0x9999) ? "%d" : "%04X", dev->chip_id);
1025 + b43info(wl, "Broadcom %s WLAN found (core revision %u)\n", chip_name,
1030 #ifdef CONFIG_B43_BCMA
1031 static int b43_bcma_probe(struct bcma_device *core)
1033 - b43err(NULL, "BCMA is not supported yet!");
1034 - return -EOPNOTSUPP;
1035 + struct b43_bus_dev *dev;
1036 + struct b43_wl *wl;
1039 + dev = b43_bus_dev_bcma_init(core);
1043 + wl = b43_wireless_init(dev);
1045 + err = PTR_ERR(wl);
1049 + err = b43_one_core_attach(dev, wl);
1051 + goto bcma_err_wireless_exit;
1053 + err = ieee80211_register_hw(wl->hw);
1055 + goto bcma_err_one_core_detach;
1056 + b43_leds_register(wl->current_dev);
1061 +bcma_err_one_core_detach:
1062 + b43_one_core_detach(dev);
1063 +bcma_err_wireless_exit:
1064 + ieee80211_free_hw(wl->hw);
1068 static void b43_bcma_remove(struct bcma_device *core)
1071 + struct b43_wldev *wldev = bcma_get_drvdata(core);
1072 + struct b43_wl *wl = wldev->wl;
1074 + /* We must cancel any work here before unregistering from ieee80211,
1075 + * as the ieee80211 unreg will destroy the workqueue. */
1076 + cancel_work_sync(&wldev->restart_work);
1078 + /* Restore the queues count before unregistering, because firmware detect
1079 + * might have modified it. Restoring is important, so the networking
1080 + * stack can properly free resources. */
1081 + wl->hw->queues = wl->mac80211_initially_registered_queues;
1082 + b43_leds_stop(wldev);
1083 + ieee80211_unregister_hw(wl->hw);
1085 + b43_one_core_detach(wldev->dev);
1087 + b43_leds_unregister(wl);
1089 + ieee80211_free_hw(wl->hw);
1092 static struct bcma_driver b43_bcma_driver = {
1093 @@ -5045,7 +5316,7 @@ int b43_ssb_probe(struct ssb_device *sde
1094 /* Probing the first core. Must setup common struct b43_wl */
1096 b43_sprom_fixup(sdev->bus);
1097 - wl = b43_wireless_init(sdev);
1098 + wl = b43_wireless_init(dev);
1102 --- a/drivers/net/wireless/b43/phy_common.c
1103 +++ b/drivers/net/wireless/b43/phy_common.c
1108 +#include "phy_lcn.h"
1112 @@ -65,6 +66,11 @@ int b43_phy_allocate(struct b43_wldev *d
1113 phy->ops = &b43_phyops_ht;
1116 + case B43_PHYTYPE_LCN:
1117 +#ifdef CONFIG_B43_PHY_LCN
1118 + phy->ops = &b43_phyops_lcn;
1122 if (B43_WARN_ON(!phy->ops))
1124 --- a/drivers/net/wireless/b43/phy_common.h
1125 +++ b/drivers/net/wireless/b43/phy_common.h
1126 @@ -198,6 +198,7 @@ struct b43_phy_g;
1130 +struct b43_phy_lcn;
1133 /* Hardware operation callbacks. */
1134 @@ -222,6 +223,8 @@ struct b43_phy {
1135 struct b43_phy_lp *lp;
1136 /* HT-PHY specific information */
1137 struct b43_phy_ht *ht;
1138 + /* LCN-PHY specific information */
1139 + struct b43_phy_lcn *lcn;
1142 /* Band support flags. */
1143 --- a/drivers/net/wireless/b43/phy_ht.c
1144 +++ b/drivers/net/wireless/b43/phy_ht.c
1149 +#include "tables_phy_ht.h"
1150 #include "radio_2059.h"
1153 +/**************************************************
1155 + **************************************************/
1157 static void b43_radio_2059_channel_setup(struct b43_wldev *dev,
1158 const struct b43_phy_ht_channeltab_e_radio2059 *e)
1160 @@ -56,7 +61,7 @@ static void b43_radio_2059_channel_setup
1161 b43_radio_write(dev, 0x98, e->radio_syn98);
1163 for (i = 0; i < 2; i++) {
1164 - routing = i ? 0x800 : 0x400;
1165 + routing = i ? R2059_RXRX1 : R2059_TXRX0;
1166 b43_radio_write(dev, routing | 0x4a, e->radio_rxtx4a);
1167 b43_radio_write(dev, routing | 0x58, e->radio_rxtx58);
1168 b43_radio_write(dev, routing | 0x5a, e->radio_rxtx5a);
1169 @@ -78,11 +83,120 @@ static void b43_radio_2059_channel_setup
1173 +static void b43_radio_2059_init(struct b43_wldev *dev)
1175 + const u16 routing[] = { R2059_SYN, R2059_TXRX0, R2059_RXRX1 };
1176 + const u16 radio_values[3][2] = {
1177 + { 0x61, 0xE9 }, { 0x69, 0xD5 }, { 0x73, 0x99 },
1181 + b43_radio_write(dev, R2059_ALL | 0x51, 0x0070);
1182 + b43_radio_write(dev, R2059_ALL | 0x5a, 0x0003);
1184 + for (i = 0; i < ARRAY_SIZE(routing); i++)
1185 + b43_radio_set(dev, routing[i] | 0x146, 0x3);
1187 + b43_radio_set(dev, 0x2e, 0x0078);
1188 + b43_radio_set(dev, 0xc0, 0x0080);
1190 + b43_radio_mask(dev, 0x2e, ~0x0078);
1191 + b43_radio_mask(dev, 0xc0, ~0x0080);
1193 + if (1) { /* FIXME */
1194 + b43_radio_set(dev, R2059_RXRX1 | 0x4, 0x1);
1196 + b43_radio_set(dev, R2059_RXRX1 | 0x0BF, 0x1);
1197 + b43_radio_maskset(dev, R2059_RXRX1 | 0x19B, 0x3, 0x2);
1199 + b43_radio_set(dev, R2059_RXRX1 | 0x4, 0x2);
1201 + b43_radio_mask(dev, R2059_RXRX1 | 0x4, ~0x2);
1203 + for (i = 0; i < 10000; i++) {
1204 + if (b43_radio_read(dev, R2059_RXRX1 | 0x145) & 1) {
1211 + b43err(dev->wl, "radio 0x945 timeout\n");
1213 + b43_radio_mask(dev, R2059_RXRX1 | 0x4, ~0x1);
1214 + b43_radio_set(dev, 0xa, 0x60);
1216 + for (i = 0; i < 3; i++) {
1217 + b43_radio_write(dev, 0x17F, radio_values[i][0]);
1218 + b43_radio_write(dev, 0x13D, 0x6E);
1219 + b43_radio_write(dev, 0x13E, radio_values[i][1]);
1220 + b43_radio_write(dev, 0x13C, 0x55);
1222 + for (j = 0; j < 10000; j++) {
1223 + if (b43_radio_read(dev, 0x140) & 2) {
1230 + b43err(dev->wl, "radio 0x140 timeout\n");
1232 + b43_radio_write(dev, 0x13C, 0x15);
1235 + b43_radio_mask(dev, 0x17F, ~0x1);
1238 + b43_radio_mask(dev, 0x11, ~0x0008);
1241 +/**************************************************
1242 + * Channel switching ops.
1243 + **************************************************/
1245 static void b43_phy_ht_channel_setup(struct b43_wldev *dev,
1246 const struct b43_phy_ht_channeltab_e_phy *e,
1247 struct ieee80211_channel *new_channel)
1250 + bool old_band_5ghz;
1253 + old_band_5ghz = b43_phy_read(dev, B43_PHY_HT_BANDCTL) & 0; /* FIXME */
1254 + if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) {
1256 + } else if (new_channel->band == IEEE80211_BAND_2GHZ && old_band_5ghz) {
1260 + b43_phy_write(dev, B43_PHY_HT_BW1, e->bw1);
1261 + b43_phy_write(dev, B43_PHY_HT_BW2, e->bw2);
1262 + b43_phy_write(dev, B43_PHY_HT_BW3, e->bw3);
1263 + b43_phy_write(dev, B43_PHY_HT_BW4, e->bw4);
1264 + b43_phy_write(dev, B43_PHY_HT_BW5, e->bw5);
1265 + b43_phy_write(dev, B43_PHY_HT_BW6, e->bw6);
1267 + /* TODO: some ops on PHY regs 0x0B0 and 0xC0A */
1269 + /* TODO: separated function? */
1270 + for (i = 0; i < 3; i++) {
1272 + u32 tmp = b43_httab_read(dev, B43_HTTAB32(26, 0xE8));
1274 + if (0) /* FIXME */
1275 + mask = 0x2 << (i * 4);
1278 + b43_phy_mask(dev, B43_PHY_EXTG(0x108), mask);
1280 + b43_httab_write(dev, B43_HTTAB16(7, 0x110 + i), tmp >> 16);
1281 + b43_httab_write(dev, B43_HTTAB8(13, 0x63 + (i * 4)),
1283 + b43_httab_write(dev, B43_HTTAB8(13, 0x73 + (i * 4)),
1287 + b43_phy_write(dev, 0x017e, 0x3830);
1290 static int b43_phy_ht_set_channel(struct b43_wldev *dev,
1291 @@ -139,6 +253,13 @@ static void b43_phy_ht_op_prepare_struct
1292 memset(phy_ht, 0, sizeof(*phy_ht));
1295 +static int b43_phy_ht_op_init(struct b43_wldev *dev)
1297 + b43_phy_ht_tables_init(dev);
1302 static void b43_phy_ht_op_free(struct b43_wldev *dev)
1304 struct b43_phy *phy = &dev->phy;
1305 @@ -155,13 +276,25 @@ static void b43_phy_ht_op_software_rfkil
1306 if (b43_read32(dev, B43_MMIO_MACCTL) & B43_MACCTL_ENABLED)
1307 b43err(dev->wl, "MAC not suspended\n");
1309 + /* In the following PHY ops we copy wl's dummy behaviour.
1310 + * TODO: Find out if reads (currently hidden in masks/masksets) are
1311 + * needed and replace following ops with just writes or w&r.
1312 + * Note: B43_PHY_HT_RF_CTL1 register is tricky, wrong operation can
1313 + * cause delayed (!) machine lock up. */
1315 - b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, ~0);
1316 + b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, 0);
1318 - b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, ~0);
1319 - b43_phy_maskset(dev, B43_PHY_HT_RF_CTL1, ~0, 0x1);
1320 - b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, ~0);
1321 - b43_phy_maskset(dev, B43_PHY_HT_RF_CTL1, ~0, 0x2);
1322 + b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, 0);
1323 + b43_phy_maskset(dev, B43_PHY_HT_RF_CTL1, 0, 0x1);
1324 + b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, 0);
1325 + b43_phy_maskset(dev, B43_PHY_HT_RF_CTL1, 0, 0x2);
1327 + if (dev->phy.radio_ver == 0x2059)
1328 + b43_radio_2059_init(dev);
1332 + b43_switch_channel(dev, dev->phy.channel);
1336 @@ -203,7 +336,7 @@ static int b43_phy_ht_op_switch_channel(
1337 static unsigned int b43_phy_ht_op_get_default_chan(struct b43_wldev *dev)
1339 if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
1345 @@ -247,6 +380,16 @@ static void b43_phy_ht_op_radio_write(st
1346 b43_write16(dev, B43_MMIO_RADIO24_DATA, value);
1349 +static enum b43_txpwr_result
1350 +b43_phy_ht_op_recalc_txpower(struct b43_wldev *dev, bool ignore_tssi)
1352 + return B43_TXPWR_RES_DONE;
1355 +static void b43_phy_ht_op_adjust_txpower(struct b43_wldev *dev)
1359 /**************************************************
1361 **************************************************/
1362 @@ -255,9 +398,7 @@ const struct b43_phy_operations b43_phyo
1363 .allocate = b43_phy_ht_op_allocate,
1364 .free = b43_phy_ht_op_free,
1365 .prepare_structs = b43_phy_ht_op_prepare_structs,
1367 .init = b43_phy_ht_op_init,
1369 .phy_read = b43_phy_ht_op_read,
1370 .phy_write = b43_phy_ht_op_write,
1371 .phy_maskset = b43_phy_ht_op_maskset,
1372 @@ -267,8 +408,6 @@ const struct b43_phy_operations b43_phyo
1373 .switch_analog = b43_phy_ht_op_switch_analog,
1374 .switch_channel = b43_phy_ht_op_switch_channel,
1375 .get_default_chan = b43_phy_ht_op_get_default_chan,
1377 .recalc_txpower = b43_phy_ht_op_recalc_txpower,
1378 .adjust_txpower = b43_phy_ht_op_adjust_txpower,
1381 --- a/drivers/net/wireless/b43/phy_ht.h
1382 +++ b/drivers/net/wireless/b43/phy_ht.h
1384 #include "phy_common.h"
1387 +#define B43_PHY_HT_BANDCTL 0x009 /* Band control */
1388 #define B43_PHY_HT_TABLE_ADDR 0x072 /* Table address */
1389 #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */
1390 #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */
1391 +#define B43_PHY_HT_BW1 0x1CE
1392 +#define B43_PHY_HT_BW2 0x1CF
1393 +#define B43_PHY_HT_BW3 0x1D0
1394 +#define B43_PHY_HT_BW4 0x1D1
1395 +#define B43_PHY_HT_BW5 0x1D2
1396 +#define B43_PHY_HT_BW6 0x1D3
1398 #define B43_PHY_HT_RF_CTL1 B43_PHY_EXTG(0x010)
1402 /* Values for PHY registers used on channel switching */
1403 struct b43_phy_ht_channeltab_e_phy {
1415 +++ b/drivers/net/wireless/b43/phy_lcn.c
1419 + Broadcom B43 wireless driver
1420 + IEEE 802.11n LCN-PHY support
1422 + This program is free software; you can redistribute it and/or modify
1423 + it under the terms of the GNU General Public License as published by
1424 + the Free Software Foundation; either version 2 of the License, or
1425 + (at your option) any later version.
1427 + This program is distributed in the hope that it will be useful,
1428 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1429 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1430 + GNU General Public License for more details.
1432 + You should have received a copy of the GNU General Public License
1433 + along with this program; see the file COPYING. If not, write to
1434 + the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
1435 + Boston, MA 02110-1301, USA.
1439 +#include <linux/slab.h>
1442 +#include "phy_lcn.h"
1443 +#include "tables_phy_lcn.h"
1446 +/**************************************************
1448 + **************************************************/
1450 +const struct b43_phy_operations b43_phyops_lcn = {
1452 + .allocate = b43_phy_lcn_op_allocate,
1453 + .free = b43_phy_lcn_op_free,
1454 + .prepare_structs = b43_phy_lcn_op_prepare_structs,
1455 + .init = b43_phy_lcn_op_init,
1456 + .phy_read = b43_phy_lcn_op_read,
1457 + .phy_write = b43_phy_lcn_op_write,
1458 + .phy_maskset = b43_phy_lcn_op_maskset,
1459 + .radio_read = b43_phy_lcn_op_radio_read,
1460 + .radio_write = b43_phy_lcn_op_radio_write,
1461 + .software_rfkill = b43_phy_lcn_op_software_rfkill,
1462 + .switch_analog = b43_phy_lcn_op_switch_analog,
1463 + .switch_channel = b43_phy_lcn_op_switch_channel,
1464 + .get_default_chan = b43_phy_lcn_op_get_default_chan,
1465 + .recalc_txpower = b43_phy_lcn_op_recalc_txpower,
1466 + .adjust_txpower = b43_phy_lcn_op_adjust_txpower,
1470 +++ b/drivers/net/wireless/b43/phy_lcn.h
1472 +#ifndef B43_PHY_LCN_H_
1473 +#define B43_PHY_LCN_H_
1475 +#include "phy_common.h"
1478 +struct b43_phy_lcn {
1482 +struct b43_phy_operations;
1483 +extern const struct b43_phy_operations b43_phyops_lcn;
1485 +#endif /* B43_PHY_LCN_H_ */
1486 \ No newline at end of file
1487 --- a/drivers/net/wireless/b43/phy_n.c
1488 +++ b/drivers/net/wireless/b43/phy_n.c
1489 @@ -603,17 +603,33 @@ static void b43_nphy_tx_lp_fbw(struct b4
1490 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */
1491 static void b43_nphy_bmac_clock_fgc(struct b43_wldev *dev, bool force)
1496 if (dev->phy.type != B43_PHYTYPE_N)
1499 - tmslow = ssb_read32(dev->sdev, SSB_TMSLOW);
1501 - tmslow |= SSB_TMSLOW_FGC;
1503 - tmslow &= ~SSB_TMSLOW_FGC;
1504 - ssb_write32(dev->sdev, SSB_TMSLOW, tmslow);
1505 + switch (dev->dev->bus_type) {
1506 +#ifdef CONFIG_B43_BCMA
1507 + case B43_BUS_BCMA:
1508 + tmp = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);
1510 + tmp |= BCMA_IOCTL_FGC;
1512 + tmp &= ~BCMA_IOCTL_FGC;
1513 + bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, tmp);
1516 +#ifdef CONFIG_B43_SSB
1518 + tmp = ssb_read32(dev->dev->sdev, SSB_TMSLOW);
1520 + tmp |= SSB_TMSLOW_FGC;
1522 + tmp &= ~SSB_TMSLOW_FGC;
1523 + ssb_write32(dev->dev->sdev, SSB_TMSLOW, tmp);
1529 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */
1530 @@ -958,8 +974,21 @@ static void b43_nphy_superswitch_init(st
1531 b43_phy_write(dev, B43_NPHY_GPIO_LOOEN, 0);
1532 b43_phy_write(dev, B43_NPHY_GPIO_HIOEN, 0);
1534 - ssb_chipco_gpio_control(&dev->sdev->bus->chipco, 0xFC00,
1536 + switch (dev->dev->bus_type) {
1537 +#ifdef CONFIG_B43_BCMA
1538 + case B43_BUS_BCMA:
1539 + bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc,
1543 +#ifdef CONFIG_B43_SSB
1545 + ssb_chipco_gpio_control(&dev->dev->sdev->bus->chipco,
1551 b43_write32(dev, B43_MMIO_MACCTL,
1552 b43_read32(dev, B43_MMIO_MACCTL) &
1553 ~B43_MACCTL_GPOUTSMSK);
1554 @@ -3600,7 +3629,20 @@ int b43_phy_initn(struct b43_wldev *dev)
1555 if ((dev->phy.rev >= 3) &&
1556 (sprom->boardflags_lo & B43_BFL_EXTLNA) &&
1557 (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) {
1558 - chipco_set32(&dev->sdev->bus->chipco, SSB_CHIPCO_CHIPCTL, 0x40);
1559 + switch (dev->dev->bus_type) {
1560 +#ifdef CONFIG_B43_BCMA
1561 + case B43_BUS_BCMA:
1562 + bcma_cc_set32(&dev->dev->bdev->bus->drv_cc,
1563 + BCMA_CC_CHIPCTL, 0x40);
1566 +#ifdef CONFIG_B43_SSB
1568 + chipco_set32(&dev->dev->sdev->bus->chipco,
1569 + SSB_CHIPCO_CHIPCTL, 0x40);
1574 nphy->deaf_count = 0;
1575 b43_nphy_tables_init(dev);
1576 --- a/drivers/net/wireless/b43/radio_2059.c
1577 +++ b/drivers/net/wireless/b43/radio_2059.c
1580 #include "radio_2059.h"
1582 +#define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
1583 + r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
1584 + r20, r21, r22, r23, r24, r25, r26, r27, r28) \
1585 + .radio_syn16 = r00, \
1586 + .radio_syn17 = r01, \
1587 + .radio_syn22 = r02, \
1588 + .radio_syn25 = r03, \
1589 + .radio_syn27 = r04, \
1590 + .radio_syn28 = r05, \
1591 + .radio_syn29 = r06, \
1592 + .radio_syn2c = r07, \
1593 + .radio_syn2d = r08, \
1594 + .radio_syn37 = r09, \
1595 + .radio_syn41 = r10, \
1596 + .radio_syn43 = r11, \
1597 + .radio_syn47 = r12, \
1598 + .radio_syn4a = r13, \
1599 + .radio_syn58 = r14, \
1600 + .radio_syn5a = r15, \
1601 + .radio_syn6a = r16, \
1602 + .radio_syn6d = r17, \
1603 + .radio_syn6e = r18, \
1604 + .radio_syn92 = r19, \
1605 + .radio_syn98 = r20, \
1606 + .radio_rxtx4a = r21, \
1607 + .radio_rxtx58 = r22, \
1608 + .radio_rxtx5a = r23, \
1609 + .radio_rxtx6a = r24, \
1610 + .radio_rxtx6d = r25, \
1611 + .radio_rxtx6e = r26, \
1612 + .radio_rxtx92 = r27, \
1613 + .radio_rxtx98 = r28
1615 +#define PHYREGS(r0, r1, r2, r3, r4, r5) \
1616 + .phy_regs.bw1 = r0, \
1617 + .phy_regs.bw2 = r1, \
1618 + .phy_regs.bw3 = r2, \
1619 + .phy_regs.bw4 = r3, \
1620 + .phy_regs.bw5 = r4, \
1621 + .phy_regs.bw6 = r5
1623 +static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = {
1625 + RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c,
1626 + 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
1627 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1628 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1629 + PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
1632 + RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71,
1633 + 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
1634 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1635 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1636 + PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
1639 + RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76,
1640 + 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
1641 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1642 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1643 + PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
1646 + RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b,
1647 + 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
1648 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1649 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1650 + PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
1653 + RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80,
1654 + 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
1655 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1656 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1657 + PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
1660 + RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85,
1661 + 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
1662 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1663 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1664 + PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
1667 + RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a,
1668 + 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
1669 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1670 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1671 + PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
1674 + RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f,
1675 + 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
1676 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1677 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1678 + PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
1681 + RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94,
1682 + 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
1683 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1684 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1685 + PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
1688 + RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99,
1689 + 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
1690 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1691 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1692 + PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
1695 + RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e,
1696 + 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
1697 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1698 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1699 + PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
1702 + RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3,
1703 + 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
1704 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1705 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1706 + PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b),
1709 + RADIOREGS(0x70, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa8,
1710 + 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
1711 + 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
1712 + 0x00, 0x00, 0x00, 0xf0, 0x00),
1713 + PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
1717 const struct b43_phy_ht_channeltab_e_radio2059
1718 *b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq)
1720 + const struct b43_phy_ht_channeltab_e_radio2059 *e;
1723 + e = b43_phy_ht_channeltab_radio2059;
1724 + for (i = 0; i < ARRAY_SIZE(b43_phy_ht_channeltab_radio2059); i++, e++) {
1725 + if (e->freq == freq)
1731 --- a/drivers/net/wireless/b43/radio_2059.h
1732 +++ b/drivers/net/wireless/b43/radio_2059.h
1737 +#define R2059_SYN 0x000
1738 +#define R2059_TXRX0 0x400
1739 +#define R2059_RXRX1 0x800
1740 +#define R2059_ALL 0xC00
1742 /* Values for various registers uploaded on channel switching */
1743 struct b43_phy_ht_channeltab_e_radio2059 {
1744 /* The channel frequency in MHz */
1746 +++ b/drivers/net/wireless/b43/tables_phy_ht.c
1750 + Broadcom B43 wireless driver
1751 + IEEE 802.11n HT-PHY data tables
1753 + This program is free software; you can redistribute it and/or modify
1754 + it under the terms of the GNU General Public License as published by
1755 + the Free Software Foundation; either version 2 of the License, or
1756 + (at your option) any later version.
1758 + This program is distributed in the hope that it will be useful,
1759 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1760 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1761 + GNU General Public License for more details.
1763 + You should have received a copy of the GNU General Public License
1764 + along with this program; see the file COPYING. If not, write to
1765 + the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
1766 + Boston, MA 02110-1301, USA.
1771 +#include "tables_phy_ht.h"
1772 +#include "phy_common.h"
1773 +#include "phy_ht.h"
1775 +static const u16 b43_httab_0x12[] = {
1776 + 0x0000, 0x0008, 0x000a, 0x0010, 0x0012, 0x0019,
1777 + 0x001a, 0x001c, 0x0080, 0x0088, 0x008a, 0x0090,
1778 + 0x0092, 0x0099, 0x009a, 0x009c, 0x0100, 0x0108,
1779 + 0x010a, 0x0110, 0x0112, 0x0119, 0x011a, 0x011c,
1780 + 0x0180, 0x0188, 0x018a, 0x0190, 0x0192, 0x0199,
1781 + 0x019a, 0x019c, 0x0000, 0x0098, 0x00a0, 0x00a8,
1782 + 0x009a, 0x00a2, 0x00aa, 0x0120, 0x0128, 0x0128,
1783 + 0x0130, 0x0138, 0x0138, 0x0140, 0x0122, 0x012a,
1784 + 0x012a, 0x0132, 0x013a, 0x013a, 0x0142, 0x01a8,
1785 + 0x01b0, 0x01b8, 0x01b0, 0x01b8, 0x01c0, 0x01c8,
1786 + 0x01c0, 0x01c8, 0x01d0, 0x01d0, 0x01d8, 0x01aa,
1787 + 0x01b2, 0x01ba, 0x01b2, 0x01ba, 0x01c2, 0x01ca,
1788 + 0x01c2, 0x01ca, 0x01d2, 0x01d2, 0x01da, 0x0001,
1789 + 0x0002, 0x0004, 0x0009, 0x000c, 0x0011, 0x0014,
1790 + 0x0018, 0x0020, 0x0021, 0x0022, 0x0024, 0x0081,
1791 + 0x0082, 0x0084, 0x0089, 0x008c, 0x0091, 0x0094,
1792 + 0x0098, 0x00a0, 0x00a1, 0x00a2, 0x00a4, 0x0007,
1793 + 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
1794 + 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
1795 + 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
1796 + 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
1800 +static const u16 b43_httab_0x27[] = {
1801 + 0x0009, 0x000e, 0x0011, 0x0014, 0x0017, 0x001a,
1802 + 0x001d, 0x0020, 0x0009, 0x000e, 0x0011, 0x0014,
1803 + 0x0017, 0x001a, 0x001d, 0x0020, 0x0009, 0x000e,
1804 + 0x0011, 0x0014, 0x0017, 0x001a, 0x001d, 0x0020,
1805 + 0x0009, 0x000e, 0x0011, 0x0014, 0x0017, 0x001a,
1809 +static const u16 b43_httab_0x26[] = {
1810 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1811 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1812 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1813 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1814 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1815 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1816 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1817 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1818 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1819 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1820 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1821 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1822 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1823 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1824 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1825 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1826 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1827 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1828 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1829 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1830 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1834 +static const u32 b43_httab_0x25[] = {
1835 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1836 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1837 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1838 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1839 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1840 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1841 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1842 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1843 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1844 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1845 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1846 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1847 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1848 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1849 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1850 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1851 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1852 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1853 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1854 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1855 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1856 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1857 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1858 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1859 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1860 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1861 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1862 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1863 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1864 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1865 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1866 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1869 +static const u32 b43_httab_0x2f[] = {
1870 + 0x00035700, 0x0002cc9a, 0x00026666, 0x0001581f,
1871 + 0x0001581f, 0x0001581f, 0x0001581f, 0x0001581f,
1872 + 0x0001581f, 0x0001581f, 0x0001581f, 0x00035700,
1873 + 0x0002cc9a, 0x00026666, 0x0001581f, 0x0001581f,
1874 + 0x0001581f, 0x0001581f, 0x0001581f, 0x0001581f,
1875 + 0x0001581f, 0x0001581f,
1878 +static const u16 b43_httab_0x1a[] = {
1879 + 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052,
1880 + 0x0051, 0x0051, 0x0050, 0x004f, 0x004f, 0x004e,
1881 + 0x004e, 0x004d, 0x004c, 0x004c, 0x004b, 0x004a,
1882 + 0x0049, 0x0049, 0x0048, 0x0047, 0x0046, 0x0046,
1883 + 0x0045, 0x0044, 0x0043, 0x0042, 0x0041, 0x0040,
1884 + 0x0040, 0x003f, 0x003e, 0x003d, 0x003c, 0x003a,
1885 + 0x0039, 0x0038, 0x0037, 0x0036, 0x0035, 0x0033,
1886 + 0x0032, 0x0031, 0x002f, 0x002e, 0x002c, 0x002b,
1887 + 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001f,
1888 + 0x001d, 0x001a, 0x0018, 0x0015, 0x0012, 0x000e,
1889 + 0x000b, 0x0007, 0x0002, 0x00fd,
1892 +static const u16 b43_httab_0x1b[] = {
1893 + 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052,
1894 + 0x0051, 0x0051, 0x0050, 0x004f, 0x004f, 0x004e,
1895 + 0x004e, 0x004d, 0x004c, 0x004c, 0x004b, 0x004a,
1896 + 0x0049, 0x0049, 0x0048, 0x0047, 0x0046, 0x0046,
1897 + 0x0045, 0x0044, 0x0043, 0x0042, 0x0041, 0x0040,
1898 + 0x0040, 0x003f, 0x003e, 0x003d, 0x003c, 0x003a,
1899 + 0x0039, 0x0038, 0x0037, 0x0036, 0x0035, 0x0033,
1900 + 0x0032, 0x0031, 0x002f, 0x002e, 0x002c, 0x002b,
1901 + 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001f,
1902 + 0x001d, 0x001a, 0x0018, 0x0015, 0x0012, 0x000e,
1903 + 0x000b, 0x0007, 0x0002, 0x00fd,
1906 +static const u16 b43_httab_0x1c[] = {
1907 + 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052,
1908 + 0x0051, 0x0051, 0x0050, 0x004f, 0x004f, 0x004e,
1909 + 0x004e, 0x004d, 0x004c, 0x004c, 0x004b, 0x004a,
1910 + 0x0049, 0x0049, 0x0048, 0x0047, 0x0046, 0x0046,
1911 + 0x0045, 0x0044, 0x0043, 0x0042, 0x0041, 0x0040,
1912 + 0x0040, 0x003f, 0x003e, 0x003d, 0x003c, 0x003a,
1913 + 0x0039, 0x0038, 0x0037, 0x0036, 0x0035, 0x0033,
1914 + 0x0032, 0x0031, 0x002f, 0x002e, 0x002c, 0x002b,
1915 + 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001f,
1916 + 0x001d, 0x001a, 0x0018, 0x0015, 0x0012, 0x000e,
1917 + 0x000b, 0x0007, 0x0002, 0x00fd,
1920 +static const u32 b43_httab_0x1a_0xc0[] = {
1921 + 0x5bf70044, 0x5bf70042, 0x5bf70040, 0x5bf7003e,
1922 + 0x5bf7003c, 0x5bf7003b, 0x5bf70039, 0x5bf70037,
1923 + 0x5bf70036, 0x5bf70034, 0x5bf70033, 0x5bf70031,
1924 + 0x5bf70030, 0x5ba70044, 0x5ba70042, 0x5ba70040,
1925 + 0x5ba7003e, 0x5ba7003c, 0x5ba7003b, 0x5ba70039,
1926 + 0x5ba70037, 0x5ba70036, 0x5ba70034, 0x5ba70033,
1927 + 0x5b770044, 0x5b770042, 0x5b770040, 0x5b77003e,
1928 + 0x5b77003c, 0x5b77003b, 0x5b770039, 0x5b770037,
1929 + 0x5b770036, 0x5b770034, 0x5b770033, 0x5b770031,
1930 + 0x5b770030, 0x5b77002f, 0x5b77002d, 0x5b77002c,
1931 + 0x5b470044, 0x5b470042, 0x5b470040, 0x5b47003e,
1932 + 0x5b47003c, 0x5b47003b, 0x5b470039, 0x5b470037,
1933 + 0x5b470036, 0x5b470034, 0x5b470033, 0x5b470031,
1934 + 0x5b470030, 0x5b47002f, 0x5b47002d, 0x5b47002c,
1935 + 0x5b47002b, 0x5b47002a, 0x5b270044, 0x5b270042,
1936 + 0x5b270040, 0x5b27003e, 0x5b27003c, 0x5b27003b,
1937 + 0x5b270039, 0x5b270037, 0x5b270036, 0x5b270034,
1938 + 0x5b270033, 0x5b270031, 0x5b270030, 0x5b27002f,
1939 + 0x5b170044, 0x5b170042, 0x5b170040, 0x5b17003e,
1940 + 0x5b17003c, 0x5b17003b, 0x5b170039, 0x5b170037,
1941 + 0x5b170036, 0x5b170034, 0x5b170033, 0x5b170031,
1942 + 0x5b170030, 0x5b17002f, 0x5b17002d, 0x5b17002c,
1943 + 0x5b17002b, 0x5b17002a, 0x5b170028, 0x5b170027,
1944 + 0x5b170026, 0x5b170025, 0x5b170024, 0x5b170023,
1945 + 0x5b070044, 0x5b070042, 0x5b070040, 0x5b07003e,
1946 + 0x5b07003c, 0x5b07003b, 0x5b070039, 0x5b070037,
1947 + 0x5b070036, 0x5b070034, 0x5b070033, 0x5b070031,
1948 + 0x5b070030, 0x5b07002f, 0x5b07002d, 0x5b07002c,
1949 + 0x5b07002b, 0x5b07002a, 0x5b070028, 0x5b070027,
1950 + 0x5b070026, 0x5b070025, 0x5b070024, 0x5b070023,
1951 + 0x5b070022, 0x5b070021, 0x5b070020, 0x5b07001f,
1952 + 0x5b07001e, 0x5b07001d, 0x5b07001d, 0x5b07001c,
1955 +static const u32 b43_httab_0x1a_0x140[] = {
1956 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1957 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1958 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1959 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1960 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1961 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1962 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1963 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1964 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1965 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1966 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1967 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1968 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1969 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1970 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1971 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1972 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1973 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1974 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1975 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1976 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1977 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1978 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1979 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1980 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1981 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1982 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1983 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1984 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1985 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1986 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1987 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1990 +static const u32 b43_httab_0x1b_0x140[] = {
1991 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1992 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1993 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1994 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1995 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1996 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1997 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1998 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1999 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2000 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2001 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2002 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2003 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2004 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2005 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2006 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2007 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2008 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2009 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2010 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2011 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2012 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2013 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2014 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2015 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2016 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2017 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2018 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2019 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2020 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2021 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2022 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2025 +static const u32 b43_httab_0x1c_0x140[] = {
2026 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2027 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2028 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2029 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2030 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2031 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2032 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2033 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2034 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2035 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2036 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2037 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2038 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2039 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2040 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2041 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2042 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2043 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2044 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2045 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2046 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2047 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2048 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2049 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2050 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2051 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2052 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2053 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2054 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2055 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2056 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2057 + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2060 +static const u16 b43_httab_0x1a_0x1c0[] = {
2061 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2062 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2063 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2064 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2065 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2066 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2067 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2068 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2069 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2070 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2071 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2072 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2073 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2074 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2075 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2076 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2077 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2078 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2079 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2080 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2081 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2085 +static const u16 b43_httab_0x1b_0x1c0[] = {
2086 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2087 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2088 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2089 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2090 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2091 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2092 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2093 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2094 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2095 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2096 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2097 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2098 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2099 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2100 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2101 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2102 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2103 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2104 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2105 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2106 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2110 +static const u16 b43_httab_0x1c_0x1c0[] = {
2111 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2112 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2113 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2114 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2115 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2116 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2117 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2118 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2119 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2120 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2121 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2122 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2123 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2124 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2125 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2126 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2127 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2128 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2129 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2130 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2131 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
2135 +static const u16 b43_httab_0x1a_0x240[] = {
2136 + 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
2137 + 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
2138 + 0x0036, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
2139 + 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
2140 + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
2141 + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
2142 + 0x001e, 0x001e, 0x001e, 0x001e, 0x000e, 0x000e,
2143 + 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
2144 + 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
2145 + 0x000e, 0x000e, 0x000e, 0x000e, 0x01fc, 0x01fc,
2146 + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
2147 + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
2148 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2149 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2150 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2151 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2152 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2153 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2154 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2155 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2156 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2160 +static const u16 b43_httab_0x1b_0x240[] = {
2161 + 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
2162 + 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
2163 + 0x0036, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
2164 + 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
2165 + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
2166 + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
2167 + 0x001e, 0x001e, 0x001e, 0x001e, 0x000e, 0x000e,
2168 + 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
2169 + 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
2170 + 0x000e, 0x000e, 0x000e, 0x000e, 0x01fc, 0x01fc,
2171 + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
2172 + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
2173 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2174 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2175 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2176 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2177 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2178 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2179 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2180 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2181 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2185 +static const u16 b43_httab_0x1c_0x240[] = {
2186 + 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
2187 + 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
2188 + 0x0036, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
2189 + 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
2190 + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
2191 + 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
2192 + 0x001e, 0x001e, 0x001e, 0x001e, 0x000e, 0x000e,
2193 + 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
2194 + 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
2195 + 0x000e, 0x000e, 0x000e, 0x000e, 0x01fc, 0x01fc,
2196 + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
2197 + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
2198 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2199 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2200 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2201 + 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
2202 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2203 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2204 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2205 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2206 + 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
2210 +static const u32 b43_httab_0x1f[] = {
2211 + 0x00000000, 0x00000000, 0x00016023, 0x00006028,
2212 + 0x00034036, 0x0003402e, 0x0007203c, 0x0006e037,
2213 + 0x00070030, 0x0009401f, 0x0009a00f, 0x000b600d,
2214 + 0x000c8007, 0x000ce007, 0x00101fff, 0x00121ff9,
2215 + 0x0012e004, 0x0014dffc, 0x0016dff6, 0x0018dfe9,
2216 + 0x001b3fe5, 0x001c5fd0, 0x001ddfc2, 0x001f1fb6,
2217 + 0x00207fa4, 0x00219f8f, 0x0022ff7d, 0x00247f6c,
2218 + 0x0024df5b, 0x00267f4b, 0x0027df3b, 0x0029bf3b,
2219 + 0x002b5f2f, 0x002d3f2e, 0x002f5f2a, 0x002fff15,
2220 + 0x00315f0b, 0x0032defa, 0x0033beeb, 0x0034fed9,
2221 + 0x00353ec5, 0x00361eb0, 0x00363e9b, 0x0036be87,
2222 + 0x0036be70, 0x0038fe67, 0x0044beb2, 0x00513ef3,
2223 + 0x00595f11, 0x00669f3d, 0x0078dfdf, 0x00a143aa,
2224 + 0x01642fff, 0x0162afff, 0x01620fff, 0x0160cfff,
2225 + 0x015f0fff, 0x015dafff, 0x015bcfff, 0x015bcfff,
2226 + 0x015b4fff, 0x015acfff, 0x01590fff, 0x0156cfff,
2229 +static const u32 b43_httab_0x21[] = {
2230 + 0x00000000, 0x00000000, 0x00016023, 0x00006028,
2231 + 0x00034036, 0x0003402e, 0x0007203c, 0x0006e037,
2232 + 0x00070030, 0x0009401f, 0x0009a00f, 0x000b600d,
2233 + 0x000c8007, 0x000ce007, 0x00101fff, 0x00121ff9,
2234 + 0x0012e004, 0x0014dffc, 0x0016dff6, 0x0018dfe9,
2235 + 0x001b3fe5, 0x001c5fd0, 0x001ddfc2, 0x001f1fb6,
2236 + 0x00207fa4, 0x00219f8f, 0x0022ff7d, 0x00247f6c,
2237 + 0x0024df5b, 0x00267f4b, 0x0027df3b, 0x0029bf3b,
2238 + 0x002b5f2f, 0x002d3f2e, 0x002f5f2a, 0x002fff15,
2239 + 0x00315f0b, 0x0032defa, 0x0033beeb, 0x0034fed9,
2240 + 0x00353ec5, 0x00361eb0, 0x00363e9b, 0x0036be87,
2241 + 0x0036be70, 0x0038fe67, 0x0044beb2, 0x00513ef3,
2242 + 0x00595f11, 0x00669f3d, 0x0078dfdf, 0x00a143aa,
2243 + 0x01642fff, 0x0162afff, 0x01620fff, 0x0160cfff,
2244 + 0x015f0fff, 0x015dafff, 0x015bcfff, 0x015bcfff,
2245 + 0x015b4fff, 0x015acfff, 0x01590fff, 0x0156cfff,
2248 +static const u32 b43_httab_0x23[] = {
2249 + 0x00000000, 0x00000000, 0x00016023, 0x00006028,
2250 + 0x00034036, 0x0003402e, 0x0007203c, 0x0006e037,
2251 + 0x00070030, 0x0009401f, 0x0009a00f, 0x000b600d,
2252 + 0x000c8007, 0x000ce007, 0x00101fff, 0x00121ff9,
2253 + 0x0012e004, 0x0014dffc, 0x0016dff6, 0x0018dfe9,
2254 + 0x001b3fe5, 0x001c5fd0, 0x001ddfc2, 0x001f1fb6,
2255 + 0x00207fa4, 0x00219f8f, 0x0022ff7d, 0x00247f6c,
2256 + 0x0024df5b, 0x00267f4b, 0x0027df3b, 0x0029bf3b,
2257 + 0x002b5f2f, 0x002d3f2e, 0x002f5f2a, 0x002fff15,
2258 + 0x00315f0b, 0x0032defa, 0x0033beeb, 0x0034fed9,
2259 + 0x00353ec5, 0x00361eb0, 0x00363e9b, 0x0036be87,
2260 + 0x0036be70, 0x0038fe67, 0x0044beb2, 0x00513ef3,
2261 + 0x00595f11, 0x00669f3d, 0x0078dfdf, 0x00a143aa,
2262 + 0x01642fff, 0x0162afff, 0x01620fff, 0x0160cfff,
2263 + 0x015f0fff, 0x015dafff, 0x015bcfff, 0x015bcfff,
2264 + 0x015b4fff, 0x015acfff, 0x01590fff, 0x0156cfff,
2267 +static const u32 b43_httab_0x20[] = {
2268 + 0x0b5e002d, 0x0ae2002f, 0x0a3b0032, 0x09a70035,
2269 + 0x09220038, 0x08ab003b, 0x081f003f, 0x07a20043,
2270 + 0x07340047, 0x06d2004b, 0x067a004f, 0x06170054,
2271 + 0x05bf0059, 0x0571005e, 0x051e0064, 0x04d3006a,
2272 + 0x04910070, 0x044c0077, 0x040f007e, 0x03d90085,
2273 + 0x03a1008d, 0x036f0095, 0x033d009e, 0x030b00a8,
2274 + 0x02e000b2, 0x02b900bc, 0x029200c7, 0x026d00d3,
2275 + 0x024900e0, 0x022900ed, 0x020a00fb, 0x01ec010a,
2276 + 0x01d20119, 0x01b7012a, 0x019e013c, 0x0188014e,
2277 + 0x01720162, 0x015d0177, 0x0149018e, 0x013701a5,
2278 + 0x012601be, 0x011501d8, 0x010601f4, 0x00f70212,
2279 + 0x00e90231, 0x00dc0253, 0x00d00276, 0x00c4029b,
2280 + 0x00b902c3, 0x00af02ed, 0x00a50319, 0x009c0348,
2281 + 0x0093037a, 0x008b03af, 0x008303e6, 0x007c0422,
2282 + 0x00750460, 0x006e04a3, 0x006804e9, 0x00620533,
2283 + 0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,
2286 +static const u32 b43_httab_0x22[] = {
2287 + 0x0b5e002d, 0x0ae2002f, 0x0a3b0032, 0x09a70035,
2288 + 0x09220038, 0x08ab003b, 0x081f003f, 0x07a20043,
2289 + 0x07340047, 0x06d2004b, 0x067a004f, 0x06170054,
2290 + 0x05bf0059, 0x0571005e, 0x051e0064, 0x04d3006a,
2291 + 0x04910070, 0x044c0077, 0x040f007e, 0x03d90085,
2292 + 0x03a1008d, 0x036f0095, 0x033d009e, 0x030b00a8,
2293 + 0x02e000b2, 0x02b900bc, 0x029200c7, 0x026d00d3,
2294 + 0x024900e0, 0x022900ed, 0x020a00fb, 0x01ec010a,
2295 + 0x01d20119, 0x01b7012a, 0x019e013c, 0x0188014e,
2296 + 0x01720162, 0x015d0177, 0x0149018e, 0x013701a5,
2297 + 0x012601be, 0x011501d8, 0x010601f4, 0x00f70212,
2298 + 0x00e90231, 0x00dc0253, 0x00d00276, 0x00c4029b,
2299 + 0x00b902c3, 0x00af02ed, 0x00a50319, 0x009c0348,
2300 + 0x0093037a, 0x008b03af, 0x008303e6, 0x007c0422,
2301 + 0x00750460, 0x006e04a3, 0x006804e9, 0x00620533,
2302 + 0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,
2305 +static const u32 b43_httab_0x24[] = {
2306 + 0x0b5e002d, 0x0ae2002f, 0x0a3b0032, 0x09a70035,
2307 + 0x09220038, 0x08ab003b, 0x081f003f, 0x07a20043,
2308 + 0x07340047, 0x06d2004b, 0x067a004f, 0x06170054,
2309 + 0x05bf0059, 0x0571005e, 0x051e0064, 0x04d3006a,
2310 + 0x04910070, 0x044c0077, 0x040f007e, 0x03d90085,
2311 + 0x03a1008d, 0x036f0095, 0x033d009e, 0x030b00a8,
2312 + 0x02e000b2, 0x02b900bc, 0x029200c7, 0x026d00d3,
2313 + 0x024900e0, 0x022900ed, 0x020a00fb, 0x01ec010a,
2314 + 0x01d20119, 0x01b7012a, 0x019e013c, 0x0188014e,
2315 + 0x01720162, 0x015d0177, 0x0149018e, 0x013701a5,
2316 + 0x012601be, 0x011501d8, 0x010601f4, 0x00f70212,
2317 + 0x00e90231, 0x00dc0253, 0x00d00276, 0x00c4029b,
2318 + 0x00b902c3, 0x00af02ed, 0x00a50319, 0x009c0348,
2319 + 0x0093037a, 0x008b03af, 0x008303e6, 0x007c0422,
2320 + 0x00750460, 0x006e04a3, 0x006804e9, 0x00620533,
2321 + 0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,
2324 +/**************************************************
2326 + **************************************************/
2328 +u32 b43_httab_read(struct b43_wldev *dev, u32 offset)
2332 + type = offset & B43_HTTAB_TYPEMASK;
2333 + offset &= ~B43_HTTAB_TYPEMASK;
2334 + B43_WARN_ON(offset > 0xFFFF);
2337 + case B43_HTTAB_8BIT:
2338 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2339 + value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO) & 0xFF;
2341 + case B43_HTTAB_16BIT:
2342 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2343 + value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
2345 + case B43_HTTAB_32BIT:
2346 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2347 + value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI);
2349 + value |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
2359 +void b43_httab_read_bulk(struct b43_wldev *dev, u32 offset,
2360 + unsigned int nr_elements, void *_data)
2366 + type = offset & B43_HTTAB_TYPEMASK;
2367 + offset &= ~B43_HTTAB_TYPEMASK;
2368 + B43_WARN_ON(offset > 0xFFFF);
2370 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2372 + for (i = 0; i < nr_elements; i++) {
2374 + case B43_HTTAB_8BIT:
2375 + *data = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO) & 0xFF;
2378 + case B43_HTTAB_16BIT:
2379 + *((u16 *)data) = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
2382 + case B43_HTTAB_32BIT:
2383 + *((u32 *)data) = b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI);
2384 + *((u32 *)data) <<= 16;
2385 + *((u32 *)data) |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
2394 +void b43_httab_write(struct b43_wldev *dev, u32 offset, u32 value)
2398 + type = offset & B43_HTTAB_TYPEMASK;
2402 + case B43_HTTAB_8BIT:
2403 + B43_WARN_ON(value & ~0xFF);
2404 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2405 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
2407 + case B43_HTTAB_16BIT:
2408 + B43_WARN_ON(value & ~0xFFFF);
2409 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2410 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
2412 + case B43_HTTAB_32BIT:
2413 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2414 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI, value >> 16);
2415 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value & 0xFFFF);
2424 +void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,
2425 + unsigned int nr_elements, const void *_data)
2428 + const u8 *data = _data;
2431 + type = offset & B43_HTTAB_TYPEMASK;
2432 + offset &= ~B43_HTTAB_TYPEMASK;
2433 + B43_WARN_ON(offset > 0xFFFF);
2435 + b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
2437 + for (i = 0; i < nr_elements; i++) {
2439 + case B43_HTTAB_8BIT:
2442 + B43_WARN_ON(value & ~0xFF);
2443 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
2445 + case B43_HTTAB_16BIT:
2446 + value = *((u16 *)data);
2448 + B43_WARN_ON(value & ~0xFFFF);
2449 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
2451 + case B43_HTTAB_32BIT:
2452 + value = *((u32 *)data);
2454 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI, value >> 16);
2455 + b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO,
2464 +/**************************************************
2466 + **************************************************/
2468 +#define httab_upload(dev, offset, data) do { \
2469 + b43_httab_write_bulk(dev, offset, ARRAY_SIZE(data), data); \
2471 +void b43_phy_ht_tables_init(struct b43_wldev *dev)
2473 + httab_upload(dev, B43_HTTAB16(0x12, 0), b43_httab_0x12);
2474 + httab_upload(dev, B43_HTTAB16(0x27, 0), b43_httab_0x27);
2475 + httab_upload(dev, B43_HTTAB16(0x26, 0), b43_httab_0x26);
2476 + httab_upload(dev, B43_HTTAB32(0x25, 0), b43_httab_0x25);
2477 + httab_upload(dev, B43_HTTAB32(0x2f, 0), b43_httab_0x2f);
2478 + httab_upload(dev, B43_HTTAB16(0x1a, 0), b43_httab_0x1a);
2479 + httab_upload(dev, B43_HTTAB16(0x1b, 0), b43_httab_0x1b);
2480 + httab_upload(dev, B43_HTTAB16(0x1c, 0), b43_httab_0x1c);
2481 + httab_upload(dev, B43_HTTAB32(0x1a, 0x0c0), b43_httab_0x1a_0xc0);
2482 + httab_upload(dev, B43_HTTAB32(0x1a, 0x140), b43_httab_0x1a_0x140);
2483 + httab_upload(dev, B43_HTTAB32(0x1b, 0x140), b43_httab_0x1b_0x140);
2484 + httab_upload(dev, B43_HTTAB32(0x1c, 0x140), b43_httab_0x1c_0x140);
2485 + httab_upload(dev, B43_HTTAB16(0x1a, 0x1c0), b43_httab_0x1a_0x1c0);
2486 + httab_upload(dev, B43_HTTAB16(0x1b, 0x1c0), b43_httab_0x1b_0x1c0);
2487 + httab_upload(dev, B43_HTTAB16(0x1c, 0x1c0), b43_httab_0x1c_0x1c0);
2488 + httab_upload(dev, B43_HTTAB16(0x1a, 0x240), b43_httab_0x1a_0x240);
2489 + httab_upload(dev, B43_HTTAB16(0x1b, 0x240), b43_httab_0x1b_0x240);
2490 + httab_upload(dev, B43_HTTAB16(0x1c, 0x240), b43_httab_0x1c_0x240);
2491 + httab_upload(dev, B43_HTTAB32(0x1f, 0), b43_httab_0x1f);
2492 + httab_upload(dev, B43_HTTAB32(0x21, 0), b43_httab_0x21);
2493 + httab_upload(dev, B43_HTTAB32(0x23, 0), b43_httab_0x23);
2494 + httab_upload(dev, B43_HTTAB32(0x20, 0), b43_httab_0x20);
2495 + httab_upload(dev, B43_HTTAB32(0x22, 0), b43_httab_0x22);
2496 + httab_upload(dev, B43_HTTAB32(0x24, 0), b43_httab_0x24);
2499 +++ b/drivers/net/wireless/b43/tables_phy_ht.h
2501 +#ifndef B43_TABLES_PHY_HT_H_
2502 +#define B43_TABLES_PHY_HT_H_
2504 +/* The HT-PHY tables. */
2505 +#define B43_HTTAB_TYPEMASK 0xF0000000
2506 +#define B43_HTTAB_8BIT 0x10000000
2507 +#define B43_HTTAB_16BIT 0x20000000
2508 +#define B43_HTTAB_32BIT 0x30000000
2509 +#define B43_HTTAB8(table, offset) (((table) << 10) | (offset) | B43_HTTAB_8BIT)
2510 +#define B43_HTTAB16(table, offset) (((table) << 10) | (offset) | B43_HTTAB_16BIT)
2511 +#define B43_HTTAB32(table, offset) (((table) << 10) | (offset) | B43_HTTAB_32BIT)
2513 +u32 b43_httab_read(struct b43_wldev *dev, u32 offset);
2514 +void b43_httab_read_bulk(struct b43_wldev *dev, u32 offset,
2515 + unsigned int nr_elements, void *_data);
2516 +void b43_httab_write(struct b43_wldev *dev, u32 offset, u32 value);
2517 +void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,
2518 + unsigned int nr_elements, const void *_data);
2520 +void b43_phy_ht_tables_init(struct b43_wldev *dev);
2522 +#endif /* B43_TABLES_PHY_HT_H_ */
2524 +++ b/drivers/net/wireless/b43/tables_phy_lcn.c
2528 + Broadcom B43 wireless driver
2529 + IEEE 802.11n LCN-PHY data tables
2531 + This program is free software; you can redistribute it and/or modify
2532 + it under the terms of the GNU General Public License as published by
2533 + the Free Software Foundation; either version 2 of the License, or
2534 + (at your option) any later version.
2536 + This program is distributed in the hope that it will be useful,
2537 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2538 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2539 + GNU General Public License for more details.
2541 + You should have received a copy of the GNU General Public License
2542 + along with this program; see the file COPYING. If not, write to
2543 + the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
2544 + Boston, MA 02110-1301, USA.
2549 +#include "tables_phy_lcn.h"
2550 +#include "phy_common.h"
2551 +#include "phy_lcn.h"
2553 +/**************************************************
2555 + **************************************************/
2557 +void b43_phy_lcn_tables_init(struct b43_wldev *dev)
2561 +++ b/drivers/net/wireless/b43/tables_phy_lcn.h
2563 +#ifndef B43_TABLES_PHY_LCN_H_
2564 +#define B43_TABLES_PHY_LCN_H_
2566 +void b43_phy_lcn_tables_init(struct b43_wldev *dev);
2568 +#endif /* B43_TABLES_PHY_LCN_H_ */