diff options
author | Gábor Stefanik <netrolller.3d@gmail.com> | 2009-08-13 10:51:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:33:08 -0400 |
commit | 2f19c287fecb958eb68b1c2199b4dd6e00ba4276 (patch) | |
tree | fc1a733586330c42a444ec3562340988ad6df1ae /drivers/net/wireless/b43/main.c | |
parent | 1758c0947605211ef953cc91d6bbdf847a21b822 (diff) |
b43: Update dummy transmission to match V4 specs
The V4 dummy transmission has two extra bools in its prototype,
so update all callers with the 2 bools.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 950beefbeaeb..f6d039e303f4 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -691,9 +691,9 @@ static void b43_synchronize_irq(struct b43_wldev *dev) | |||
691 | } | 691 | } |
692 | 692 | ||
693 | /* DummyTransmission function, as documented on | 693 | /* DummyTransmission function, as documented on |
694 | * http://bcm-specs.sipsolutions.net/DummyTransmission | 694 | * http://bcm-v4.sipsolutions.net/802.11/DummyTransmission |
695 | */ | 695 | */ |
696 | void b43_dummy_transmission(struct b43_wldev *dev) | 696 | void b43_dummy_transmission(struct b43_wldev *dev, bool ofdm, bool pa_on) |
697 | { | 697 | { |
698 | struct b43_wl *wl = dev->wl; | 698 | struct b43_wl *wl = dev->wl; |
699 | struct b43_phy *phy = &dev->phy; | 699 | struct b43_phy *phy = &dev->phy; |
@@ -707,19 +707,12 @@ void b43_dummy_transmission(struct b43_wldev *dev) | |||
707 | 0x00000000, | 707 | 0x00000000, |
708 | }; | 708 | }; |
709 | 709 | ||
710 | switch (phy->type) { | 710 | if (ofdm) { |
711 | case B43_PHYTYPE_A: | ||
712 | max_loop = 0x1E; | 711 | max_loop = 0x1E; |
713 | buffer[0] = 0x000201CC; | 712 | buffer[0] = 0x000201CC; |
714 | break; | 713 | } else { |
715 | case B43_PHYTYPE_B: | ||
716 | case B43_PHYTYPE_G: | ||
717 | max_loop = 0xFA; | 714 | max_loop = 0xFA; |
718 | buffer[0] = 0x000B846E; | 715 | buffer[0] = 0x000B846E; |
719 | break; | ||
720 | default: | ||
721 | B43_WARN_ON(1); | ||
722 | return; | ||
723 | } | 716 | } |
724 | 717 | ||
725 | spin_lock_irq(&wl->irq_lock); | 718 | spin_lock_irq(&wl->irq_lock); |
@@ -728,20 +721,35 @@ void b43_dummy_transmission(struct b43_wldev *dev) | |||
728 | for (i = 0; i < 5; i++) | 721 | for (i = 0; i < 5; i++) |
729 | b43_ram_write(dev, i * 4, buffer[i]); | 722 | b43_ram_write(dev, i * 4, buffer[i]); |
730 | 723 | ||
731 | /* Commit writes */ | ||
732 | b43_read32(dev, B43_MMIO_MACCTL); | ||
733 | |||
734 | b43_write16(dev, 0x0568, 0x0000); | 724 | b43_write16(dev, 0x0568, 0x0000); |
735 | b43_write16(dev, 0x07C0, 0x0000); | 725 | if (dev->dev->id.revision < 11) |
736 | value = ((phy->type == B43_PHYTYPE_A) ? 1 : 0); | 726 | b43_write16(dev, 0x07C0, 0x0000); |
727 | else | ||
728 | b43_write16(dev, 0x07C0, 0x0100); | ||
729 | value = (ofdm ? 0x41 : 0x40); | ||
737 | b43_write16(dev, 0x050C, value); | 730 | b43_write16(dev, 0x050C, value); |
731 | if ((phy->type == B43_PHYTYPE_N) || (phy->type == B43_PHYTYPE_LP)) | ||
732 | b43_write16(dev, 0x0514, 0x1A02); | ||
738 | b43_write16(dev, 0x0508, 0x0000); | 733 | b43_write16(dev, 0x0508, 0x0000); |
739 | b43_write16(dev, 0x050A, 0x0000); | 734 | b43_write16(dev, 0x050A, 0x0000); |
740 | b43_write16(dev, 0x054C, 0x0000); | 735 | b43_write16(dev, 0x054C, 0x0000); |
741 | b43_write16(dev, 0x056A, 0x0014); | 736 | b43_write16(dev, 0x056A, 0x0014); |
742 | b43_write16(dev, 0x0568, 0x0826); | 737 | b43_write16(dev, 0x0568, 0x0826); |
743 | b43_write16(dev, 0x0500, 0x0000); | 738 | b43_write16(dev, 0x0500, 0x0000); |
744 | b43_write16(dev, 0x0502, 0x0030); | 739 | if (!pa_on && (phy->type == B43_PHYTYPE_N)) { |
740 | //SPEC TODO | ||
741 | } | ||
742 | |||
743 | switch (phy->type) { | ||
744 | case B43_PHYTYPE_N: | ||
745 | b43_write16(dev, 0x0502, 0x00D0); | ||
746 | break; | ||
747 | case B43_PHYTYPE_LP: | ||
748 | b43_write16(dev, 0x0502, 0x0050); | ||
749 | break; | ||
750 | default: | ||
751 | b43_write16(dev, 0x0502, 0x0030); | ||
752 | } | ||
745 | 753 | ||
746 | if (phy->radio_ver == 0x2050 && phy->radio_rev <= 0x5) | 754 | if (phy->radio_ver == 0x2050 && phy->radio_rev <= 0x5) |
747 | b43_radio_write16(dev, 0x0051, 0x0017); | 755 | b43_radio_write16(dev, 0x0051, 0x0017); |