diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-08-12 13:13:46 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-22 14:46:01 -0400 |
commit | 19240f36cf4c4ccc9a1b0a368d0fd59c9bbbfba6 (patch) | |
tree | abd318c0bac1cace7fcf4b2939f7fac73817707f /drivers/net/wireless/b43/phy_ht.c | |
parent | f457f1842d3ad0f24cc0b181e60b6c59ed1d90ba (diff) |
b43: HT-PHY: init: copy tables and reset CCA
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_ht.c')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c index 93ee0e4e9b9a..55cf0f2a2ee4 100644 --- a/drivers/net/wireless/b43/phy_ht.c +++ b/drivers/net/wireless/b43/phy_ht.c @@ -273,6 +273,8 @@ static void b43_phy_ht_op_prepare_structs(struct b43_wldev *dev) static int b43_phy_ht_op_init(struct b43_wldev *dev) { + u16 tmp; + b43_phy_ht_tables_init(dev); /* TODO: PHY ops on regs 0x0be, 0x23f 0x240 0x241 */ @@ -301,6 +303,25 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev) b43_phy_write(dev, 0x0b9, 0x0072); + /* TODO: Some ops here */ + + /* Copy some tables entries */ + tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x144)); + b43_httab_write(dev, B43_HTTAB16(7, 0x14a), tmp); + tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x154)); + b43_httab_write(dev, B43_HTTAB16(7, 0x15a), tmp); + tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x164)); + b43_httab_write(dev, B43_HTTAB16(7, 0x16a), tmp); + + /* Reset CCA */ + b43_phy_force_clock(dev, true); + tmp = b43_phy_read(dev, B43_PHY_HT_BBCFG); + b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp | B43_PHY_HT_BBCFG_RSTCCA); + b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp & ~B43_PHY_HT_BBCFG_RSTCCA); + b43_phy_force_clock(dev, false); + + b43_mac_phy_clock_set(dev, true); + return 0; } |