提交 99b82c41 编写于 作者: R Rafał Miłecki 提交者: John W. Linville

b43: N-PHY: split RSSI selection into two per-PHY-revision functions

Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 09d989d1
......@@ -1316,14 +1316,10 @@ static void b43_nphy_scale_offset_rssi(struct b43_wldev *dev, u16 scale,
b43_phy_write(dev, B43_NPHY_RSSIMC_1Q_TSSI, tmp);
}
/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSISel */
static void b43_nphy_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
static void b43_nphy_rev2_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
{
u16 val;
if (dev->phy.rev >= 3) {
/* TODO */
} else {
if (type < 3)
val = 0;
else if (type == 6)
......@@ -1348,15 +1344,11 @@ static void b43_nphy_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
if (code == 0) {
b43_phy_maskset(dev, B43_NPHY_AFECTL_OVER, 0xCFFF, 0);
if (type < 3) {
b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD,
0xFEC7, 0);
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER,
0xEFDC, 0);
b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD,
0xFFFE, 0);
b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 0xFEC7, 0);
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 0xEFDC, 0);
b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 0xFFFE, 0);
udelay(20);
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER,
0xFFFE, 0);
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 0xFFFE, 0);
}
} else {
b43_phy_maskset(dev, B43_NPHY_AFECTL_OVER, 0xCFFF,
......@@ -1366,16 +1358,27 @@ static void b43_nphy_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
0xFEC7, 0x0180);
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER,
0xEFDC, (code << 1 | 0x1021));
b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD,
0xFFFE, 0x0001);
b43_phy_maskset(dev, B43_NPHY_RFCTL_CMD, 0xFFFE, 0x1);
udelay(20);
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER,
0xFFFE, 0);
}
b43_phy_maskset(dev, B43_NPHY_RFCTL_OVER, 0xFFFE, 0);
}
}
}
static void b43_nphy_rev3_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
{
/* TODO */
}
/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSISel */
static void b43_nphy_rssi_select(struct b43_wldev *dev, u8 code, u8 type)
{
if (dev->phy.rev >= 3)
b43_nphy_rev3_rssi_select(dev, code, type);
else
b43_nphy_rev2_rssi_select(dev, code, type);
}
/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SetRssi2055Vcm */
static void b43_nphy_set_rssi_2055_vcm(struct b43_wldev *dev, u8 type, u8 *buf)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册