diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-05-13 18:04:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-16 14:25:28 -0400 |
commit | dedb1eb977d75f301b17190cc4b6e7d17dbf17db (patch) | |
tree | f25491273b5f355198de93d011d08e0885f7e8d6 | |
parent | d0df9eecf9f61f70fd847656f5eb113e06e46a03 (diff) |
b43: rename b43_wldev's field with ssb_device to sdev
We free name "dev" for something generic (like dev abstraction layer).
Additionaly code is cleaner now, especially magic dev->dev-dev chains.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/b43/leds.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/lo.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 123 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_a.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_common.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_g.c | 48 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_lp.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pio.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/b43/rfkill.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/b43/sdio.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/sysfs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_lpphy.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/wa.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 2 |
17 files changed, 175 insertions, 174 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index bd4cb75b6ca3..fd69d6ae6b88 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -705,7 +705,7 @@ enum { | |||
705 | 705 | ||
706 | /* Data structure for one wireless device (802.11 core) */ | 706 | /* Data structure for one wireless device (802.11 core) */ |
707 | struct b43_wldev { | 707 | struct b43_wldev { |
708 | struct ssb_device *dev; | 708 | struct ssb_device *sdev; |
709 | struct b43_wl *wl; | 709 | struct b43_wl *wl; |
710 | 710 | ||
711 | /* The device initialization status. | 711 | /* The device initialization status. |
@@ -879,22 +879,22 @@ static inline enum ieee80211_band b43_current_band(struct b43_wl *wl) | |||
879 | 879 | ||
880 | static inline u16 b43_read16(struct b43_wldev *dev, u16 offset) | 880 | static inline u16 b43_read16(struct b43_wldev *dev, u16 offset) |
881 | { | 881 | { |
882 | return ssb_read16(dev->dev, offset); | 882 | return ssb_read16(dev->sdev, offset); |
883 | } | 883 | } |
884 | 884 | ||
885 | static inline void b43_write16(struct b43_wldev *dev, u16 offset, u16 value) | 885 | static inline void b43_write16(struct b43_wldev *dev, u16 offset, u16 value) |
886 | { | 886 | { |
887 | ssb_write16(dev->dev, offset, value); | 887 | ssb_write16(dev->sdev, offset, value); |
888 | } | 888 | } |
889 | 889 | ||
890 | static inline u32 b43_read32(struct b43_wldev *dev, u16 offset) | 890 | static inline u32 b43_read32(struct b43_wldev *dev, u16 offset) |
891 | { | 891 | { |
892 | return ssb_read32(dev->dev, offset); | 892 | return ssb_read32(dev->sdev, offset); |
893 | } | 893 | } |
894 | 894 | ||
895 | static inline void b43_write32(struct b43_wldev *dev, u16 offset, u32 value) | 895 | static inline void b43_write32(struct b43_wldev *dev, u16 offset, u32 value) |
896 | { | 896 | { |
897 | ssb_write32(dev->dev, offset, value); | 897 | ssb_write32(dev->sdev, offset, value); |
898 | } | 898 | } |
899 | 899 | ||
900 | static inline bool b43_using_pio_transfers(struct b43_wldev *dev) | 900 | static inline bool b43_using_pio_transfers(struct b43_wldev *dev) |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index ff0f5ba14b2c..10cfba3d7c46 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -80,7 +80,7 @@ static void op32_fill_descriptor(struct b43_dmaring *ring, | |||
80 | addr = (u32) (dmaaddr & ~SSB_DMA_TRANSLATION_MASK); | 80 | addr = (u32) (dmaaddr & ~SSB_DMA_TRANSLATION_MASK); |
81 | addrext = (u32) (dmaaddr & SSB_DMA_TRANSLATION_MASK) | 81 | addrext = (u32) (dmaaddr & SSB_DMA_TRANSLATION_MASK) |
82 | >> SSB_DMA_TRANSLATION_SHIFT; | 82 | >> SSB_DMA_TRANSLATION_SHIFT; |
83 | addr |= ssb_dma_translation(ring->dev->dev); | 83 | addr |= ssb_dma_translation(ring->dev->sdev); |
84 | ctl = bufsize & B43_DMA32_DCTL_BYTECNT; | 84 | ctl = bufsize & B43_DMA32_DCTL_BYTECNT; |
85 | if (slot == ring->nr_slots - 1) | 85 | if (slot == ring->nr_slots - 1) |
86 | ctl |= B43_DMA32_DCTL_DTABLEEND; | 86 | ctl |= B43_DMA32_DCTL_DTABLEEND; |
@@ -174,7 +174,7 @@ static void op64_fill_descriptor(struct b43_dmaring *ring, | |||
174 | addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); | 174 | addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); |
175 | addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) | 175 | addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) |
176 | >> SSB_DMA_TRANSLATION_SHIFT; | 176 | >> SSB_DMA_TRANSLATION_SHIFT; |
177 | addrhi |= (ssb_dma_translation(ring->dev->dev) << 1); | 177 | addrhi |= (ssb_dma_translation(ring->dev->sdev) << 1); |
178 | if (slot == ring->nr_slots - 1) | 178 | if (slot == ring->nr_slots - 1) |
179 | ctl0 |= B43_DMA64_DCTL0_DTABLEEND; | 179 | ctl0 |= B43_DMA64_DCTL0_DTABLEEND; |
180 | if (start) | 180 | if (start) |
@@ -333,10 +333,10 @@ static inline | |||
333 | dma_addr_t dmaaddr; | 333 | dma_addr_t dmaaddr; |
334 | 334 | ||
335 | if (tx) { | 335 | if (tx) { |
336 | dmaaddr = dma_map_single(ring->dev->dev->dma_dev, | 336 | dmaaddr = dma_map_single(ring->dev->sdev->dma_dev, |
337 | buf, len, DMA_TO_DEVICE); | 337 | buf, len, DMA_TO_DEVICE); |
338 | } else { | 338 | } else { |
339 | dmaaddr = dma_map_single(ring->dev->dev->dma_dev, | 339 | dmaaddr = dma_map_single(ring->dev->sdev->dma_dev, |
340 | buf, len, DMA_FROM_DEVICE); | 340 | buf, len, DMA_FROM_DEVICE); |
341 | } | 341 | } |
342 | 342 | ||
@@ -348,10 +348,10 @@ static inline | |||
348 | dma_addr_t addr, size_t len, int tx) | 348 | dma_addr_t addr, size_t len, int tx) |
349 | { | 349 | { |
350 | if (tx) { | 350 | if (tx) { |
351 | dma_unmap_single(ring->dev->dev->dma_dev, | 351 | dma_unmap_single(ring->dev->sdev->dma_dev, |
352 | addr, len, DMA_TO_DEVICE); | 352 | addr, len, DMA_TO_DEVICE); |
353 | } else { | 353 | } else { |
354 | dma_unmap_single(ring->dev->dev->dma_dev, | 354 | dma_unmap_single(ring->dev->sdev->dma_dev, |
355 | addr, len, DMA_FROM_DEVICE); | 355 | addr, len, DMA_FROM_DEVICE); |
356 | } | 356 | } |
357 | } | 357 | } |
@@ -361,7 +361,7 @@ static inline | |||
361 | dma_addr_t addr, size_t len) | 361 | dma_addr_t addr, size_t len) |
362 | { | 362 | { |
363 | B43_WARN_ON(ring->tx); | 363 | B43_WARN_ON(ring->tx); |
364 | dma_sync_single_for_cpu(ring->dev->dev->dma_dev, | 364 | dma_sync_single_for_cpu(ring->dev->sdev->dma_dev, |
365 | addr, len, DMA_FROM_DEVICE); | 365 | addr, len, DMA_FROM_DEVICE); |
366 | } | 366 | } |
367 | 367 | ||
@@ -370,7 +370,7 @@ static inline | |||
370 | dma_addr_t addr, size_t len) | 370 | dma_addr_t addr, size_t len) |
371 | { | 371 | { |
372 | B43_WARN_ON(ring->tx); | 372 | B43_WARN_ON(ring->tx); |
373 | dma_sync_single_for_device(ring->dev->dev->dma_dev, | 373 | dma_sync_single_for_device(ring->dev->sdev->dma_dev, |
374 | addr, len, DMA_FROM_DEVICE); | 374 | addr, len, DMA_FROM_DEVICE); |
375 | } | 375 | } |
376 | 376 | ||
@@ -401,7 +401,7 @@ static int alloc_ringmemory(struct b43_dmaring *ring) | |||
401 | */ | 401 | */ |
402 | if (ring->type == B43_DMA_64BIT) | 402 | if (ring->type == B43_DMA_64BIT) |
403 | flags |= GFP_DMA; | 403 | flags |= GFP_DMA; |
404 | ring->descbase = dma_alloc_coherent(ring->dev->dev->dma_dev, | 404 | ring->descbase = dma_alloc_coherent(ring->dev->sdev->dma_dev, |
405 | B43_DMA_RINGMEMSIZE, | 405 | B43_DMA_RINGMEMSIZE, |
406 | &(ring->dmabase), flags); | 406 | &(ring->dmabase), flags); |
407 | if (!ring->descbase) { | 407 | if (!ring->descbase) { |
@@ -415,7 +415,7 @@ static int alloc_ringmemory(struct b43_dmaring *ring) | |||
415 | 415 | ||
416 | static void free_ringmemory(struct b43_dmaring *ring) | 416 | static void free_ringmemory(struct b43_dmaring *ring) |
417 | { | 417 | { |
418 | dma_free_coherent(ring->dev->dev->dma_dev, B43_DMA_RINGMEMSIZE, | 418 | dma_free_coherent(ring->dev->sdev->dma_dev, B43_DMA_RINGMEMSIZE, |
419 | ring->descbase, ring->dmabase); | 419 | ring->descbase, ring->dmabase); |
420 | } | 420 | } |
421 | 421 | ||
@@ -523,7 +523,7 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring, | |||
523 | dma_addr_t addr, | 523 | dma_addr_t addr, |
524 | size_t buffersize, bool dma_to_device) | 524 | size_t buffersize, bool dma_to_device) |
525 | { | 525 | { |
526 | if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr))) | 526 | if (unlikely(dma_mapping_error(ring->dev->sdev->dma_dev, addr))) |
527 | return 1; | 527 | return 1; |
528 | 528 | ||
529 | switch (ring->type) { | 529 | switch (ring->type) { |
@@ -658,7 +658,7 @@ static int dmacontroller_setup(struct b43_dmaring *ring) | |||
658 | int err = 0; | 658 | int err = 0; |
659 | u32 value; | 659 | u32 value; |
660 | u32 addrext; | 660 | u32 addrext; |
661 | u32 trans = ssb_dma_translation(ring->dev->dev); | 661 | u32 trans = ssb_dma_translation(ring->dev->sdev); |
662 | 662 | ||
663 | if (ring->tx) { | 663 | if (ring->tx) { |
664 | if (ring->type == B43_DMA_64BIT) { | 664 | if (ring->type == B43_DMA_64BIT) { |
@@ -869,7 +869,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
869 | goto err_kfree_meta; | 869 | goto err_kfree_meta; |
870 | 870 | ||
871 | /* test for ability to dma to txhdr_cache */ | 871 | /* test for ability to dma to txhdr_cache */ |
872 | dma_test = dma_map_single(dev->dev->dma_dev, | 872 | dma_test = dma_map_single(dev->sdev->dma_dev, |
873 | ring->txhdr_cache, | 873 | ring->txhdr_cache, |
874 | b43_txhdr_size(dev), | 874 | b43_txhdr_size(dev), |
875 | DMA_TO_DEVICE); | 875 | DMA_TO_DEVICE); |
@@ -884,7 +884,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
884 | if (!ring->txhdr_cache) | 884 | if (!ring->txhdr_cache) |
885 | goto err_kfree_meta; | 885 | goto err_kfree_meta; |
886 | 886 | ||
887 | dma_test = dma_map_single(dev->dev->dma_dev, | 887 | dma_test = dma_map_single(dev->sdev->dma_dev, |
888 | ring->txhdr_cache, | 888 | ring->txhdr_cache, |
889 | b43_txhdr_size(dev), | 889 | b43_txhdr_size(dev), |
890 | DMA_TO_DEVICE); | 890 | DMA_TO_DEVICE); |
@@ -898,7 +898,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
898 | } | 898 | } |
899 | } | 899 | } |
900 | 900 | ||
901 | dma_unmap_single(dev->dev->dma_dev, | 901 | dma_unmap_single(dev->sdev->dma_dev, |
902 | dma_test, b43_txhdr_size(dev), | 902 | dma_test, b43_txhdr_size(dev), |
903 | DMA_TO_DEVICE); | 903 | DMA_TO_DEVICE); |
904 | } | 904 | } |
@@ -1013,9 +1013,9 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask) | |||
1013 | /* Try to set the DMA mask. If it fails, try falling back to a | 1013 | /* Try to set the DMA mask. If it fails, try falling back to a |
1014 | * lower mask, as we can always also support a lower one. */ | 1014 | * lower mask, as we can always also support a lower one. */ |
1015 | while (1) { | 1015 | while (1) { |
1016 | err = dma_set_mask(dev->dev->dma_dev, mask); | 1016 | err = dma_set_mask(dev->sdev->dma_dev, mask); |
1017 | if (!err) { | 1017 | if (!err) { |
1018 | err = dma_set_coherent_mask(dev->dev->dma_dev, mask); | 1018 | err = dma_set_coherent_mask(dev->sdev->dma_dev, mask); |
1019 | if (!err) | 1019 | if (!err) |
1020 | break; | 1020 | break; |
1021 | } | 1021 | } |
@@ -1084,7 +1084,7 @@ int b43_dma_init(struct b43_wldev *dev) | |||
1084 | goto err_destroy_mcast; | 1084 | goto err_destroy_mcast; |
1085 | 1085 | ||
1086 | /* No support for the TX status DMA ring. */ | 1086 | /* No support for the TX status DMA ring. */ |
1087 | B43_WARN_ON(dev->dev->id.revision < 5); | 1087 | B43_WARN_ON(dev->sdev->id.revision < 5); |
1088 | 1088 | ||
1089 | b43dbg(dev->wl, "%u-bit DMA initialized\n", | 1089 | b43dbg(dev->wl, "%u-bit DMA initialized\n", |
1090 | (unsigned int)type); | 1090 | (unsigned int)type); |
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index c587115dd2b9..0cafafe368af 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c | |||
@@ -138,7 +138,7 @@ static int b43_register_led(struct b43_wldev *dev, struct b43_led *led, | |||
138 | led->led_dev.default_trigger = default_trigger; | 138 | led->led_dev.default_trigger = default_trigger; |
139 | led->led_dev.brightness_set = b43_led_brightness_set; | 139 | led->led_dev.brightness_set = b43_led_brightness_set; |
140 | 140 | ||
141 | err = led_classdev_register(dev->dev->dev, &led->led_dev); | 141 | err = led_classdev_register(dev->sdev->dev, &led->led_dev); |
142 | if (err) { | 142 | if (err) { |
143 | b43warn(dev->wl, "LEDs: Failed to register %s\n", name); | 143 | b43warn(dev->wl, "LEDs: Failed to register %s\n", name); |
144 | led->wl = NULL; | 144 | led->wl = NULL; |
@@ -215,7 +215,7 @@ static void b43_led_get_sprominfo(struct b43_wldev *dev, | |||
215 | enum b43_led_behaviour *behaviour, | 215 | enum b43_led_behaviour *behaviour, |
216 | bool *activelow) | 216 | bool *activelow) |
217 | { | 217 | { |
218 | struct ssb_bus *bus = dev->dev->bus; | 218 | struct ssb_bus *bus = dev->sdev->bus; |
219 | u8 sprom[4]; | 219 | u8 sprom[4]; |
220 | 220 | ||
221 | sprom[0] = bus->sprom.gpio0; | 221 | sprom[0] = bus->sprom.gpio0; |
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c index 94e4f1378fc3..2ef7d4b38540 100644 --- a/drivers/net/wireless/b43/lo.c +++ b/drivers/net/wireless/b43/lo.c | |||
@@ -98,7 +98,7 @@ static u16 lo_measure_feedthrough(struct b43_wldev *dev, | |||
98 | rfover |= pga; | 98 | rfover |= pga; |
99 | rfover |= lna; | 99 | rfover |= lna; |
100 | rfover |= trsw_rx; | 100 | rfover |= trsw_rx; |
101 | if ((dev->dev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) | 101 | if ((dev->sdev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) |
102 | && phy->rev > 6) | 102 | && phy->rev > 6) |
103 | rfover |= B43_PHY_RFOVERVAL_EXTLNA; | 103 | rfover |= B43_PHY_RFOVERVAL_EXTLNA; |
104 | 104 | ||
@@ -387,7 +387,7 @@ struct lo_g_saved_values { | |||
387 | static void lo_measure_setup(struct b43_wldev *dev, | 387 | static void lo_measure_setup(struct b43_wldev *dev, |
388 | struct lo_g_saved_values *sav) | 388 | struct lo_g_saved_values *sav) |
389 | { | 389 | { |
390 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; | 390 | struct ssb_sprom *sprom = &dev->sdev->bus->sprom; |
391 | struct b43_phy *phy = &dev->phy; | 391 | struct b43_phy *phy = &dev->phy; |
392 | struct b43_phy_g *gphy = phy->g; | 392 | struct b43_phy_g *gphy = phy->g; |
393 | struct b43_txpower_lo_control *lo = gphy->lo_control; | 393 | struct b43_txpower_lo_control *lo = gphy->lo_control; |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index a96e05a8ef7e..ea58e27ef215 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -547,7 +547,7 @@ void b43_tsf_read(struct b43_wldev *dev, u64 *tsf) | |||
547 | { | 547 | { |
548 | u32 low, high; | 548 | u32 low, high; |
549 | 549 | ||
550 | B43_WARN_ON(dev->dev->id.revision < 3); | 550 | B43_WARN_ON(dev->sdev->id.revision < 3); |
551 | 551 | ||
552 | /* The hardware guarantees us an atomic read, if we | 552 | /* The hardware guarantees us an atomic read, if we |
553 | * read the low register first. */ | 553 | * read the low register first. */ |
@@ -585,7 +585,7 @@ static void b43_tsf_write_locked(struct b43_wldev *dev, u64 tsf) | |||
585 | { | 585 | { |
586 | u32 low, high; | 586 | u32 low, high; |
587 | 587 | ||
588 | B43_WARN_ON(dev->dev->id.revision < 3); | 588 | B43_WARN_ON(dev->sdev->id.revision < 3); |
589 | 589 | ||
590 | low = tsf; | 590 | low = tsf; |
591 | high = (tsf >> 32); | 591 | high = (tsf >> 32); |
@@ -713,7 +713,7 @@ void b43_dummy_transmission(struct b43_wldev *dev, bool ofdm, bool pa_on) | |||
713 | b43_ram_write(dev, i * 4, buffer[i]); | 713 | b43_ram_write(dev, i * 4, buffer[i]); |
714 | 714 | ||
715 | b43_write16(dev, 0x0568, 0x0000); | 715 | b43_write16(dev, 0x0568, 0x0000); |
716 | if (dev->dev->id.revision < 11) | 716 | if (dev->sdev->id.revision < 11) |
717 | b43_write16(dev, 0x07C0, 0x0000); | 717 | b43_write16(dev, 0x07C0, 0x0000); |
718 | else | 718 | else |
719 | b43_write16(dev, 0x07C0, 0x0100); | 719 | b43_write16(dev, 0x07C0, 0x0100); |
@@ -1131,7 +1131,7 @@ void b43_power_saving_ctl_bits(struct b43_wldev *dev, unsigned int ps_flags) | |||
1131 | b43_write32(dev, B43_MMIO_MACCTL, macctl); | 1131 | b43_write32(dev, B43_MMIO_MACCTL, macctl); |
1132 | /* Commit write */ | 1132 | /* Commit write */ |
1133 | b43_read32(dev, B43_MMIO_MACCTL); | 1133 | b43_read32(dev, B43_MMIO_MACCTL); |
1134 | if (awake && dev->dev->id.revision >= 5) { | 1134 | if (awake && dev->sdev->id.revision >= 5) { |
1135 | /* Wait for the microcode to wake up. */ | 1135 | /* Wait for the microcode to wake up. */ |
1136 | for (i = 0; i < 100; i++) { | 1136 | for (i = 0; i < 100; i++) { |
1137 | ucstat = b43_shm_read16(dev, B43_SHM_SHARED, | 1137 | ucstat = b43_shm_read16(dev, B43_SHM_SHARED, |
@@ -1152,19 +1152,19 @@ void b43_wireless_core_reset(struct b43_wldev *dev, u32 flags) | |||
1152 | flags |= B43_TMSLOW_PHYRESET; | 1152 | flags |= B43_TMSLOW_PHYRESET; |
1153 | if (dev->phy.type == B43_PHYTYPE_N) | 1153 | if (dev->phy.type == B43_PHYTYPE_N) |
1154 | flags |= B43_TMSLOW_PHY_BANDWIDTH_20MHZ; /* Make 20 MHz def */ | 1154 | flags |= B43_TMSLOW_PHY_BANDWIDTH_20MHZ; /* Make 20 MHz def */ |
1155 | ssb_device_enable(dev->dev, flags); | 1155 | ssb_device_enable(dev->sdev, flags); |
1156 | msleep(2); /* Wait for the PLL to turn on. */ | 1156 | msleep(2); /* Wait for the PLL to turn on. */ |
1157 | 1157 | ||
1158 | /* Now take the PHY out of Reset again */ | 1158 | /* Now take the PHY out of Reset again */ |
1159 | tmslow = ssb_read32(dev->dev, SSB_TMSLOW); | 1159 | tmslow = ssb_read32(dev->sdev, SSB_TMSLOW); |
1160 | tmslow |= SSB_TMSLOW_FGC; | 1160 | tmslow |= SSB_TMSLOW_FGC; |
1161 | tmslow &= ~B43_TMSLOW_PHYRESET; | 1161 | tmslow &= ~B43_TMSLOW_PHYRESET; |
1162 | ssb_write32(dev->dev, SSB_TMSLOW, tmslow); | 1162 | ssb_write32(dev->sdev, SSB_TMSLOW, tmslow); |
1163 | ssb_read32(dev->dev, SSB_TMSLOW); /* flush */ | 1163 | ssb_read32(dev->sdev, SSB_TMSLOW); /* flush */ |
1164 | msleep(1); | 1164 | msleep(1); |
1165 | tmslow &= ~SSB_TMSLOW_FGC; | 1165 | tmslow &= ~SSB_TMSLOW_FGC; |
1166 | ssb_write32(dev->dev, SSB_TMSLOW, tmslow); | 1166 | ssb_write32(dev->sdev, SSB_TMSLOW, tmslow); |
1167 | ssb_read32(dev->dev, SSB_TMSLOW); /* flush */ | 1167 | ssb_read32(dev->sdev, SSB_TMSLOW); /* flush */ |
1168 | msleep(1); | 1168 | msleep(1); |
1169 | 1169 | ||
1170 | /* Turn Analog ON, but only if we already know the PHY-type. | 1170 | /* Turn Analog ON, but only if we already know the PHY-type. |
@@ -1214,7 +1214,7 @@ static void drain_txstatus_queue(struct b43_wldev *dev) | |||
1214 | { | 1214 | { |
1215 | u32 dummy; | 1215 | u32 dummy; |
1216 | 1216 | ||
1217 | if (dev->dev->id.revision < 5) | 1217 | if (dev->sdev->id.revision < 5) |
1218 | return; | 1218 | return; |
1219 | /* Read all entries from the microcode TXstatus FIFO | 1219 | /* Read all entries from the microcode TXstatus FIFO |
1220 | * and throw them away. | 1220 | * and throw them away. |
@@ -1420,9 +1420,9 @@ u8 b43_ieee80211_antenna_sanitize(struct b43_wldev *dev, | |||
1420 | 1420 | ||
1421 | /* Get the mask of available antennas. */ | 1421 | /* Get the mask of available antennas. */ |
1422 | if (dev->phy.gmode) | 1422 | if (dev->phy.gmode) |
1423 | antenna_mask = dev->dev->bus->sprom.ant_available_bg; | 1423 | antenna_mask = dev->sdev->bus->sprom.ant_available_bg; |
1424 | else | 1424 | else |
1425 | antenna_mask = dev->dev->bus->sprom.ant_available_a; | 1425 | antenna_mask = dev->sdev->bus->sprom.ant_available_a; |
1426 | 1426 | ||
1427 | if (!(antenna_mask & (1 << (antenna_nr - 1)))) { | 1427 | if (!(antenna_mask & (1 << (antenna_nr - 1)))) { |
1428 | /* This antenna is not available. Fall back to default. */ | 1428 | /* This antenna is not available. Fall back to default. */ |
@@ -1637,7 +1637,7 @@ static void b43_beacon_update_trigger_work(struct work_struct *work) | |||
1637 | mutex_lock(&wl->mutex); | 1637 | mutex_lock(&wl->mutex); |
1638 | dev = wl->current_dev; | 1638 | dev = wl->current_dev; |
1639 | if (likely(dev && (b43_status(dev) >= B43_STAT_INITIALIZED))) { | 1639 | if (likely(dev && (b43_status(dev) >= B43_STAT_INITIALIZED))) { |
1640 | if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) { | 1640 | if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) { |
1641 | /* wl->mutex is enough. */ | 1641 | /* wl->mutex is enough. */ |
1642 | b43_do_beacon_update_trigger_work(dev); | 1642 | b43_do_beacon_update_trigger_work(dev); |
1643 | mmiowb(); | 1643 | mmiowb(); |
@@ -1682,7 +1682,7 @@ static void b43_update_templates(struct b43_wl *wl) | |||
1682 | static void b43_set_beacon_int(struct b43_wldev *dev, u16 beacon_int) | 1682 | static void b43_set_beacon_int(struct b43_wldev *dev, u16 beacon_int) |
1683 | { | 1683 | { |
1684 | b43_time_lock(dev); | 1684 | b43_time_lock(dev); |
1685 | if (dev->dev->id.revision >= 3) { | 1685 | if (dev->sdev->id.revision >= 3) { |
1686 | b43_write32(dev, B43_MMIO_TSF_CFP_REP, (beacon_int << 16)); | 1686 | b43_write32(dev, B43_MMIO_TSF_CFP_REP, (beacon_int << 16)); |
1687 | b43_write32(dev, B43_MMIO_TSF_CFP_START, (beacon_int << 10)); | 1687 | b43_write32(dev, B43_MMIO_TSF_CFP_START, (beacon_int << 10)); |
1688 | } else { | 1688 | } else { |
@@ -2056,7 +2056,7 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx, | |||
2056 | B43_WARN_ON(1); | 2056 | B43_WARN_ON(1); |
2057 | return -ENOSYS; | 2057 | return -ENOSYS; |
2058 | } | 2058 | } |
2059 | err = request_firmware(&blob, ctx->fwname, ctx->dev->dev->dev); | 2059 | err = request_firmware(&blob, ctx->fwname, ctx->dev->sdev->dev); |
2060 | if (err == -ENOENT) { | 2060 | if (err == -ENOENT) { |
2061 | snprintf(ctx->errors[ctx->req_type], | 2061 | snprintf(ctx->errors[ctx->req_type], |
2062 | sizeof(ctx->errors[ctx->req_type]), | 2062 | sizeof(ctx->errors[ctx->req_type]), |
@@ -2106,13 +2106,13 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
2106 | { | 2106 | { |
2107 | struct b43_wldev *dev = ctx->dev; | 2107 | struct b43_wldev *dev = ctx->dev; |
2108 | struct b43_firmware *fw = &ctx->dev->fw; | 2108 | struct b43_firmware *fw = &ctx->dev->fw; |
2109 | const u8 rev = ctx->dev->dev->id.revision; | 2109 | const u8 rev = ctx->dev->sdev->id.revision; |
2110 | const char *filename; | 2110 | const char *filename; |
2111 | u32 tmshigh; | 2111 | u32 tmshigh; |
2112 | int err; | 2112 | int err; |
2113 | 2113 | ||
2114 | /* Get microcode */ | 2114 | /* Get microcode */ |
2115 | tmshigh = ssb_read32(dev->dev, SSB_TMSHIGH); | 2115 | tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH); |
2116 | if ((rev >= 5) && (rev <= 10)) | 2116 | if ((rev >= 5) && (rev <= 10)) |
2117 | filename = "ucode5"; | 2117 | filename = "ucode5"; |
2118 | else if ((rev >= 11) && (rev <= 12)) | 2118 | else if ((rev >= 11) && (rev <= 12)) |
@@ -2440,7 +2440,7 @@ static int b43_upload_microcode(struct b43_wldev *dev) | |||
2440 | 2440 | ||
2441 | snprintf(wiphy->fw_version, sizeof(wiphy->fw_version), "%u.%u", | 2441 | snprintf(wiphy->fw_version, sizeof(wiphy->fw_version), "%u.%u", |
2442 | dev->fw.rev, dev->fw.patch); | 2442 | dev->fw.rev, dev->fw.patch); |
2443 | wiphy->hw_version = dev->dev->id.coreid; | 2443 | wiphy->hw_version = dev->sdev->id.coreid; |
2444 | 2444 | ||
2445 | if (b43_is_old_txhdr_format(dev)) { | 2445 | if (b43_is_old_txhdr_format(dev)) { |
2446 | /* We're over the deadline, but we keep support for old fw | 2446 | /* We're over the deadline, but we keep support for old fw |
@@ -2558,7 +2558,7 @@ out: | |||
2558 | */ | 2558 | */ |
2559 | static int b43_gpio_init(struct b43_wldev *dev) | 2559 | static int b43_gpio_init(struct b43_wldev *dev) |
2560 | { | 2560 | { |
2561 | struct ssb_bus *bus = dev->dev->bus; | 2561 | struct ssb_bus *bus = dev->sdev->bus; |
2562 | struct ssb_device *gpiodev, *pcidev = NULL; | 2562 | struct ssb_device *gpiodev, *pcidev = NULL; |
2563 | u32 mask, set; | 2563 | u32 mask, set; |
2564 | 2564 | ||
@@ -2570,7 +2570,7 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2570 | 2570 | ||
2571 | mask = 0x0000001F; | 2571 | mask = 0x0000001F; |
2572 | set = 0x0000000F; | 2572 | set = 0x0000000F; |
2573 | if (dev->dev->bus->chip_id == 0x4301) { | 2573 | if (dev->sdev->bus->chip_id == 0x4301) { |
2574 | mask |= 0x0060; | 2574 | mask |= 0x0060; |
2575 | set |= 0x0060; | 2575 | set |= 0x0060; |
2576 | } | 2576 | } |
@@ -2581,14 +2581,14 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2581 | mask |= 0x0180; | 2581 | mask |= 0x0180; |
2582 | set |= 0x0180; | 2582 | set |= 0x0180; |
2583 | } | 2583 | } |
2584 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) { | 2584 | if (dev->sdev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) { |
2585 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 2585 | b43_write16(dev, B43_MMIO_GPIO_MASK, |
2586 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 2586 | b43_read16(dev, B43_MMIO_GPIO_MASK) |
2587 | | 0x0200); | 2587 | | 0x0200); |
2588 | mask |= 0x0200; | 2588 | mask |= 0x0200; |
2589 | set |= 0x0200; | 2589 | set |= 0x0200; |
2590 | } | 2590 | } |
2591 | if (dev->dev->id.revision >= 2) | 2591 | if (dev->sdev->id.revision >= 2) |
2592 | mask |= 0x0010; /* FIXME: This is redundant. */ | 2592 | mask |= 0x0010; /* FIXME: This is redundant. */ |
2593 | 2593 | ||
2594 | #ifdef CONFIG_SSB_DRIVER_PCICORE | 2594 | #ifdef CONFIG_SSB_DRIVER_PCICORE |
@@ -2607,7 +2607,7 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2607 | /* Turn off all GPIO stuff. Call this on module unload, for example. */ | 2607 | /* Turn off all GPIO stuff. Call this on module unload, for example. */ |
2608 | static void b43_gpio_cleanup(struct b43_wldev *dev) | 2608 | static void b43_gpio_cleanup(struct b43_wldev *dev) |
2609 | { | 2609 | { |
2610 | struct ssb_bus *bus = dev->dev->bus; | 2610 | struct ssb_bus *bus = dev->sdev->bus; |
2611 | struct ssb_device *gpiodev, *pcidev = NULL; | 2611 | struct ssb_device *gpiodev, *pcidev = NULL; |
2612 | 2612 | ||
2613 | #ifdef CONFIG_SSB_DRIVER_PCICORE | 2613 | #ifdef CONFIG_SSB_DRIVER_PCICORE |
@@ -2688,12 +2688,12 @@ out: | |||
2688 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/MacPhyClkSet */ | 2688 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/MacPhyClkSet */ |
2689 | void b43_mac_phy_clock_set(struct b43_wldev *dev, bool on) | 2689 | void b43_mac_phy_clock_set(struct b43_wldev *dev, bool on) |
2690 | { | 2690 | { |
2691 | u32 tmslow = ssb_read32(dev->dev, SSB_TMSLOW); | 2691 | u32 tmslow = ssb_read32(dev->sdev, SSB_TMSLOW); |
2692 | if (on) | 2692 | if (on) |
2693 | tmslow |= B43_TMSLOW_MACPHYCLKEN; | 2693 | tmslow |= B43_TMSLOW_MACPHYCLKEN; |
2694 | else | 2694 | else |
2695 | tmslow &= ~B43_TMSLOW_MACPHYCLKEN; | 2695 | tmslow &= ~B43_TMSLOW_MACPHYCLKEN; |
2696 | ssb_write32(dev->dev, SSB_TMSLOW, tmslow); | 2696 | ssb_write32(dev->sdev, SSB_TMSLOW, tmslow); |
2697 | } | 2697 | } |
2698 | 2698 | ||
2699 | static void b43_adjust_opmode(struct b43_wldev *dev) | 2699 | static void b43_adjust_opmode(struct b43_wldev *dev) |
@@ -2732,15 +2732,15 @@ static void b43_adjust_opmode(struct b43_wldev *dev) | |||
2732 | /* Workaround: On old hardware the HW-MAC-address-filter | 2732 | /* Workaround: On old hardware the HW-MAC-address-filter |
2733 | * doesn't work properly, so always run promisc in filter | 2733 | * doesn't work properly, so always run promisc in filter |
2734 | * it in software. */ | 2734 | * it in software. */ |
2735 | if (dev->dev->id.revision <= 4) | 2735 | if (dev->sdev->id.revision <= 4) |
2736 | ctl |= B43_MACCTL_PROMISC; | 2736 | ctl |= B43_MACCTL_PROMISC; |
2737 | 2737 | ||
2738 | b43_write32(dev, B43_MMIO_MACCTL, ctl); | 2738 | b43_write32(dev, B43_MMIO_MACCTL, ctl); |
2739 | 2739 | ||
2740 | cfp_pretbtt = 2; | 2740 | cfp_pretbtt = 2; |
2741 | if ((ctl & B43_MACCTL_INFRA) && !(ctl & B43_MACCTL_AP)) { | 2741 | if ((ctl & B43_MACCTL_INFRA) && !(ctl & B43_MACCTL_AP)) { |
2742 | if (dev->dev->bus->chip_id == 0x4306 && | 2742 | if (dev->sdev->bus->chip_id == 0x4306 && |
2743 | dev->dev->bus->chip_rev == 3) | 2743 | dev->sdev->bus->chip_rev == 3) |
2744 | cfp_pretbtt = 100; | 2744 | cfp_pretbtt = 100; |
2745 | else | 2745 | else |
2746 | cfp_pretbtt = 50; | 2746 | cfp_pretbtt = 50; |
@@ -2898,7 +2898,7 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
2898 | b43_write16(dev, 0x005E, value16); | 2898 | b43_write16(dev, 0x005E, value16); |
2899 | } | 2899 | } |
2900 | b43_write32(dev, 0x0100, 0x01000000); | 2900 | b43_write32(dev, 0x0100, 0x01000000); |
2901 | if (dev->dev->id.revision < 5) | 2901 | if (dev->sdev->id.revision < 5) |
2902 | b43_write32(dev, 0x010C, 0x01000000); | 2902 | b43_write32(dev, 0x010C, 0x01000000); |
2903 | 2903 | ||
2904 | b43_write32(dev, B43_MMIO_MACCTL, b43_read32(dev, B43_MMIO_MACCTL) | 2904 | b43_write32(dev, B43_MMIO_MACCTL, b43_read32(dev, B43_MMIO_MACCTL) |
@@ -2913,7 +2913,7 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
2913 | /* Initially set the wireless operation mode. */ | 2913 | /* Initially set the wireless operation mode. */ |
2914 | b43_adjust_opmode(dev); | 2914 | b43_adjust_opmode(dev); |
2915 | 2915 | ||
2916 | if (dev->dev->id.revision < 3) { | 2916 | if (dev->sdev->id.revision < 3) { |
2917 | b43_write16(dev, 0x060E, 0x0000); | 2917 | b43_write16(dev, 0x060E, 0x0000); |
2918 | b43_write16(dev, 0x0610, 0x8000); | 2918 | b43_write16(dev, 0x0610, 0x8000); |
2919 | b43_write16(dev, 0x0604, 0x0000); | 2919 | b43_write16(dev, 0x0604, 0x0000); |
@@ -2933,7 +2933,7 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
2933 | b43_mac_phy_clock_set(dev, true); | 2933 | b43_mac_phy_clock_set(dev, true); |
2934 | 2934 | ||
2935 | b43_write16(dev, B43_MMIO_POWERUP_DELAY, | 2935 | b43_write16(dev, B43_MMIO_POWERUP_DELAY, |
2936 | dev->dev->bus->chipco.fast_pwrup_delay); | 2936 | dev->sdev->bus->chipco.fast_pwrup_delay); |
2937 | 2937 | ||
2938 | err = 0; | 2938 | err = 0; |
2939 | b43dbg(dev->wl, "Chip initialized\n"); | 2939 | b43dbg(dev->wl, "Chip initialized\n"); |
@@ -3096,7 +3096,7 @@ static int b43_validate_chipaccess(struct b43_wldev *dev) | |||
3096 | b43_shm_write32(dev, B43_SHM_SHARED, 0, backup0); | 3096 | b43_shm_write32(dev, B43_SHM_SHARED, 0, backup0); |
3097 | b43_shm_write32(dev, B43_SHM_SHARED, 4, backup4); | 3097 | b43_shm_write32(dev, B43_SHM_SHARED, 4, backup4); |
3098 | 3098 | ||
3099 | if ((dev->dev->id.revision >= 3) && (dev->dev->id.revision <= 10)) { | 3099 | if ((dev->sdev->id.revision >= 3) && (dev->sdev->id.revision <= 10)) { |
3100 | /* The 32bit register shadows the two 16bit registers | 3100 | /* The 32bit register shadows the two 16bit registers |
3101 | * with update sideeffects. Validate this. */ | 3101 | * with update sideeffects. Validate this. */ |
3102 | b43_write16(dev, B43_MMIO_TSF_CFP_START, 0xAAAA); | 3102 | b43_write16(dev, B43_MMIO_TSF_CFP_START, 0xAAAA); |
@@ -3449,7 +3449,7 @@ static void b43_op_set_tsf(struct ieee80211_hw *hw, u64 tsf) | |||
3449 | 3449 | ||
3450 | static void b43_put_phy_into_reset(struct b43_wldev *dev) | 3450 | static void b43_put_phy_into_reset(struct b43_wldev *dev) |
3451 | { | 3451 | { |
3452 | struct ssb_device *sdev = dev->dev; | 3452 | struct ssb_device *sdev = dev->sdev; |
3453 | u32 tmslow; | 3453 | u32 tmslow; |
3454 | 3454 | ||
3455 | tmslow = ssb_read32(sdev, SSB_TMSLOW); | 3455 | tmslow = ssb_read32(sdev, SSB_TMSLOW); |
@@ -3945,7 +3945,7 @@ redo: | |||
3945 | 3945 | ||
3946 | /* Disable interrupts on the device. */ | 3946 | /* Disable interrupts on the device. */ |
3947 | b43_set_status(dev, B43_STAT_INITIALIZED); | 3947 | b43_set_status(dev, B43_STAT_INITIALIZED); |
3948 | if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) { | 3948 | if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) { |
3949 | /* wl->mutex is locked. That is enough. */ | 3949 | /* wl->mutex is locked. That is enough. */ |
3950 | b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, 0); | 3950 | b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, 0); |
3951 | b43_read32(dev, B43_MMIO_GEN_IRQ_MASK); /* Flush */ | 3951 | b43_read32(dev, B43_MMIO_GEN_IRQ_MASK); /* Flush */ |
@@ -3958,11 +3958,11 @@ redo: | |||
3958 | /* Synchronize and free the interrupt handlers. Unlock to avoid deadlocks. */ | 3958 | /* Synchronize and free the interrupt handlers. Unlock to avoid deadlocks. */ |
3959 | orig_dev = dev; | 3959 | orig_dev = dev; |
3960 | mutex_unlock(&wl->mutex); | 3960 | mutex_unlock(&wl->mutex); |
3961 | if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) { | 3961 | if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) { |
3962 | b43_sdio_free_irq(dev); | 3962 | b43_sdio_free_irq(dev); |
3963 | } else { | 3963 | } else { |
3964 | synchronize_irq(dev->dev->irq); | 3964 | synchronize_irq(dev->sdev->irq); |
3965 | free_irq(dev->dev->irq, dev); | 3965 | free_irq(dev->sdev->irq, dev); |
3966 | } | 3966 | } |
3967 | mutex_lock(&wl->mutex); | 3967 | mutex_lock(&wl->mutex); |
3968 | dev = wl->current_dev; | 3968 | dev = wl->current_dev; |
@@ -3995,18 +3995,19 @@ static int b43_wireless_core_start(struct b43_wldev *dev) | |||
3995 | B43_WARN_ON(b43_status(dev) != B43_STAT_INITIALIZED); | 3995 | B43_WARN_ON(b43_status(dev) != B43_STAT_INITIALIZED); |
3996 | 3996 | ||
3997 | drain_txstatus_queue(dev); | 3997 | drain_txstatus_queue(dev); |
3998 | if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) { | 3998 | if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) { |
3999 | err = b43_sdio_request_irq(dev, b43_sdio_interrupt_handler); | 3999 | err = b43_sdio_request_irq(dev, b43_sdio_interrupt_handler); |
4000 | if (err) { | 4000 | if (err) { |
4001 | b43err(dev->wl, "Cannot request SDIO IRQ\n"); | 4001 | b43err(dev->wl, "Cannot request SDIO IRQ\n"); |
4002 | goto out; | 4002 | goto out; |
4003 | } | 4003 | } |
4004 | } else { | 4004 | } else { |
4005 | err = request_threaded_irq(dev->dev->irq, b43_interrupt_handler, | 4005 | err = request_threaded_irq(dev->sdev->irq, b43_interrupt_handler, |
4006 | b43_interrupt_thread_handler, | 4006 | b43_interrupt_thread_handler, |
4007 | IRQF_SHARED, KBUILD_MODNAME, dev); | 4007 | IRQF_SHARED, KBUILD_MODNAME, dev); |
4008 | if (err) { | 4008 | if (err) { |
4009 | b43err(dev->wl, "Cannot request IRQ-%d\n", dev->dev->irq); | 4009 | b43err(dev->wl, "Cannot request IRQ-%d\n", |
4010 | dev->sdev->irq); | ||
4010 | goto out; | 4011 | goto out; |
4011 | } | 4012 | } |
4012 | } | 4013 | } |
@@ -4086,10 +4087,10 @@ static int b43_phy_versioning(struct b43_wldev *dev) | |||
4086 | analog_type, phy_type, phy_rev); | 4087 | analog_type, phy_type, phy_rev); |
4087 | 4088 | ||
4088 | /* Get RADIO versioning */ | 4089 | /* Get RADIO versioning */ |
4089 | if (dev->dev->bus->chip_id == 0x4317) { | 4090 | if (dev->sdev->bus->chip_id == 0x4317) { |
4090 | if (dev->dev->bus->chip_rev == 0) | 4091 | if (dev->sdev->bus->chip_rev == 0) |
4091 | tmp = 0x3205017F; | 4092 | tmp = 0x3205017F; |
4092 | else if (dev->dev->bus->chip_rev == 1) | 4093 | else if (dev->sdev->bus->chip_rev == 1) |
4093 | tmp = 0x4205017F; | 4094 | tmp = 0x4205017F; |
4094 | else | 4095 | else |
4095 | tmp = 0x5205017F; | 4096 | tmp = 0x5205017F; |
@@ -4194,7 +4195,7 @@ static void setup_struct_wldev_for_init(struct b43_wldev *dev) | |||
4194 | 4195 | ||
4195 | static void b43_bluetooth_coext_enable(struct b43_wldev *dev) | 4196 | static void b43_bluetooth_coext_enable(struct b43_wldev *dev) |
4196 | { | 4197 | { |
4197 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; | 4198 | struct ssb_sprom *sprom = &dev->sdev->bus->sprom; |
4198 | u64 hf; | 4199 | u64 hf; |
4199 | 4200 | ||
4200 | if (!modparam_btcoex) | 4201 | if (!modparam_btcoex) |
@@ -4221,16 +4222,16 @@ static void b43_bluetooth_coext_disable(struct b43_wldev *dev) | |||
4221 | 4222 | ||
4222 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) | 4223 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) |
4223 | { | 4224 | { |
4224 | struct ssb_bus *bus = dev->dev->bus; | 4225 | struct ssb_bus *bus = dev->sdev->bus; |
4225 | u32 tmp; | 4226 | u32 tmp; |
4226 | 4227 | ||
4227 | if ((bus->chip_id == 0x4311 && bus->chip_rev == 2) || | 4228 | if ((bus->chip_id == 0x4311 && bus->chip_rev == 2) || |
4228 | (bus->chip_id == 0x4312)) { | 4229 | (bus->chip_id == 0x4312)) { |
4229 | tmp = ssb_read32(dev->dev, SSB_IMCFGLO); | 4230 | tmp = ssb_read32(dev->sdev, SSB_IMCFGLO); |
4230 | tmp &= ~SSB_IMCFGLO_REQTO; | 4231 | tmp &= ~SSB_IMCFGLO_REQTO; |
4231 | tmp &= ~SSB_IMCFGLO_SERTO; | 4232 | tmp &= ~SSB_IMCFGLO_SERTO; |
4232 | tmp |= 0x3; | 4233 | tmp |= 0x3; |
4233 | ssb_write32(dev->dev, SSB_IMCFGLO, tmp); | 4234 | ssb_write32(dev->sdev, SSB_IMCFGLO, tmp); |
4234 | ssb_commit_settings(bus); | 4235 | ssb_commit_settings(bus); |
4235 | } | 4236 | } |
4236 | } | 4237 | } |
@@ -4300,14 +4301,14 @@ static void b43_wireless_core_exit(struct b43_wldev *dev) | |||
4300 | dev->wl->current_beacon = NULL; | 4301 | dev->wl->current_beacon = NULL; |
4301 | } | 4302 | } |
4302 | 4303 | ||
4303 | ssb_device_disable(dev->dev, 0); | 4304 | ssb_device_disable(dev->sdev, 0); |
4304 | ssb_bus_may_powerdown(dev->dev->bus); | 4305 | ssb_bus_may_powerdown(dev->sdev->bus); |
4305 | } | 4306 | } |
4306 | 4307 | ||
4307 | /* Initialize a wireless core */ | 4308 | /* Initialize a wireless core */ |
4308 | static int b43_wireless_core_init(struct b43_wldev *dev) | 4309 | static int b43_wireless_core_init(struct b43_wldev *dev) |
4309 | { | 4310 | { |
4310 | struct ssb_bus *bus = dev->dev->bus; | 4311 | struct ssb_bus *bus = dev->sdev->bus; |
4311 | struct ssb_sprom *sprom = &bus->sprom; | 4312 | struct ssb_sprom *sprom = &bus->sprom; |
4312 | struct b43_phy *phy = &dev->phy; | 4313 | struct b43_phy *phy = &dev->phy; |
4313 | int err; | 4314 | int err; |
@@ -4319,7 +4320,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
4319 | err = ssb_bus_powerup(bus, 0); | 4320 | err = ssb_bus_powerup(bus, 0); |
4320 | if (err) | 4321 | if (err) |
4321 | goto out; | 4322 | goto out; |
4322 | if (!ssb_device_is_enabled(dev->dev)) { | 4323 | if (!ssb_device_is_enabled(dev->sdev)) { |
4323 | tmp = phy->gmode ? B43_TMSLOW_GMODE : 0; | 4324 | tmp = phy->gmode ? B43_TMSLOW_GMODE : 0; |
4324 | b43_wireless_core_reset(dev, tmp); | 4325 | b43_wireless_core_reset(dev, tmp); |
4325 | } | 4326 | } |
@@ -4329,7 +4330,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
4329 | phy->ops->prepare_structs(dev); | 4330 | phy->ops->prepare_structs(dev); |
4330 | 4331 | ||
4331 | /* Enable IRQ routing to this device. */ | 4332 | /* Enable IRQ routing to this device. */ |
4332 | ssb_pcicore_dev_irqvecs_enable(&bus->pcicore, dev->dev); | 4333 | ssb_pcicore_dev_irqvecs_enable(&bus->pcicore, dev->sdev); |
4333 | 4334 | ||
4334 | b43_imcfglo_timeouts_workaround(dev); | 4335 | b43_imcfglo_timeouts_workaround(dev); |
4335 | b43_bluetooth_coext_disable(dev); | 4336 | b43_bluetooth_coext_disable(dev); |
@@ -4342,7 +4343,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
4342 | if (err) | 4343 | if (err) |
4343 | goto err_busdown; | 4344 | goto err_busdown; |
4344 | b43_shm_write16(dev, B43_SHM_SHARED, | 4345 | b43_shm_write16(dev, B43_SHM_SHARED, |
4345 | B43_SHM_SH_WLCOREREV, dev->dev->id.revision); | 4346 | B43_SHM_SH_WLCOREREV, dev->sdev->id.revision); |
4346 | hf = b43_hf_read(dev); | 4347 | hf = b43_hf_read(dev); |
4347 | if (phy->type == B43_PHYTYPE_G) { | 4348 | if (phy->type == B43_PHYTYPE_G) { |
4348 | hf |= B43_HF_SYMW; | 4349 | hf |= B43_HF_SYMW; |
@@ -4389,8 +4390,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
4389 | /* Maximum Contention Window */ | 4390 | /* Maximum Contention Window */ |
4390 | b43_shm_write16(dev, B43_SHM_SCRATCH, B43_SHM_SC_MAXCONT, 0x3FF); | 4391 | b43_shm_write16(dev, B43_SHM_SCRATCH, B43_SHM_SC_MAXCONT, 0x3FF); |
4391 | 4392 | ||
4392 | if ((dev->dev->bus->bustype == SSB_BUSTYPE_PCMCIA) || | 4393 | if ((dev->sdev->bus->bustype == SSB_BUSTYPE_PCMCIA) || |
4393 | (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) || | 4394 | (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) || |
4394 | dev->use_pio) { | 4395 | dev->use_pio) { |
4395 | dev->__using_pio_transfers = 1; | 4396 | dev->__using_pio_transfers = 1; |
4396 | err = b43_pio_init(dev); | 4397 | err = b43_pio_init(dev); |
@@ -4727,7 +4728,7 @@ static void b43_wireless_core_detach(struct b43_wldev *dev) | |||
4727 | static int b43_wireless_core_attach(struct b43_wldev *dev) | 4728 | static int b43_wireless_core_attach(struct b43_wldev *dev) |
4728 | { | 4729 | { |
4729 | struct b43_wl *wl = dev->wl; | 4730 | struct b43_wl *wl = dev->wl; |
4730 | struct ssb_bus *bus = dev->dev->bus; | 4731 | struct ssb_bus *bus = dev->sdev->bus; |
4731 | struct pci_dev *pdev = (bus->bustype == SSB_BUSTYPE_PCI) ? bus->host_pci : NULL; | 4732 | struct pci_dev *pdev = (bus->bustype == SSB_BUSTYPE_PCI) ? bus->host_pci : NULL; |
4732 | int err; | 4733 | int err; |
4733 | bool have_2ghz_phy = 0, have_5ghz_phy = 0; | 4734 | bool have_2ghz_phy = 0, have_5ghz_phy = 0; |
@@ -4746,10 +4747,10 @@ static int b43_wireless_core_attach(struct b43_wldev *dev) | |||
4746 | goto out; | 4747 | goto out; |
4747 | } | 4748 | } |
4748 | /* Get the PHY type. */ | 4749 | /* Get the PHY type. */ |
4749 | if (dev->dev->id.revision >= 5) { | 4750 | if (dev->sdev->id.revision >= 5) { |
4750 | u32 tmshigh; | 4751 | u32 tmshigh; |
4751 | 4752 | ||
4752 | tmshigh = ssb_read32(dev->dev, SSB_TMSHIGH); | 4753 | tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH); |
4753 | have_2ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY); | 4754 | have_2ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY); |
4754 | have_5ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_5GHZ_PHY); | 4755 | have_5ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_5GHZ_PHY); |
4755 | } else | 4756 | } else |
@@ -4822,7 +4823,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev) | |||
4822 | INIT_WORK(&dev->restart_work, b43_chip_reset); | 4823 | INIT_WORK(&dev->restart_work, b43_chip_reset); |
4823 | 4824 | ||
4824 | dev->phy.ops->switch_analog(dev, 0); | 4825 | dev->phy.ops->switch_analog(dev, 0); |
4825 | ssb_device_disable(dev->dev, 0); | 4826 | ssb_device_disable(dev->sdev, 0); |
4826 | ssb_bus_may_powerdown(bus); | 4827 | ssb_bus_may_powerdown(bus); |
4827 | 4828 | ||
4828 | out: | 4829 | out: |
@@ -4863,7 +4864,7 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl) | |||
4863 | goto out; | 4864 | goto out; |
4864 | 4865 | ||
4865 | wldev->use_pio = b43_modparam_pio; | 4866 | wldev->use_pio = b43_modparam_pio; |
4866 | wldev->dev = dev; | 4867 | wldev->sdev = dev; |
4867 | wldev->wl = wl; | 4868 | wldev->wl = wl; |
4868 | b43_set_status(wldev, B43_STAT_UNINIT); | 4869 | b43_set_status(wldev, B43_STAT_UNINIT); |
4869 | wldev->bad_frames_preempt = modparam_bad_frames_preempt; | 4870 | wldev->bad_frames_preempt = modparam_bad_frames_preempt; |
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c index b6428ec16dd6..b01c8ced57c3 100644 --- a/drivers/net/wireless/b43/phy_a.c +++ b/drivers/net/wireless/b43/phy_a.c | |||
@@ -265,7 +265,7 @@ static void hardware_pctl_init_aphy(struct b43_wldev *dev) | |||
265 | 265 | ||
266 | void b43_phy_inita(struct b43_wldev *dev) | 266 | void b43_phy_inita(struct b43_wldev *dev) |
267 | { | 267 | { |
268 | struct ssb_bus *bus = dev->dev->bus; | 268 | struct ssb_bus *bus = dev->sdev->bus; |
269 | struct b43_phy *phy = &dev->phy; | 269 | struct b43_phy *phy = &dev->phy; |
270 | 270 | ||
271 | /* This lowlevel A-PHY init is also called from G-PHY init. | 271 | /* This lowlevel A-PHY init is also called from G-PHY init. |
@@ -311,7 +311,7 @@ void b43_phy_inita(struct b43_wldev *dev) | |||
311 | } | 311 | } |
312 | 312 | ||
313 | if ((phy->type == B43_PHYTYPE_G) && | 313 | if ((phy->type == B43_PHYTYPE_G) && |
314 | (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL)) { | 314 | (dev->sdev->bus->sprom.boardflags_lo & B43_BFL_PACTRL)) { |
315 | b43_phy_maskset(dev, B43_PHY_OFDM(0x6E), 0xE000, 0x3CF); | 315 | b43_phy_maskset(dev, B43_PHY_OFDM(0x6E), 0xE000, 0x3CF); |
316 | } | 316 | } |
317 | } | 317 | } |
@@ -323,17 +323,17 @@ static int b43_aphy_init_tssi2dbm_table(struct b43_wldev *dev) | |||
323 | struct b43_phy_a *aphy = phy->a; | 323 | struct b43_phy_a *aphy = phy->a; |
324 | s16 pab0, pab1, pab2; | 324 | s16 pab0, pab1, pab2; |
325 | 325 | ||
326 | pab0 = (s16) (dev->dev->bus->sprom.pa1b0); | 326 | pab0 = (s16) (dev->sdev->bus->sprom.pa1b0); |
327 | pab1 = (s16) (dev->dev->bus->sprom.pa1b1); | 327 | pab1 = (s16) (dev->sdev->bus->sprom.pa1b1); |
328 | pab2 = (s16) (dev->dev->bus->sprom.pa1b2); | 328 | pab2 = (s16) (dev->sdev->bus->sprom.pa1b2); |
329 | 329 | ||
330 | if (pab0 != 0 && pab1 != 0 && pab2 != 0 && | 330 | if (pab0 != 0 && pab1 != 0 && pab2 != 0 && |
331 | pab0 != -1 && pab1 != -1 && pab2 != -1) { | 331 | pab0 != -1 && pab1 != -1 && pab2 != -1) { |
332 | /* The pabX values are set in SPROM. Use them. */ | 332 | /* The pabX values are set in SPROM. Use them. */ |
333 | if ((s8) dev->dev->bus->sprom.itssi_a != 0 && | 333 | if ((s8) dev->sdev->bus->sprom.itssi_a != 0 && |
334 | (s8) dev->dev->bus->sprom.itssi_a != -1) | 334 | (s8) dev->sdev->bus->sprom.itssi_a != -1) |
335 | aphy->tgt_idle_tssi = | 335 | aphy->tgt_idle_tssi = |
336 | (s8) (dev->dev->bus->sprom.itssi_a); | 336 | (s8) (dev->sdev->bus->sprom.itssi_a); |
337 | else | 337 | else |
338 | aphy->tgt_idle_tssi = 62; | 338 | aphy->tgt_idle_tssi = 62; |
339 | aphy->tssi2dbm = b43_generate_dyn_tssi2dbm_tab(dev, pab0, | 339 | aphy->tssi2dbm = b43_generate_dyn_tssi2dbm_tab(dev, pab0, |
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index b5c5ce94d3fd..e46b2f4f0920 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c | |||
@@ -168,7 +168,7 @@ void b43_phy_lock(struct b43_wldev *dev) | |||
168 | B43_WARN_ON(dev->phy.phy_locked); | 168 | B43_WARN_ON(dev->phy.phy_locked); |
169 | dev->phy.phy_locked = 1; | 169 | dev->phy.phy_locked = 1; |
170 | #endif | 170 | #endif |
171 | B43_WARN_ON(dev->dev->id.revision < 3); | 171 | B43_WARN_ON(dev->sdev->id.revision < 3); |
172 | 172 | ||
173 | if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP)) | 173 | if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP)) |
174 | b43_power_saving_ctl_bits(dev, B43_PS_AWAKE); | 174 | b43_power_saving_ctl_bits(dev, B43_PS_AWAKE); |
@@ -180,7 +180,7 @@ void b43_phy_unlock(struct b43_wldev *dev) | |||
180 | B43_WARN_ON(!dev->phy.phy_locked); | 180 | B43_WARN_ON(!dev->phy.phy_locked); |
181 | dev->phy.phy_locked = 0; | 181 | dev->phy.phy_locked = 0; |
182 | #endif | 182 | #endif |
183 | B43_WARN_ON(dev->dev->id.revision < 3); | 183 | B43_WARN_ON(dev->sdev->id.revision < 3); |
184 | 184 | ||
185 | if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP)) | 185 | if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP)) |
186 | b43_power_saving_ctl_bits(dev, 0); | 186 | b43_power_saving_ctl_bits(dev, 0); |
@@ -368,8 +368,8 @@ void b43_phy_txpower_check(struct b43_wldev *dev, unsigned int flags) | |||
368 | /* The next check will be needed in two seconds, or later. */ | 368 | /* The next check will be needed in two seconds, or later. */ |
369 | phy->next_txpwr_check_time = round_jiffies(now + (HZ * 2)); | 369 | phy->next_txpwr_check_time = round_jiffies(now + (HZ * 2)); |
370 | 370 | ||
371 | if ((dev->dev->bus->boardinfo.vendor == SSB_BOARDVENDOR_BCM) && | 371 | if ((dev->sdev->bus->boardinfo.vendor == SSB_BOARDVENDOR_BCM) && |
372 | (dev->dev->bus->boardinfo.type == SSB_BOARD_BU4306)) | 372 | (dev->sdev->bus->boardinfo.type == SSB_BOARD_BU4306)) |
373 | return; /* No software txpower adjustment needed */ | 373 | return; /* No software txpower adjustment needed */ |
374 | 374 | ||
375 | result = phy->ops->recalc_txpower(dev, !!(flags & B43_TXPWR_IGNORE_TSSI)); | 375 | result = phy->ops->recalc_txpower(dev, !!(flags & B43_TXPWR_IGNORE_TSSI)); |
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c index be4828167012..1758a282f913 100644 --- a/drivers/net/wireless/b43/phy_g.c +++ b/drivers/net/wireless/b43/phy_g.c | |||
@@ -718,7 +718,7 @@ static void b43_calc_nrssi_threshold(struct b43_wldev *dev) | |||
718 | B43_WARN_ON(phy->type != B43_PHYTYPE_G); | 718 | B43_WARN_ON(phy->type != B43_PHYTYPE_G); |
719 | 719 | ||
720 | if (!phy->gmode || | 720 | if (!phy->gmode || |
721 | !(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { | 721 | !(dev->sdev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { |
722 | tmp16 = b43_nrssi_hw_read(dev, 0x20); | 722 | tmp16 = b43_nrssi_hw_read(dev, 0x20); |
723 | if (tmp16 >= 0x20) | 723 | if (tmp16 >= 0x20) |
724 | tmp16 -= 0x40; | 724 | tmp16 -= 0x40; |
@@ -1114,7 +1114,7 @@ static u16 radio2050_rfover_val(struct b43_wldev *dev, | |||
1114 | { | 1114 | { |
1115 | struct b43_phy *phy = &dev->phy; | 1115 | struct b43_phy *phy = &dev->phy; |
1116 | struct b43_phy_g *gphy = phy->g; | 1116 | struct b43_phy_g *gphy = phy->g; |
1117 | struct ssb_sprom *sprom = &(dev->dev->bus->sprom); | 1117 | struct ssb_sprom *sprom = &(dev->sdev->bus->sprom); |
1118 | 1118 | ||
1119 | if (!phy->gmode) | 1119 | if (!phy->gmode) |
1120 | return 0; | 1120 | return 0; |
@@ -1491,7 +1491,7 @@ static u16 b43_radio_init2050(struct b43_wldev *dev) | |||
1491 | 1491 | ||
1492 | static void b43_phy_initb5(struct b43_wldev *dev) | 1492 | static void b43_phy_initb5(struct b43_wldev *dev) |
1493 | { | 1493 | { |
1494 | struct ssb_bus *bus = dev->dev->bus; | 1494 | struct ssb_bus *bus = dev->sdev->bus; |
1495 | struct b43_phy *phy = &dev->phy; | 1495 | struct b43_phy *phy = &dev->phy; |
1496 | struct b43_phy_g *gphy = phy->g; | 1496 | struct b43_phy_g *gphy = phy->g; |
1497 | u16 offset, value; | 1497 | u16 offset, value; |
@@ -1620,7 +1620,7 @@ static void b43_phy_initb6(struct b43_wldev *dev) | |||
1620 | b43_radio_write16(dev, 0x5A, 0x88); | 1620 | b43_radio_write16(dev, 0x5A, 0x88); |
1621 | b43_radio_write16(dev, 0x5B, 0x6B); | 1621 | b43_radio_write16(dev, 0x5B, 0x6B); |
1622 | b43_radio_write16(dev, 0x5C, 0x0F); | 1622 | b43_radio_write16(dev, 0x5C, 0x0F); |
1623 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_ALTIQ) { | 1623 | if (dev->sdev->bus->sprom.boardflags_lo & B43_BFL_ALTIQ) { |
1624 | b43_radio_write16(dev, 0x5D, 0xFA); | 1624 | b43_radio_write16(dev, 0x5D, 0xFA); |
1625 | b43_radio_write16(dev, 0x5E, 0xD8); | 1625 | b43_radio_write16(dev, 0x5E, 0xD8); |
1626 | } else { | 1626 | } else { |
@@ -1787,7 +1787,7 @@ static void b43_calc_loopback_gain(struct b43_wldev *dev) | |||
1787 | b43_phy_set(dev, B43_PHY_RFOVER, 0x0100); | 1787 | b43_phy_set(dev, B43_PHY_RFOVER, 0x0100); |
1788 | b43_phy_mask(dev, B43_PHY_RFOVERVAL, 0xCFFF); | 1788 | b43_phy_mask(dev, B43_PHY_RFOVERVAL, 0xCFFF); |
1789 | 1789 | ||
1790 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) { | 1790 | if (dev->sdev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) { |
1791 | if (phy->rev >= 7) { | 1791 | if (phy->rev >= 7) { |
1792 | b43_phy_set(dev, B43_PHY_RFOVER, 0x0800); | 1792 | b43_phy_set(dev, B43_PHY_RFOVER, 0x0800); |
1793 | b43_phy_set(dev, B43_PHY_RFOVERVAL, 0x8000); | 1793 | b43_phy_set(dev, B43_PHY_RFOVERVAL, 0x8000); |
@@ -1922,7 +1922,7 @@ static void b43_hardware_pctl_init_gphy(struct b43_wldev *dev) | |||
1922 | /* Initialize B/G PHY power control */ | 1922 | /* Initialize B/G PHY power control */ |
1923 | static void b43_phy_init_pctl(struct b43_wldev *dev) | 1923 | static void b43_phy_init_pctl(struct b43_wldev *dev) |
1924 | { | 1924 | { |
1925 | struct ssb_bus *bus = dev->dev->bus; | 1925 | struct ssb_bus *bus = dev->sdev->bus; |
1926 | struct b43_phy *phy = &dev->phy; | 1926 | struct b43_phy *phy = &dev->phy; |
1927 | struct b43_phy_g *gphy = phy->g; | 1927 | struct b43_phy_g *gphy = phy->g; |
1928 | struct b43_rfatt old_rfatt; | 1928 | struct b43_rfatt old_rfatt; |
@@ -2053,7 +2053,7 @@ static void b43_phy_initg(struct b43_wldev *dev) | |||
2053 | if (phy->rev >= 6) { | 2053 | if (phy->rev >= 6) { |
2054 | b43_phy_maskset(dev, B43_PHY_CCK(0x36), 0x0FFF, (gphy->lo_control->tx_bias << 12)); | 2054 | b43_phy_maskset(dev, B43_PHY_CCK(0x36), 0x0FFF, (gphy->lo_control->tx_bias << 12)); |
2055 | } | 2055 | } |
2056 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) | 2056 | if (dev->sdev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) |
2057 | b43_phy_write(dev, B43_PHY_CCK(0x2E), 0x8075); | 2057 | b43_phy_write(dev, B43_PHY_CCK(0x2E), 0x8075); |
2058 | else | 2058 | else |
2059 | b43_phy_write(dev, B43_PHY_CCK(0x2E), 0x807F); | 2059 | b43_phy_write(dev, B43_PHY_CCK(0x2E), 0x807F); |
@@ -2066,7 +2066,7 @@ static void b43_phy_initg(struct b43_wldev *dev) | |||
2066 | b43_phy_write(dev, B43_PHY_LO_MASK, 0x8078); | 2066 | b43_phy_write(dev, B43_PHY_LO_MASK, 0x8078); |
2067 | } | 2067 | } |
2068 | 2068 | ||
2069 | if (!(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { | 2069 | if (!(dev->sdev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { |
2070 | /* The specs state to update the NRSSI LT with | 2070 | /* The specs state to update the NRSSI LT with |
2071 | * the value 0x7FFFFFFF here. I think that is some weird | 2071 | * the value 0x7FFFFFFF here. I think that is some weird |
2072 | * compiler optimization in the original driver. | 2072 | * compiler optimization in the original driver. |
@@ -2088,8 +2088,8 @@ static void b43_phy_initg(struct b43_wldev *dev) | |||
2088 | /* FIXME: The spec says in the following if, the 0 should be replaced | 2088 | /* FIXME: The spec says in the following if, the 0 should be replaced |
2089 | 'if OFDM may not be used in the current locale' | 2089 | 'if OFDM may not be used in the current locale' |
2090 | but OFDM is legal everywhere */ | 2090 | but OFDM is legal everywhere */ |
2091 | if ((dev->dev->bus->chip_id == 0x4306 | 2091 | if ((dev->sdev->bus->chip_id == 0x4306 |
2092 | && dev->dev->bus->chip_package == 2) || 0) { | 2092 | && dev->sdev->bus->chip_package == 2) || 0) { |
2093 | b43_phy_mask(dev, B43_PHY_CRS0, 0xBFFF); | 2093 | b43_phy_mask(dev, B43_PHY_CRS0, 0xBFFF); |
2094 | b43_phy_mask(dev, B43_PHY_OFDM(0xC3), 0x7FFF); | 2094 | b43_phy_mask(dev, B43_PHY_OFDM(0xC3), 0x7FFF); |
2095 | } | 2095 | } |
@@ -2105,7 +2105,7 @@ void b43_gphy_channel_switch(struct b43_wldev *dev, | |||
2105 | b43_write16(dev, B43_MMIO_CHANNEL, channel2freq_bg(channel)); | 2105 | b43_write16(dev, B43_MMIO_CHANNEL, channel2freq_bg(channel)); |
2106 | 2106 | ||
2107 | if (channel == 14) { | 2107 | if (channel == 14) { |
2108 | if (dev->dev->bus->sprom.country_code == | 2108 | if (dev->sdev->bus->sprom.country_code == |
2109 | SSB_SPROM1CCODE_JAPAN) | 2109 | SSB_SPROM1CCODE_JAPAN) |
2110 | b43_hf_write(dev, | 2110 | b43_hf_write(dev, |
2111 | b43_hf_read(dev) & ~B43_HF_ACPR); | 2111 | b43_hf_read(dev) & ~B43_HF_ACPR); |
@@ -2136,7 +2136,7 @@ static void default_baseband_attenuation(struct b43_wldev *dev, | |||
2136 | static void default_radio_attenuation(struct b43_wldev *dev, | 2136 | static void default_radio_attenuation(struct b43_wldev *dev, |
2137 | struct b43_rfatt *rf) | 2137 | struct b43_rfatt *rf) |
2138 | { | 2138 | { |
2139 | struct ssb_bus *bus = dev->dev->bus; | 2139 | struct ssb_bus *bus = dev->sdev->bus; |
2140 | struct b43_phy *phy = &dev->phy; | 2140 | struct b43_phy *phy = &dev->phy; |
2141 | 2141 | ||
2142 | rf->with_padmix = 0; | 2142 | rf->with_padmix = 0; |
@@ -2384,11 +2384,11 @@ static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev) | |||
2384 | struct b43_phy_g *gphy = phy->g; | 2384 | struct b43_phy_g *gphy = phy->g; |
2385 | s16 pab0, pab1, pab2; | 2385 | s16 pab0, pab1, pab2; |
2386 | 2386 | ||
2387 | pab0 = (s16) (dev->dev->bus->sprom.pa0b0); | 2387 | pab0 = (s16) (dev->sdev->bus->sprom.pa0b0); |
2388 | pab1 = (s16) (dev->dev->bus->sprom.pa0b1); | 2388 | pab1 = (s16) (dev->sdev->bus->sprom.pa0b1); |
2389 | pab2 = (s16) (dev->dev->bus->sprom.pa0b2); | 2389 | pab2 = (s16) (dev->sdev->bus->sprom.pa0b2); |
2390 | 2390 | ||
2391 | B43_WARN_ON((dev->dev->bus->chip_id == 0x4301) && | 2391 | B43_WARN_ON((dev->sdev->bus->chip_id == 0x4301) && |
2392 | (phy->radio_ver != 0x2050)); /* Not supported anymore */ | 2392 | (phy->radio_ver != 0x2050)); /* Not supported anymore */ |
2393 | 2393 | ||
2394 | gphy->dyn_tssi_tbl = 0; | 2394 | gphy->dyn_tssi_tbl = 0; |
@@ -2396,10 +2396,10 @@ static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev) | |||
2396 | if (pab0 != 0 && pab1 != 0 && pab2 != 0 && | 2396 | if (pab0 != 0 && pab1 != 0 && pab2 != 0 && |
2397 | pab0 != -1 && pab1 != -1 && pab2 != -1) { | 2397 | pab0 != -1 && pab1 != -1 && pab2 != -1) { |
2398 | /* The pabX values are set in SPROM. Use them. */ | 2398 | /* The pabX values are set in SPROM. Use them. */ |
2399 | if ((s8) dev->dev->bus->sprom.itssi_bg != 0 && | 2399 | if ((s8) dev->sdev->bus->sprom.itssi_bg != 0 && |
2400 | (s8) dev->dev->bus->sprom.itssi_bg != -1) { | 2400 | (s8) dev->sdev->bus->sprom.itssi_bg != -1) { |
2401 | gphy->tgt_idle_tssi = | 2401 | gphy->tgt_idle_tssi = |
2402 | (s8) (dev->dev->bus->sprom.itssi_bg); | 2402 | (s8) (dev->sdev->bus->sprom.itssi_bg); |
2403 | } else | 2403 | } else |
2404 | gphy->tgt_idle_tssi = 62; | 2404 | gphy->tgt_idle_tssi = 62; |
2405 | gphy->tssi2dbm = b43_generate_dyn_tssi2dbm_tab(dev, pab0, | 2405 | gphy->tssi2dbm = b43_generate_dyn_tssi2dbm_tab(dev, pab0, |
@@ -2840,7 +2840,7 @@ static void b43_gphy_op_adjust_txpower(struct b43_wldev *dev) | |||
2840 | B43_TXCTL_TXMIX; | 2840 | B43_TXCTL_TXMIX; |
2841 | rfatt += 2; | 2841 | rfatt += 2; |
2842 | bbatt += 2; | 2842 | bbatt += 2; |
2843 | } else if (dev->dev->bus->sprom. | 2843 | } else if (dev->sdev->bus->sprom. |
2844 | boardflags_lo & | 2844 | boardflags_lo & |
2845 | B43_BFL_PACTRL) { | 2845 | B43_BFL_PACTRL) { |
2846 | bbatt += 4 * (rfatt - 2); | 2846 | bbatt += 4 * (rfatt - 2); |
@@ -2914,14 +2914,14 @@ static enum b43_txpwr_result b43_gphy_op_recalc_txpower(struct b43_wldev *dev, | |||
2914 | estimated_pwr = b43_gphy_estimate_power_out(dev, average_tssi); | 2914 | estimated_pwr = b43_gphy_estimate_power_out(dev, average_tssi); |
2915 | 2915 | ||
2916 | B43_WARN_ON(phy->type != B43_PHYTYPE_G); | 2916 | B43_WARN_ON(phy->type != B43_PHYTYPE_G); |
2917 | max_pwr = dev->dev->bus->sprom.maxpwr_bg; | 2917 | max_pwr = dev->sdev->bus->sprom.maxpwr_bg; |
2918 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) | 2918 | if (dev->sdev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) |
2919 | max_pwr -= 3; /* minus 0.75 */ | 2919 | max_pwr -= 3; /* minus 0.75 */ |
2920 | if (unlikely(max_pwr >= INT_TO_Q52(30/*dBm*/))) { | 2920 | if (unlikely(max_pwr >= INT_TO_Q52(30/*dBm*/))) { |
2921 | b43warn(dev->wl, | 2921 | b43warn(dev->wl, |
2922 | "Invalid max-TX-power value in SPROM.\n"); | 2922 | "Invalid max-TX-power value in SPROM.\n"); |
2923 | max_pwr = INT_TO_Q52(20); /* fake it */ | 2923 | max_pwr = INT_TO_Q52(20); /* fake it */ |
2924 | dev->dev->bus->sprom.maxpwr_bg = max_pwr; | 2924 | dev->sdev->bus->sprom.maxpwr_bg = max_pwr; |
2925 | } | 2925 | } |
2926 | 2926 | ||
2927 | /* Get desired power (in Q5.2) */ | 2927 | /* Get desired power (in Q5.2) */ |
@@ -3014,7 +3014,7 @@ static void b43_gphy_op_pwork_60sec(struct b43_wldev *dev) | |||
3014 | { | 3014 | { |
3015 | struct b43_phy *phy = &dev->phy; | 3015 | struct b43_phy *phy = &dev->phy; |
3016 | 3016 | ||
3017 | if (!(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) | 3017 | if (!(dev->sdev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) |
3018 | return; | 3018 | return; |
3019 | 3019 | ||
3020 | b43_mac_suspend(dev); | 3020 | b43_mac_suspend(dev); |
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index fd50eb116243..012c8da2f944 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c | |||
@@ -86,7 +86,7 @@ static void b43_lpphy_op_free(struct b43_wldev *dev) | |||
86 | static void lpphy_read_band_sprom(struct b43_wldev *dev) | 86 | static void lpphy_read_band_sprom(struct b43_wldev *dev) |
87 | { | 87 | { |
88 | struct b43_phy_lp *lpphy = dev->phy.lp; | 88 | struct b43_phy_lp *lpphy = dev->phy.lp; |
89 | struct ssb_bus *bus = dev->dev->bus; | 89 | struct ssb_bus *bus = dev->sdev->bus; |
90 | u16 cckpo, maxpwr; | 90 | u16 cckpo, maxpwr; |
91 | u32 ofdmpo; | 91 | u32 ofdmpo; |
92 | int i; | 92 | int i; |
@@ -214,7 +214,7 @@ static void lpphy_table_init(struct b43_wldev *dev) | |||
214 | 214 | ||
215 | static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) | 215 | static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) |
216 | { | 216 | { |
217 | struct ssb_bus *bus = dev->dev->bus; | 217 | struct ssb_bus *bus = dev->sdev->bus; |
218 | struct b43_phy_lp *lpphy = dev->phy.lp; | 218 | struct b43_phy_lp *lpphy = dev->phy.lp; |
219 | u16 tmp, tmp2; | 219 | u16 tmp, tmp2; |
220 | 220 | ||
@@ -412,7 +412,7 @@ static void lpphy_restore_dig_flt_state(struct b43_wldev *dev) | |||
412 | 412 | ||
413 | static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev) | 413 | static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev) |
414 | { | 414 | { |
415 | struct ssb_bus *bus = dev->dev->bus; | 415 | struct ssb_bus *bus = dev->sdev->bus; |
416 | struct b43_phy_lp *lpphy = dev->phy.lp; | 416 | struct b43_phy_lp *lpphy = dev->phy.lp; |
417 | 417 | ||
418 | b43_phy_write(dev, B43_LPPHY_AFE_DAC_CTL, 0x50); | 418 | b43_phy_write(dev, B43_LPPHY_AFE_DAC_CTL, 0x50); |
@@ -519,7 +519,7 @@ struct b2062_freqdata { | |||
519 | static void lpphy_2062_init(struct b43_wldev *dev) | 519 | static void lpphy_2062_init(struct b43_wldev *dev) |
520 | { | 520 | { |
521 | struct b43_phy_lp *lpphy = dev->phy.lp; | 521 | struct b43_phy_lp *lpphy = dev->phy.lp; |
522 | struct ssb_bus *bus = dev->dev->bus; | 522 | struct ssb_bus *bus = dev->sdev->bus; |
523 | u32 crystalfreq, tmp, ref; | 523 | u32 crystalfreq, tmp, ref; |
524 | unsigned int i; | 524 | unsigned int i; |
525 | const struct b2062_freqdata *fd = NULL; | 525 | const struct b2062_freqdata *fd = NULL; |
@@ -697,7 +697,7 @@ static void lpphy_radio_init(struct b43_wldev *dev) | |||
697 | lpphy_sync_stx(dev); | 697 | lpphy_sync_stx(dev); |
698 | b43_phy_write(dev, B43_PHY_OFDM(0xF0), 0x5F80); | 698 | b43_phy_write(dev, B43_PHY_OFDM(0xF0), 0x5F80); |
699 | b43_phy_write(dev, B43_PHY_OFDM(0xF1), 0); | 699 | b43_phy_write(dev, B43_PHY_OFDM(0xF1), 0); |
700 | if (dev->dev->bus->chip_id == 0x4325) { | 700 | if (dev->sdev->bus->chip_id == 0x4325) { |
701 | // TODO SSB PMU recalibration | 701 | // TODO SSB PMU recalibration |
702 | } | 702 | } |
703 | } | 703 | } |
@@ -1289,7 +1289,7 @@ finish: | |||
1289 | 1289 | ||
1290 | static void lpphy_rev2plus_rc_calib(struct b43_wldev *dev) | 1290 | static void lpphy_rev2plus_rc_calib(struct b43_wldev *dev) |
1291 | { | 1291 | { |
1292 | struct ssb_bus *bus = dev->dev->bus; | 1292 | struct ssb_bus *bus = dev->sdev->bus; |
1293 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; | 1293 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; |
1294 | u8 tmp = b43_radio_read(dev, B2063_RX_BB_SP8) & 0xFF; | 1294 | u8 tmp = b43_radio_read(dev, B2063_RX_BB_SP8) & 0xFF; |
1295 | int i; | 1295 | int i; |
@@ -1840,7 +1840,7 @@ static void lpphy_papd_cal(struct b43_wldev *dev, struct lpphy_tx_gains gains, | |||
1840 | static void lpphy_papd_cal_txpwr(struct b43_wldev *dev) | 1840 | static void lpphy_papd_cal_txpwr(struct b43_wldev *dev) |
1841 | { | 1841 | { |
1842 | struct b43_phy_lp *lpphy = dev->phy.lp; | 1842 | struct b43_phy_lp *lpphy = dev->phy.lp; |
1843 | struct ssb_bus *bus = dev->dev->bus; | 1843 | struct ssb_bus *bus = dev->sdev->bus; |
1844 | struct lpphy_tx_gains gains, oldgains; | 1844 | struct lpphy_tx_gains gains, oldgains; |
1845 | int old_txpctl, old_afe_ovr, old_rf, old_bbmult; | 1845 | int old_txpctl, old_afe_ovr, old_rf, old_bbmult; |
1846 | 1846 | ||
@@ -1870,7 +1870,7 @@ static int lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx, | |||
1870 | bool rx, bool pa, struct lpphy_tx_gains *gains) | 1870 | bool rx, bool pa, struct lpphy_tx_gains *gains) |
1871 | { | 1871 | { |
1872 | struct b43_phy_lp *lpphy = dev->phy.lp; | 1872 | struct b43_phy_lp *lpphy = dev->phy.lp; |
1873 | struct ssb_bus *bus = dev->dev->bus; | 1873 | struct ssb_bus *bus = dev->sdev->bus; |
1874 | const struct lpphy_rx_iq_comp *iqcomp = NULL; | 1874 | const struct lpphy_rx_iq_comp *iqcomp = NULL; |
1875 | struct lpphy_tx_gains nogains, oldgains; | 1875 | struct lpphy_tx_gains nogains, oldgains; |
1876 | u16 tmp; | 1876 | u16 tmp; |
@@ -2408,7 +2408,7 @@ static const struct b206x_channel b2063_chantbl[] = { | |||
2408 | 2408 | ||
2409 | static void lpphy_b2062_reset_pll_bias(struct b43_wldev *dev) | 2409 | static void lpphy_b2062_reset_pll_bias(struct b43_wldev *dev) |
2410 | { | 2410 | { |
2411 | struct ssb_bus *bus = dev->dev->bus; | 2411 | struct ssb_bus *bus = dev->sdev->bus; |
2412 | 2412 | ||
2413 | b43_radio_write(dev, B2062_S_RFPLL_CTL2, 0xFF); | 2413 | b43_radio_write(dev, B2062_S_RFPLL_CTL2, 0xFF); |
2414 | udelay(20); | 2414 | udelay(20); |
@@ -2432,7 +2432,7 @@ static int lpphy_b2062_tune(struct b43_wldev *dev, | |||
2432 | unsigned int channel) | 2432 | unsigned int channel) |
2433 | { | 2433 | { |
2434 | struct b43_phy_lp *lpphy = dev->phy.lp; | 2434 | struct b43_phy_lp *lpphy = dev->phy.lp; |
2435 | struct ssb_bus *bus = dev->dev->bus; | 2435 | struct ssb_bus *bus = dev->sdev->bus; |
2436 | const struct b206x_channel *chandata = NULL; | 2436 | const struct b206x_channel *chandata = NULL; |
2437 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; | 2437 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; |
2438 | u32 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9; | 2438 | u32 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9; |
@@ -2522,7 +2522,7 @@ static void lpphy_b2063_vco_calib(struct b43_wldev *dev) | |||
2522 | static int lpphy_b2063_tune(struct b43_wldev *dev, | 2522 | static int lpphy_b2063_tune(struct b43_wldev *dev, |
2523 | unsigned int channel) | 2523 | unsigned int channel) |
2524 | { | 2524 | { |
2525 | struct ssb_bus *bus = dev->dev->bus; | 2525 | struct ssb_bus *bus = dev->sdev->bus; |
2526 | 2526 | ||
2527 | static const struct b206x_channel *chandata = NULL; | 2527 | static const struct b206x_channel *chandata = NULL; |
2528 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; | 2528 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index b075a3f82a43..9ed65157bef5 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -299,7 +299,7 @@ static void b43_nphy_tx_power_ctrl(struct b43_wldev *dev, bool enable) | |||
299 | static void b43_nphy_tx_power_fix(struct b43_wldev *dev) | 299 | static void b43_nphy_tx_power_fix(struct b43_wldev *dev) |
300 | { | 300 | { |
301 | struct b43_phy_n *nphy = dev->phy.n; | 301 | struct b43_phy_n *nphy = dev->phy.n; |
302 | struct ssb_sprom *sprom = &(dev->dev->bus->sprom); | 302 | struct ssb_sprom *sprom = &(dev->sdev->bus->sprom); |
303 | 303 | ||
304 | u8 txpi[2], bbmult, i; | 304 | u8 txpi[2], bbmult, i; |
305 | u16 tmp, radio_gain, dac_gain; | 305 | u16 tmp, radio_gain, dac_gain; |
@@ -423,8 +423,8 @@ static void b43_radio_init2055_pre(struct b43_wldev *dev) | |||
423 | static void b43_radio_init2055_post(struct b43_wldev *dev) | 423 | static void b43_radio_init2055_post(struct b43_wldev *dev) |
424 | { | 424 | { |
425 | struct b43_phy_n *nphy = dev->phy.n; | 425 | struct b43_phy_n *nphy = dev->phy.n; |
426 | struct ssb_sprom *sprom = &(dev->dev->bus->sprom); | 426 | struct ssb_sprom *sprom = &(dev->sdev->bus->sprom); |
427 | struct ssb_boardinfo *binfo = &(dev->dev->bus->boardinfo); | 427 | struct ssb_boardinfo *binfo = &(dev->sdev->bus->boardinfo); |
428 | int i; | 428 | int i; |
429 | u16 val; | 429 | u16 val; |
430 | bool workaround = false; | 430 | bool workaround = false; |
@@ -609,12 +609,12 @@ static void b43_nphy_bmac_clock_fgc(struct b43_wldev *dev, bool force) | |||
609 | if (dev->phy.type != B43_PHYTYPE_N) | 609 | if (dev->phy.type != B43_PHYTYPE_N) |
610 | return; | 610 | return; |
611 | 611 | ||
612 | tmslow = ssb_read32(dev->dev, SSB_TMSLOW); | 612 | tmslow = ssb_read32(dev->sdev, SSB_TMSLOW); |
613 | if (force) | 613 | if (force) |
614 | tmslow |= SSB_TMSLOW_FGC; | 614 | tmslow |= SSB_TMSLOW_FGC; |
615 | else | 615 | else |
616 | tmslow &= ~SSB_TMSLOW_FGC; | 616 | tmslow &= ~SSB_TMSLOW_FGC; |
617 | ssb_write32(dev->dev, SSB_TMSLOW, tmslow); | 617 | ssb_write32(dev->sdev, SSB_TMSLOW, tmslow); |
618 | } | 618 | } |
619 | 619 | ||
620 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */ | 620 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */ |
@@ -959,7 +959,7 @@ static void b43_nphy_superswitch_init(struct b43_wldev *dev, bool init) | |||
959 | b43_phy_write(dev, B43_NPHY_GPIO_LOOEN, 0); | 959 | b43_phy_write(dev, B43_NPHY_GPIO_LOOEN, 0); |
960 | b43_phy_write(dev, B43_NPHY_GPIO_HIOEN, 0); | 960 | b43_phy_write(dev, B43_NPHY_GPIO_HIOEN, 0); |
961 | 961 | ||
962 | ssb_chipco_gpio_control(&dev->dev->bus->chipco, 0xFC00, | 962 | ssb_chipco_gpio_control(&dev->sdev->bus->chipco, 0xFC00, |
963 | 0xFC00); | 963 | 0xFC00); |
964 | b43_write32(dev, B43_MMIO_MACCTL, | 964 | b43_write32(dev, B43_MMIO_MACCTL, |
965 | b43_read32(dev, B43_MMIO_MACCTL) & | 965 | b43_read32(dev, B43_MMIO_MACCTL) & |
@@ -983,7 +983,7 @@ static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val) | |||
983 | { | 983 | { |
984 | u16 tmp; | 984 | u16 tmp; |
985 | 985 | ||
986 | if (dev->dev->id.revision == 16) | 986 | if (dev->sdev->id.revision == 16) |
987 | b43_mac_suspend(dev); | 987 | b43_mac_suspend(dev); |
988 | 988 | ||
989 | tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL); | 989 | tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL); |
@@ -993,7 +993,7 @@ static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val) | |||
993 | tmp |= (val & mask); | 993 | tmp |= (val & mask); |
994 | b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp); | 994 | b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp); |
995 | 995 | ||
996 | if (dev->dev->id.revision == 16) | 996 | if (dev->sdev->id.revision == 16) |
997 | b43_mac_enable(dev); | 997 | b43_mac_enable(dev); |
998 | 998 | ||
999 | return tmp; | 999 | return tmp; |
@@ -1168,7 +1168,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev) | |||
1168 | static void b43_nphy_gain_ctrl_workarounds(struct b43_wldev *dev) | 1168 | static void b43_nphy_gain_ctrl_workarounds(struct b43_wldev *dev) |
1169 | { | 1169 | { |
1170 | struct b43_phy_n *nphy = dev->phy.n; | 1170 | struct b43_phy_n *nphy = dev->phy.n; |
1171 | struct ssb_sprom *sprom = &(dev->dev->bus->sprom); | 1171 | struct ssb_sprom *sprom = &(dev->sdev->bus->sprom); |
1172 | 1172 | ||
1173 | /* PHY rev 0, 1, 2 */ | 1173 | /* PHY rev 0, 1, 2 */ |
1174 | u8 i, j; | 1174 | u8 i, j; |
@@ -1373,7 +1373,7 @@ static void b43_nphy_gain_ctrl_workarounds(struct b43_wldev *dev) | |||
1373 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Workarounds */ | 1373 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Workarounds */ |
1374 | static void b43_nphy_workarounds(struct b43_wldev *dev) | 1374 | static void b43_nphy_workarounds(struct b43_wldev *dev) |
1375 | { | 1375 | { |
1376 | struct ssb_bus *bus = dev->dev->bus; | 1376 | struct ssb_bus *bus = dev->sdev->bus; |
1377 | struct b43_phy *phy = &dev->phy; | 1377 | struct b43_phy *phy = &dev->phy; |
1378 | struct b43_phy_n *nphy = phy->n; | 1378 | struct b43_phy_n *nphy = phy->n; |
1379 | 1379 | ||
@@ -3586,7 +3586,7 @@ static void b43_nphy_set_rx_core_state(struct b43_wldev *dev, u8 mask) | |||
3586 | */ | 3586 | */ |
3587 | int b43_phy_initn(struct b43_wldev *dev) | 3587 | int b43_phy_initn(struct b43_wldev *dev) |
3588 | { | 3588 | { |
3589 | struct ssb_bus *bus = dev->dev->bus; | 3589 | struct ssb_bus *bus = dev->sdev->bus; |
3590 | struct b43_phy *phy = &dev->phy; | 3590 | struct b43_phy *phy = &dev->phy; |
3591 | struct b43_phy_n *nphy = phy->n; | 3591 | struct b43_phy_n *nphy = phy->n; |
3592 | u8 tx_pwr_state; | 3592 | u8 tx_pwr_state; |
@@ -3601,7 +3601,7 @@ int b43_phy_initn(struct b43_wldev *dev) | |||
3601 | if ((dev->phy.rev >= 3) && | 3601 | if ((dev->phy.rev >= 3) && |
3602 | (bus->sprom.boardflags_lo & B43_BFL_EXTLNA) && | 3602 | (bus->sprom.boardflags_lo & B43_BFL_EXTLNA) && |
3603 | (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) { | 3603 | (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) { |
3604 | chipco_set32(&dev->dev->bus->chipco, SSB_CHIPCO_CHIPCTL, 0x40); | 3604 | chipco_set32(&dev->sdev->bus->chipco, SSB_CHIPCO_CHIPCTL, 0x40); |
3605 | } | 3605 | } |
3606 | nphy->deaf_count = 0; | 3606 | nphy->deaf_count = 0; |
3607 | b43_nphy_tables_init(dev); | 3607 | b43_nphy_tables_init(dev); |
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c index aa12273ae716..af0596d0faef 100644 --- a/drivers/net/wireless/b43/pio.c +++ b/drivers/net/wireless/b43/pio.c | |||
@@ -111,7 +111,7 @@ static u16 index_to_pioqueue_base(struct b43_wldev *dev, | |||
111 | B43_MMIO_PIO11_BASE5, | 111 | B43_MMIO_PIO11_BASE5, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | if (dev->dev->id.revision >= 11) { | 114 | if (dev->sdev->id.revision >= 11) { |
115 | B43_WARN_ON(index >= ARRAY_SIZE(bases_rev11)); | 115 | B43_WARN_ON(index >= ARRAY_SIZE(bases_rev11)); |
116 | return bases_rev11[index]; | 116 | return bases_rev11[index]; |
117 | } | 117 | } |
@@ -121,14 +121,14 @@ static u16 index_to_pioqueue_base(struct b43_wldev *dev, | |||
121 | 121 | ||
122 | static u16 pio_txqueue_offset(struct b43_wldev *dev) | 122 | static u16 pio_txqueue_offset(struct b43_wldev *dev) |
123 | { | 123 | { |
124 | if (dev->dev->id.revision >= 11) | 124 | if (dev->sdev->id.revision >= 11) |
125 | return 0x18; | 125 | return 0x18; |
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | 128 | ||
129 | static u16 pio_rxqueue_offset(struct b43_wldev *dev) | 129 | static u16 pio_rxqueue_offset(struct b43_wldev *dev) |
130 | { | 130 | { |
131 | if (dev->dev->id.revision >= 11) | 131 | if (dev->sdev->id.revision >= 11) |
132 | return 0x38; | 132 | return 0x38; |
133 | return 8; | 133 | return 8; |
134 | } | 134 | } |
@@ -144,7 +144,7 @@ static struct b43_pio_txqueue *b43_setup_pioqueue_tx(struct b43_wldev *dev, | |||
144 | if (!q) | 144 | if (!q) |
145 | return NULL; | 145 | return NULL; |
146 | q->dev = dev; | 146 | q->dev = dev; |
147 | q->rev = dev->dev->id.revision; | 147 | q->rev = dev->sdev->id.revision; |
148 | q->mmio_base = index_to_pioqueue_base(dev, index) + | 148 | q->mmio_base = index_to_pioqueue_base(dev, index) + |
149 | pio_txqueue_offset(dev); | 149 | pio_txqueue_offset(dev); |
150 | q->index = index; | 150 | q->index = index; |
@@ -178,7 +178,7 @@ static struct b43_pio_rxqueue *b43_setup_pioqueue_rx(struct b43_wldev *dev, | |||
178 | if (!q) | 178 | if (!q) |
179 | return NULL; | 179 | return NULL; |
180 | q->dev = dev; | 180 | q->dev = dev; |
181 | q->rev = dev->dev->id.revision; | 181 | q->rev = dev->sdev->id.revision; |
182 | q->mmio_base = index_to_pioqueue_base(dev, index) + | 182 | q->mmio_base = index_to_pioqueue_base(dev, index) + |
183 | pio_rxqueue_offset(dev); | 183 | pio_rxqueue_offset(dev); |
184 | 184 | ||
@@ -339,7 +339,7 @@ static u16 tx_write_2byte_queue(struct b43_pio_txqueue *q, | |||
339 | ctl |= B43_PIO_TXCTL_WRITELO | B43_PIO_TXCTL_WRITEHI; | 339 | ctl |= B43_PIO_TXCTL_WRITELO | B43_PIO_TXCTL_WRITEHI; |
340 | b43_piotx_write16(q, B43_PIO_TXCTL, ctl); | 340 | b43_piotx_write16(q, B43_PIO_TXCTL, ctl); |
341 | 341 | ||
342 | ssb_block_write(dev->dev, data, (data_len & ~1), | 342 | ssb_block_write(dev->sdev, data, (data_len & ~1), |
343 | q->mmio_base + B43_PIO_TXDATA, | 343 | q->mmio_base + B43_PIO_TXDATA, |
344 | sizeof(u16)); | 344 | sizeof(u16)); |
345 | if (data_len & 1) { | 345 | if (data_len & 1) { |
@@ -351,7 +351,7 @@ static u16 tx_write_2byte_queue(struct b43_pio_txqueue *q, | |||
351 | b43_piotx_write16(q, B43_PIO_TXCTL, ctl); | 351 | b43_piotx_write16(q, B43_PIO_TXCTL, ctl); |
352 | tail[0] = data[data_len - 1]; | 352 | tail[0] = data[data_len - 1]; |
353 | tail[1] = 0; | 353 | tail[1] = 0; |
354 | ssb_block_write(dev->dev, tail, 2, | 354 | ssb_block_write(dev->sdev, tail, 2, |
355 | q->mmio_base + B43_PIO_TXDATA, | 355 | q->mmio_base + B43_PIO_TXDATA, |
356 | sizeof(u16)); | 356 | sizeof(u16)); |
357 | } | 357 | } |
@@ -393,7 +393,7 @@ static u32 tx_write_4byte_queue(struct b43_pio_txqueue *q, | |||
393 | B43_PIO8_TXCTL_16_23 | B43_PIO8_TXCTL_24_31; | 393 | B43_PIO8_TXCTL_16_23 | B43_PIO8_TXCTL_24_31; |
394 | b43_piotx_write32(q, B43_PIO8_TXCTL, ctl); | 394 | b43_piotx_write32(q, B43_PIO8_TXCTL, ctl); |
395 | 395 | ||
396 | ssb_block_write(dev->dev, data, (data_len & ~3), | 396 | ssb_block_write(dev->sdev, data, (data_len & ~3), |
397 | q->mmio_base + B43_PIO8_TXDATA, | 397 | q->mmio_base + B43_PIO8_TXDATA, |
398 | sizeof(u32)); | 398 | sizeof(u32)); |
399 | if (data_len & 3) { | 399 | if (data_len & 3) { |
@@ -421,7 +421,7 @@ static u32 tx_write_4byte_queue(struct b43_pio_txqueue *q, | |||
421 | break; | 421 | break; |
422 | } | 422 | } |
423 | b43_piotx_write32(q, B43_PIO8_TXCTL, ctl); | 423 | b43_piotx_write32(q, B43_PIO8_TXCTL, ctl); |
424 | ssb_block_write(dev->dev, tail, 4, | 424 | ssb_block_write(dev->sdev, tail, 4, |
425 | q->mmio_base + B43_PIO8_TXDATA, | 425 | q->mmio_base + B43_PIO8_TXDATA, |
426 | sizeof(u32)); | 426 | sizeof(u32)); |
427 | } | 427 | } |
@@ -657,11 +657,11 @@ data_ready: | |||
657 | 657 | ||
658 | /* Get the preamble (RX header) */ | 658 | /* Get the preamble (RX header) */ |
659 | if (q->rev >= 8) { | 659 | if (q->rev >= 8) { |
660 | ssb_block_read(dev->dev, rxhdr, sizeof(*rxhdr), | 660 | ssb_block_read(dev->sdev, rxhdr, sizeof(*rxhdr), |
661 | q->mmio_base + B43_PIO8_RXDATA, | 661 | q->mmio_base + B43_PIO8_RXDATA, |
662 | sizeof(u32)); | 662 | sizeof(u32)); |
663 | } else { | 663 | } else { |
664 | ssb_block_read(dev->dev, rxhdr, sizeof(*rxhdr), | 664 | ssb_block_read(dev->sdev, rxhdr, sizeof(*rxhdr), |
665 | q->mmio_base + B43_PIO_RXDATA, | 665 | q->mmio_base + B43_PIO_RXDATA, |
666 | sizeof(u16)); | 666 | sizeof(u16)); |
667 | } | 667 | } |
@@ -697,7 +697,7 @@ data_ready: | |||
697 | skb_reserve(skb, 2); | 697 | skb_reserve(skb, 2); |
698 | skb_put(skb, len + padding); | 698 | skb_put(skb, len + padding); |
699 | if (q->rev >= 8) { | 699 | if (q->rev >= 8) { |
700 | ssb_block_read(dev->dev, skb->data + padding, (len & ~3), | 700 | ssb_block_read(dev->sdev, skb->data + padding, (len & ~3), |
701 | q->mmio_base + B43_PIO8_RXDATA, | 701 | q->mmio_base + B43_PIO8_RXDATA, |
702 | sizeof(u32)); | 702 | sizeof(u32)); |
703 | if (len & 3) { | 703 | if (len & 3) { |
@@ -705,7 +705,7 @@ data_ready: | |||
705 | BUILD_BUG_ON(sizeof(wl->pio_tailspace) < 4); | 705 | BUILD_BUG_ON(sizeof(wl->pio_tailspace) < 4); |
706 | 706 | ||
707 | /* Read the last few bytes. */ | 707 | /* Read the last few bytes. */ |
708 | ssb_block_read(dev->dev, tail, 4, | 708 | ssb_block_read(dev->sdev, tail, 4, |
709 | q->mmio_base + B43_PIO8_RXDATA, | 709 | q->mmio_base + B43_PIO8_RXDATA, |
710 | sizeof(u32)); | 710 | sizeof(u32)); |
711 | switch (len & 3) { | 711 | switch (len & 3) { |
@@ -724,7 +724,7 @@ data_ready: | |||
724 | } | 724 | } |
725 | } | 725 | } |
726 | } else { | 726 | } else { |
727 | ssb_block_read(dev->dev, skb->data + padding, (len & ~1), | 727 | ssb_block_read(dev->sdev, skb->data + padding, (len & ~1), |
728 | q->mmio_base + B43_PIO_RXDATA, | 728 | q->mmio_base + B43_PIO_RXDATA, |
729 | sizeof(u16)); | 729 | sizeof(u16)); |
730 | if (len & 1) { | 730 | if (len & 1) { |
@@ -732,7 +732,7 @@ data_ready: | |||
732 | BUILD_BUG_ON(sizeof(wl->pio_tailspace) < 2); | 732 | BUILD_BUG_ON(sizeof(wl->pio_tailspace) < 2); |
733 | 733 | ||
734 | /* Read the last byte. */ | 734 | /* Read the last byte. */ |
735 | ssb_block_read(dev->dev, tail, 2, | 735 | ssb_block_read(dev->sdev, tail, 2, |
736 | q->mmio_base + B43_PIO_RXDATA, | 736 | q->mmio_base + B43_PIO_RXDATA, |
737 | sizeof(u16)); | 737 | sizeof(u16)); |
738 | skb->data[len + padding - 1] = tail[0]; | 738 | skb->data[len + padding - 1] = tail[0]; |
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index 86bc0a0f735c..a617efe38289 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
@@ -37,7 +37,7 @@ void b43_rfkill_poll(struct ieee80211_hw *hw) | |||
37 | { | 37 | { |
38 | struct b43_wl *wl = hw_to_b43_wl(hw); | 38 | struct b43_wl *wl = hw_to_b43_wl(hw); |
39 | struct b43_wldev *dev = wl->current_dev; | 39 | struct b43_wldev *dev = wl->current_dev; |
40 | struct ssb_bus *bus = dev->dev->bus; | 40 | struct ssb_bus *bus = dev->sdev->bus; |
41 | bool enabled; | 41 | bool enabled; |
42 | bool brought_up = false; | 42 | bool brought_up = false; |
43 | 43 | ||
@@ -47,7 +47,7 @@ void b43_rfkill_poll(struct ieee80211_hw *hw) | |||
47 | mutex_unlock(&wl->mutex); | 47 | mutex_unlock(&wl->mutex); |
48 | return; | 48 | return; |
49 | } | 49 | } |
50 | ssb_device_enable(dev->dev, 0); | 50 | ssb_device_enable(dev->sdev, 0); |
51 | brought_up = true; | 51 | brought_up = true; |
52 | } | 52 | } |
53 | 53 | ||
@@ -63,7 +63,7 @@ void b43_rfkill_poll(struct ieee80211_hw *hw) | |||
63 | } | 63 | } |
64 | 64 | ||
65 | if (brought_up) { | 65 | if (brought_up) { |
66 | ssb_device_disable(dev->dev, 0); | 66 | ssb_device_disable(dev->sdev, 0); |
67 | ssb_bus_may_powerdown(bus); | 67 | ssb_bus_may_powerdown(bus); |
68 | } | 68 | } |
69 | 69 | ||
diff --git a/drivers/net/wireless/b43/sdio.c b/drivers/net/wireless/b43/sdio.c index 09e2dfd7b175..808e25b79703 100644 --- a/drivers/net/wireless/b43/sdio.c +++ b/drivers/net/wireless/b43/sdio.c | |||
@@ -66,7 +66,7 @@ static void b43_sdio_interrupt_dispatcher(struct sdio_func *func) | |||
66 | int b43_sdio_request_irq(struct b43_wldev *dev, | 66 | int b43_sdio_request_irq(struct b43_wldev *dev, |
67 | void (*handler)(struct b43_wldev *dev)) | 67 | void (*handler)(struct b43_wldev *dev)) |
68 | { | 68 | { |
69 | struct ssb_bus *bus = dev->dev->bus; | 69 | struct ssb_bus *bus = dev->sdev->bus; |
70 | struct sdio_func *func = bus->host_sdio; | 70 | struct sdio_func *func = bus->host_sdio; |
71 | struct b43_sdio *sdio = sdio_get_drvdata(func); | 71 | struct b43_sdio *sdio = sdio_get_drvdata(func); |
72 | int err; | 72 | int err; |
@@ -82,7 +82,7 @@ int b43_sdio_request_irq(struct b43_wldev *dev, | |||
82 | 82 | ||
83 | void b43_sdio_free_irq(struct b43_wldev *dev) | 83 | void b43_sdio_free_irq(struct b43_wldev *dev) |
84 | { | 84 | { |
85 | struct ssb_bus *bus = dev->dev->bus; | 85 | struct ssb_bus *bus = dev->sdev->bus; |
86 | struct sdio_func *func = bus->host_sdio; | 86 | struct sdio_func *func = bus->host_sdio; |
87 | struct b43_sdio *sdio = sdio_get_drvdata(func); | 87 | struct b43_sdio *sdio = sdio_get_drvdata(func); |
88 | 88 | ||
diff --git a/drivers/net/wireless/b43/sysfs.c b/drivers/net/wireless/b43/sysfs.c index f1ae4e05a32c..57af619725c3 100644 --- a/drivers/net/wireless/b43/sysfs.c +++ b/drivers/net/wireless/b43/sysfs.c | |||
@@ -140,7 +140,7 @@ static DEVICE_ATTR(interference, 0644, | |||
140 | 140 | ||
141 | int b43_sysfs_register(struct b43_wldev *wldev) | 141 | int b43_sysfs_register(struct b43_wldev *wldev) |
142 | { | 142 | { |
143 | struct device *dev = wldev->dev->dev; | 143 | struct device *dev = wldev->sdev->dev; |
144 | 144 | ||
145 | B43_WARN_ON(b43_status(wldev) != B43_STAT_INITIALIZED); | 145 | B43_WARN_ON(b43_status(wldev) != B43_STAT_INITIALIZED); |
146 | 146 | ||
@@ -149,7 +149,7 @@ int b43_sysfs_register(struct b43_wldev *wldev) | |||
149 | 149 | ||
150 | void b43_sysfs_unregister(struct b43_wldev *wldev) | 150 | void b43_sysfs_unregister(struct b43_wldev *wldev) |
151 | { | 151 | { |
152 | struct device *dev = wldev->dev->dev; | 152 | struct device *dev = wldev->sdev->dev; |
153 | 153 | ||
154 | device_remove_file(dev, &dev_attr_interference); | 154 | device_remove_file(dev, &dev_attr_interference); |
155 | } | 155 | } |
diff --git a/drivers/net/wireless/b43/tables_lpphy.c b/drivers/net/wireless/b43/tables_lpphy.c index 61027ee84fb5..59df3c64af63 100644 --- a/drivers/net/wireless/b43/tables_lpphy.c +++ b/drivers/net/wireless/b43/tables_lpphy.c | |||
@@ -2304,7 +2304,7 @@ void lpphy_rev0_1_table_init(struct b43_wldev *dev) | |||
2304 | 2304 | ||
2305 | void lpphy_rev2plus_table_init(struct b43_wldev *dev) | 2305 | void lpphy_rev2plus_table_init(struct b43_wldev *dev) |
2306 | { | 2306 | { |
2307 | struct ssb_bus *bus = dev->dev->bus; | 2307 | struct ssb_bus *bus = dev->sdev->bus; |
2308 | int i; | 2308 | int i; |
2309 | 2309 | ||
2310 | B43_WARN_ON(dev->phy.rev < 2); | 2310 | B43_WARN_ON(dev->phy.rev < 2); |
@@ -2416,7 +2416,7 @@ void lpphy_write_gain_table_bulk(struct b43_wldev *dev, int offset, int count, | |||
2416 | 2416 | ||
2417 | void lpphy_init_tx_gain_table(struct b43_wldev *dev) | 2417 | void lpphy_init_tx_gain_table(struct b43_wldev *dev) |
2418 | { | 2418 | { |
2419 | struct ssb_bus *bus = dev->dev->bus; | 2419 | struct ssb_bus *bus = dev->sdev->bus; |
2420 | 2420 | ||
2421 | switch (dev->phy.rev) { | 2421 | switch (dev->phy.rev) { |
2422 | case 0: | 2422 | case 0: |
diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c index 9a335da65b42..8f4db448ec33 100644 --- a/drivers/net/wireless/b43/wa.c +++ b/drivers/net/wireless/b43/wa.c | |||
@@ -458,7 +458,7 @@ static void b43_wa_rssi_adc(struct b43_wldev *dev) | |||
458 | 458 | ||
459 | static void b43_wa_boards_a(struct b43_wldev *dev) | 459 | static void b43_wa_boards_a(struct b43_wldev *dev) |
460 | { | 460 | { |
461 | struct ssb_bus *bus = dev->dev->bus; | 461 | struct ssb_bus *bus = dev->sdev->bus; |
462 | 462 | ||
463 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_BCM && | 463 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_BCM && |
464 | bus->boardinfo.type == SSB_BOARD_BU4306 && | 464 | bus->boardinfo.type == SSB_BOARD_BU4306 && |
@@ -486,7 +486,7 @@ static void b43_wa_boards_a(struct b43_wldev *dev) | |||
486 | 486 | ||
487 | static void b43_wa_boards_g(struct b43_wldev *dev) | 487 | static void b43_wa_boards_g(struct b43_wldev *dev) |
488 | { | 488 | { |
489 | struct ssb_bus *bus = dev->dev->bus; | 489 | struct ssb_bus *bus = dev->sdev->bus; |
490 | struct b43_phy *phy = &dev->phy; | 490 | struct b43_phy *phy = &dev->phy; |
491 | 491 | ||
492 | if (bus->boardinfo.vendor != SSB_BOARDVENDOR_BCM || | 492 | if (bus->boardinfo.vendor != SSB_BOARDVENDOR_BCM || |
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index e5be381c17bc..c8f99aebe01f 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c | |||
@@ -547,7 +547,7 @@ static s8 b43_rssi_postprocess(struct b43_wldev *dev, | |||
547 | else | 547 | else |
548 | tmp -= 3; | 548 | tmp -= 3; |
549 | } else { | 549 | } else { |
550 | if (dev->dev->bus->sprom. | 550 | if (dev->sdev->bus->sprom. |
551 | boardflags_lo & B43_BFL_RSSI) { | 551 | boardflags_lo & B43_BFL_RSSI) { |
552 | if (in_rssi > 63) | 552 | if (in_rssi > 63) |
553 | in_rssi = 63; | 553 | in_rssi = 63; |