aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-02-27 07:03:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-09 15:06:50 -0500
commit8987a9e98fbc6a8b74c0dfc96a69d5e8c200492a (patch)
tree53ae9780911bb41017c49ebd89c852dddf7af05a /drivers/net/wireless
parent9734485c8d2064f39ff77acf615e87da0766ce76 (diff)
b43: N-PHY: initialize super switch
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/phy_n.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 795bb1e3345d..2d8eda145cb8 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -646,6 +646,41 @@ static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *clip_st)
646 clip_st[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES); 646 clip_st[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES);
647} 647}
648 648
649/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SuperSwitchInit */
650static void b43_nphy_superswitch_init(struct b43_wldev *dev, bool init)
651{
652 if (dev->phy.rev >= 3) {
653 if (!init)
654 return;
655 if (0 /* FIXME */) {
656 b43_ntab_write(dev, B43_NTAB16(9, 2), 0x211);
657 b43_ntab_write(dev, B43_NTAB16(9, 3), 0x222);
658 b43_ntab_write(dev, B43_NTAB16(9, 8), 0x144);
659 b43_ntab_write(dev, B43_NTAB16(9, 12), 0x188);
660 }
661 } else {
662 b43_phy_write(dev, B43_NPHY_GPIO_LOOEN, 0);
663 b43_phy_write(dev, B43_NPHY_GPIO_HIOEN, 0);
664
665 ssb_chipco_gpio_control(&dev->dev->bus->chipco, 0xFC00,
666 0xFC00);
667 b43_write32(dev, B43_MMIO_MACCTL,
668 b43_read32(dev, B43_MMIO_MACCTL) &
669 ~B43_MACCTL_GPOUTSMSK);
670 b43_write16(dev, B43_MMIO_GPIO_MASK,
671 b43_read16(dev, B43_MMIO_GPIO_MASK) | 0xFC00);
672 b43_write16(dev, B43_MMIO_GPIO_CONTROL,
673 b43_read16(dev, B43_MMIO_GPIO_CONTROL) & ~0xFC00);
674
675 if (init) {
676 b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_LO1, 0x2D8);
677 b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_UP1, 0x301);
678 b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_LO2, 0x2D8);
679 b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_UP2, 0x301);
680 }
681 }
682}
683
649/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/classifier */ 684/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/classifier */
650static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val) 685static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val)
651{ 686{
@@ -3116,7 +3151,7 @@ int b43_phy_initn(struct b43_wldev *dev)
3116 target = b43_nphy_get_tx_gains(dev); 3151 target = b43_nphy_get_tx_gains(dev);
3117 3152
3118 if (nphy->antsel_type == 2) 3153 if (nphy->antsel_type == 2)
3119 ;/*TODO NPHY Superswitch Init with argument 1*/ 3154 b43_nphy_superswitch_init(dev, true);
3120 if (nphy->perical != 2) { 3155 if (nphy->perical != 2) {
3121 b43_nphy_rssi_cal(dev); 3156 b43_nphy_rssi_cal(dev);
3122 if (phy->rev >= 3) { 3157 if (phy->rev >= 3) {