aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 6356fbc8aec1..971ec1b56b06 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -548,7 +548,7 @@ void b43_tsf_read(struct b43_wldev *dev, u64 *tsf)
548{ 548{
549 u32 low, high; 549 u32 low, high;
550 550
551 B43_WARN_ON(dev->sdev->id.revision < 3); 551 B43_WARN_ON(dev->dev->core_rev < 3);
552 552
553 /* The hardware guarantees us an atomic read, if we 553 /* The hardware guarantees us an atomic read, if we
554 * read the low register first. */ 554 * read the low register first. */
@@ -586,7 +586,7 @@ static void b43_tsf_write_locked(struct b43_wldev *dev, u64 tsf)
586{ 586{
587 u32 low, high; 587 u32 low, high;
588 588
589 B43_WARN_ON(dev->sdev->id.revision < 3); 589 B43_WARN_ON(dev->dev->core_rev < 3);
590 590
591 low = tsf; 591 low = tsf;
592 high = (tsf >> 32); 592 high = (tsf >> 32);
@@ -714,7 +714,7 @@ void b43_dummy_transmission(struct b43_wldev *dev, bool ofdm, bool pa_on)
714 b43_ram_write(dev, i * 4, buffer[i]); 714 b43_ram_write(dev, i * 4, buffer[i]);
715 715
716 b43_write16(dev, 0x0568, 0x0000); 716 b43_write16(dev, 0x0568, 0x0000);
717 if (dev->sdev->id.revision < 11) 717 if (dev->dev->core_rev < 11)
718 b43_write16(dev, 0x07C0, 0x0000); 718 b43_write16(dev, 0x07C0, 0x0000);
719 else 719 else
720 b43_write16(dev, 0x07C0, 0x0100); 720 b43_write16(dev, 0x07C0, 0x0100);
@@ -1132,7 +1132,7 @@ void b43_power_saving_ctl_bits(struct b43_wldev *dev, unsigned int ps_flags)
1132 b43_write32(dev, B43_MMIO_MACCTL, macctl); 1132 b43_write32(dev, B43_MMIO_MACCTL, macctl);
1133 /* Commit write */ 1133 /* Commit write */
1134 b43_read32(dev, B43_MMIO_MACCTL); 1134 b43_read32(dev, B43_MMIO_MACCTL);
1135 if (awake && dev->sdev->id.revision >= 5) { 1135 if (awake && dev->dev->core_rev >= 5) {
1136 /* Wait for the microcode to wake up. */ 1136 /* Wait for the microcode to wake up. */
1137 for (i = 0; i < 100; i++) { 1137 for (i = 0; i < 100; i++) {
1138 ucstat = b43_shm_read16(dev, B43_SHM_SHARED, 1138 ucstat = b43_shm_read16(dev, B43_SHM_SHARED,
@@ -1221,7 +1221,7 @@ static void drain_txstatus_queue(struct b43_wldev *dev)
1221{ 1221{
1222 u32 dummy; 1222 u32 dummy;
1223 1223
1224 if (dev->sdev->id.revision < 5) 1224 if (dev->dev->core_rev < 5)
1225 return; 1225 return;
1226 /* Read all entries from the microcode TXstatus FIFO 1226 /* Read all entries from the microcode TXstatus FIFO
1227 * and throw them away. 1227 * and throw them away.
@@ -1689,7 +1689,7 @@ static void b43_update_templates(struct b43_wl *wl)
1689static void b43_set_beacon_int(struct b43_wldev *dev, u16 beacon_int) 1689static void b43_set_beacon_int(struct b43_wldev *dev, u16 beacon_int)
1690{ 1690{
1691 b43_time_lock(dev); 1691 b43_time_lock(dev);
1692 if (dev->sdev->id.revision >= 3) { 1692 if (dev->dev->core_rev >= 3) {
1693 b43_write32(dev, B43_MMIO_TSF_CFP_REP, (beacon_int << 16)); 1693 b43_write32(dev, B43_MMIO_TSF_CFP_REP, (beacon_int << 16));
1694 b43_write32(dev, B43_MMIO_TSF_CFP_START, (beacon_int << 10)); 1694 b43_write32(dev, B43_MMIO_TSF_CFP_START, (beacon_int << 10));
1695 } else { 1695 } else {
@@ -2113,7 +2113,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx)
2113{ 2113{
2114 struct b43_wldev *dev = ctx->dev; 2114 struct b43_wldev *dev = ctx->dev;
2115 struct b43_firmware *fw = &ctx->dev->fw; 2115 struct b43_firmware *fw = &ctx->dev->fw;
2116 const u8 rev = ctx->dev->sdev->id.revision; 2116 const u8 rev = ctx->dev->dev->core_rev;
2117 const char *filename; 2117 const char *filename;
2118 u32 tmshigh; 2118 u32 tmshigh;
2119 int err; 2119 int err;
@@ -2448,7 +2448,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
2448 2448
2449 snprintf(wiphy->fw_version, sizeof(wiphy->fw_version), "%u.%u", 2449 snprintf(wiphy->fw_version, sizeof(wiphy->fw_version), "%u.%u",
2450 dev->fw.rev, dev->fw.patch); 2450 dev->fw.rev, dev->fw.patch);
2451 wiphy->hw_version = dev->sdev->id.coreid; 2451 wiphy->hw_version = dev->dev->core_id;
2452 2452
2453 if (b43_is_old_txhdr_format(dev)) { 2453 if (b43_is_old_txhdr_format(dev)) {
2454 /* We're over the deadline, but we keep support for old fw 2454 /* We're over the deadline, but we keep support for old fw
@@ -2606,7 +2606,7 @@ static int b43_gpio_init(struct b43_wldev *dev)
2606 mask |= 0x0200; 2606 mask |= 0x0200;
2607 set |= 0x0200; 2607 set |= 0x0200;
2608 } 2608 }
2609 if (dev->sdev->id.revision >= 2) 2609 if (dev->dev->core_rev >= 2)
2610 mask |= 0x0010; /* FIXME: This is redundant. */ 2610 mask |= 0x0010; /* FIXME: This is redundant. */
2611 2611
2612 gpiodev = b43_ssb_gpio_dev(dev); 2612 gpiodev = b43_ssb_gpio_dev(dev);
@@ -2741,7 +2741,7 @@ static void b43_adjust_opmode(struct b43_wldev *dev)
2741 /* Workaround: On old hardware the HW-MAC-address-filter 2741 /* Workaround: On old hardware the HW-MAC-address-filter
2742 * doesn't work properly, so always run promisc in filter 2742 * doesn't work properly, so always run promisc in filter
2743 * it in software. */ 2743 * it in software. */
2744 if (dev->sdev->id.revision <= 4) 2744 if (dev->dev->core_rev <= 4)
2745 ctl |= B43_MACCTL_PROMISC; 2745 ctl |= B43_MACCTL_PROMISC;
2746 2746
2747 b43_write32(dev, B43_MMIO_MACCTL, ctl); 2747 b43_write32(dev, B43_MMIO_MACCTL, ctl);
@@ -2907,7 +2907,7 @@ static int b43_chip_init(struct b43_wldev *dev)
2907 b43_write16(dev, 0x005E, value16); 2907 b43_write16(dev, 0x005E, value16);
2908 } 2908 }
2909 b43_write32(dev, 0x0100, 0x01000000); 2909 b43_write32(dev, 0x0100, 0x01000000);
2910 if (dev->sdev->id.revision < 5) 2910 if (dev->dev->core_rev < 5)
2911 b43_write32(dev, 0x010C, 0x01000000); 2911 b43_write32(dev, 0x010C, 0x01000000);
2912 2912
2913 b43_write32(dev, B43_MMIO_MACCTL, b43_read32(dev, B43_MMIO_MACCTL) 2913 b43_write32(dev, B43_MMIO_MACCTL, b43_read32(dev, B43_MMIO_MACCTL)
@@ -2922,7 +2922,7 @@ static int b43_chip_init(struct b43_wldev *dev)
2922 /* Initially set the wireless operation mode. */ 2922 /* Initially set the wireless operation mode. */
2923 b43_adjust_opmode(dev); 2923 b43_adjust_opmode(dev);
2924 2924
2925 if (dev->sdev->id.revision < 3) { 2925 if (dev->dev->core_rev < 3) {
2926 b43_write16(dev, 0x060E, 0x0000); 2926 b43_write16(dev, 0x060E, 0x0000);
2927 b43_write16(dev, 0x0610, 0x8000); 2927 b43_write16(dev, 0x0610, 0x8000);
2928 b43_write16(dev, 0x0604, 0x0000); 2928 b43_write16(dev, 0x0604, 0x0000);
@@ -3105,7 +3105,7 @@ static int b43_validate_chipaccess(struct b43_wldev *dev)
3105 b43_shm_write32(dev, B43_SHM_SHARED, 0, backup0); 3105 b43_shm_write32(dev, B43_SHM_SHARED, 0, backup0);
3106 b43_shm_write32(dev, B43_SHM_SHARED, 4, backup4); 3106 b43_shm_write32(dev, B43_SHM_SHARED, 4, backup4);
3107 3107
3108 if ((dev->sdev->id.revision >= 3) && (dev->sdev->id.revision <= 10)) { 3108 if ((dev->dev->core_rev >= 3) && (dev->dev->core_rev <= 10)) {
3109 /* The 32bit register shadows the two 16bit registers 3109 /* The 32bit register shadows the two 16bit registers
3110 * with update sideeffects. Validate this. */ 3110 * with update sideeffects. Validate this. */
3111 b43_write16(dev, B43_MMIO_TSF_CFP_START, 0xAAAA); 3111 b43_write16(dev, B43_MMIO_TSF_CFP_START, 0xAAAA);
@@ -4352,7 +4352,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
4352 if (err) 4352 if (err)
4353 goto err_busdown; 4353 goto err_busdown;
4354 b43_shm_write16(dev, B43_SHM_SHARED, 4354 b43_shm_write16(dev, B43_SHM_SHARED,
4355 B43_SHM_SH_WLCOREREV, dev->sdev->id.revision); 4355 B43_SHM_SH_WLCOREREV, dev->dev->core_rev);
4356 hf = b43_hf_read(dev); 4356 hf = b43_hf_read(dev);
4357 if (phy->type == B43_PHYTYPE_G) { 4357 if (phy->type == B43_PHYTYPE_G) {
4358 hf |= B43_HF_SYMW; 4358 hf |= B43_HF_SYMW;
@@ -4756,7 +4756,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
4756 goto out; 4756 goto out;
4757 } 4757 }
4758 /* Get the PHY type. */ 4758 /* Get the PHY type. */
4759 if (dev->sdev->id.revision >= 5) { 4759 if (dev->dev->core_rev >= 5) {
4760 u32 tmshigh; 4760 u32 tmshigh;
4761 4761
4762 tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH); 4762 tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH);