summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-08-13 01:41:12 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-08-22 14:46:01 -0400
commita4042bb0932832328650fe9fb93d9afcb6699a04 (patch)
treef0d73302ee0572f36e6804bc3c1bee963e9e6c15 /drivers
parent357e24d2d07a2bb5bf706026d1ccf508c56b9b3e (diff)
b43: HT-PHY: init: add some AFE (Analog Frontend) operation
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_ht.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c
index 651938e5bffc..8a92d6e2d85b 100644
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -169,6 +169,28 @@ static void b43_phy_ht_zero_extg(struct b43_wldev *dev)
b43_phy_write(dev, B43_PHY_EXTG(base[i] + 0xc), 0);
}
+/* Some unknown AFE (Analog Frondned) op */
+static void b43_phy_ht_afe_unk1(struct b43_wldev *dev)
+{
+ u8 i;
+
+ const u16 ctl_regs[3][2] = {
+ { B43_PHY_HT_AFE_CTL1, B43_PHY_HT_AFE_CTL2 },
+ { B43_PHY_HT_AFE_CTL3, B43_PHY_HT_AFE_CTL4 },
+ { B43_PHY_HT_AFE_CTL5, B43_PHY_HT_AFE_CTL6},
+ };
+
+ for (i = 0; i < 3; i++) {
+ /* TODO: verify masks&sets */
+ b43_phy_set(dev, ctl_regs[i][1], 0x4);
+ b43_phy_set(dev, ctl_regs[i][0], 0x4);
+ b43_phy_mask(dev, ctl_regs[i][1], ~0x1);
+ b43_phy_set(dev, ctl_regs[i][0], 0x1);
+ b43_httab_write(dev, B43_HTTAB16(8, 5 + (i * 0x10)), 0);
+ b43_phy_mask(dev, ctl_regs[i][0], ~0x4);
+ }
+}
+
static void b43_phy_ht_bphy_init(struct b43_wldev *dev)
{
unsigned int i;
@@ -332,6 +354,10 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev)
/* TODO: Some ops here */
+ b43_phy_ht_afe_unk1(dev);
+
+ /* TODO: Some ops here */
+
b43_phy_maskset(dev, 0x0280, 0xff00, 0x3e);
b43_phy_maskset(dev, 0x0283, 0xff00, 0x3e);
b43_phy_maskset(dev, B43_PHY_OFDM(0x0141), 0xff00, 0x46);