aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-11-30 16:33:14 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-02 15:16:44 -0500
commit99f6c2ef1e968c0dbdfa8c5b8f2869129b860d88 (patch)
tree450cbe8a948e4a79c91d2007cf3aa63c6e3375a9 /drivers
parent44b23b488d44e56d467764ecb661830e5b02b308 (diff)
b43: N-PHY: fix RSSI selection
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/b43/phy_n.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 85a7a60c54bf..1d0847624bb4 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1822,27 +1822,39 @@ static void b43_nphy_rev2_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
1822 (type + 1) << 4); 1822 (type + 1) << 4);
1823 } 1823 }
1824 1824
1825 /* TODO use some definitions */
1826 if (code == 0) { 1825 if (code == 0) {
1827 b43_phy_maskset(dev, B43_NPHY_AFECTL_OVER, 0xCFFF, 0); 1826 b43_phy_mask(dev, B43_NPHY_AFECTL_OVER, ~0x3000);
1828 if (type < 3) { 1827 if (type < 3) {
1829 b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 0xFEC7, 0); 1828 b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
1830 b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 0xEFDC, 0); 1829 ~(B43_NPHY_RFCTL_CMD_RXEN |
1831 b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 0xFFFE, 0); 1830 B43_NPHY_RFCTL_CMD_CORESEL));
1831 b43_phy_mask(dev, B43_NPHY_RFCTL_OVER,
1832 ~(0x1 << 12 |
1833 0x1 << 5 |
1834 0x1 << 1 |
1835 0x1));
1836 b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
1837 ~B43_NPHY_RFCTL_CMD_START);
1832 udelay(20); 1838 udelay(20);
1833 b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 0xFFFE, 0); 1839 b43_phy_mask(dev, B43_NPHY_RFCTL_OVER, ~0x1);
1834 } 1840 }
1835 } else { 1841 } else {
1836 b43_phy_maskset(dev, B43_NPHY_AFECTL_OVER, 0xCFFF, 1842 b43_phy_set(dev, B43_NPHY_AFECTL_OVER, 0x3000);
1837 0x3000);
1838 if (type < 3) { 1843 if (type < 3) {
1839 b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 1844 b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD,
1840 0xFEC7, 0x0180); 1845 ~(B43_NPHY_RFCTL_CMD_RXEN |
1841 b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 1846 B43_NPHY_RFCTL_CMD_CORESEL),
1842 0xEFDC, (code << 1 | 0x1021)); 1847 (B43_NPHY_RFCTL_CMD_RXEN |
1843 b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 0xFFFE, 0x1); 1848 code << B43_NPHY_RFCTL_CMD_CORESEL_SHIFT));
1849 b43_phy_set(dev, B43_NPHY_RFCTL_OVER,
1850 (0x1 << 12 |
1851 0x1 << 5 |
1852 0x1 << 1 |
1853 0x1));
1854 b43_phy_set(dev, B43_NPHY_RFCTL_CMD,
1855 B43_NPHY_RFCTL_CMD_START);
1844 udelay(20); 1856 udelay(20);
1845 b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 0xFFFE, 0); 1857 b43_phy_mask(dev, B43_NPHY_RFCTL_OVER, ~0x1);
1846 } 1858 }
1847 } 1859 }
1848} 1860}