diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-08-12 07:13:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-22 14:46:01 -0400 |
commit | 19240f36cf4c4ccc9a1b0a368d0fd59c9bbbfba6 (patch) | |
tree | abd318c0bac1cace7fcf4b2939f7fac73817707f /drivers | |
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')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.h | 4 |
2 files changed, 25 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) | |||
273 | 273 | ||
274 | static int b43_phy_ht_op_init(struct b43_wldev *dev) | 274 | static int b43_phy_ht_op_init(struct b43_wldev *dev) |
275 | { | 275 | { |
276 | u16 tmp; | ||
277 | |||
276 | b43_phy_ht_tables_init(dev); | 278 | b43_phy_ht_tables_init(dev); |
277 | 279 | ||
278 | /* TODO: PHY ops on regs 0x0be, 0x23f 0x240 0x241 */ | 280 | /* TODO: PHY ops on regs 0x0be, 0x23f 0x240 0x241 */ |
@@ -301,6 +303,25 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev) | |||
301 | 303 | ||
302 | b43_phy_write(dev, 0x0b9, 0x0072); | 304 | b43_phy_write(dev, 0x0b9, 0x0072); |
303 | 305 | ||
306 | /* TODO: Some ops here */ | ||
307 | |||
308 | /* Copy some tables entries */ | ||
309 | tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x144)); | ||
310 | b43_httab_write(dev, B43_HTTAB16(7, 0x14a), tmp); | ||
311 | tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x154)); | ||
312 | b43_httab_write(dev, B43_HTTAB16(7, 0x15a), tmp); | ||
313 | tmp = b43_httab_read(dev, B43_HTTAB16(7, 0x164)); | ||
314 | b43_httab_write(dev, B43_HTTAB16(7, 0x16a), tmp); | ||
315 | |||
316 | /* Reset CCA */ | ||
317 | b43_phy_force_clock(dev, true); | ||
318 | tmp = b43_phy_read(dev, B43_PHY_HT_BBCFG); | ||
319 | b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp | B43_PHY_HT_BBCFG_RSTCCA); | ||
320 | b43_phy_write(dev, B43_PHY_HT_BBCFG, tmp & ~B43_PHY_HT_BBCFG_RSTCCA); | ||
321 | b43_phy_force_clock(dev, false); | ||
322 | |||
323 | b43_mac_phy_clock_set(dev, true); | ||
324 | |||
304 | return 0; | 325 | return 0; |
305 | } | 326 | } |
306 | 327 | ||
diff --git a/drivers/net/wireless/b43/phy_ht.h b/drivers/net/wireless/b43/phy_ht.h index 7ad7affc8df0..f70af0caaa33 100644 --- a/drivers/net/wireless/b43/phy_ht.h +++ b/drivers/net/wireless/b43/phy_ht.h | |||
@@ -4,7 +4,11 @@ | |||
4 | #include "phy_common.h" | 4 | #include "phy_common.h" |
5 | 5 | ||
6 | 6 | ||
7 | #define B43_PHY_HT_BBCFG 0x001 /* BB config */ | ||
8 | #define B43_PHY_HT_BBCFG_RSTCCA 0x4000 /* Reset CCA */ | ||
9 | #define B43_PHY_HT_BBCFG_RSTRX 0x8000 /* Reset RX */ | ||
7 | #define B43_PHY_HT_BANDCTL 0x009 /* Band control */ | 10 | #define B43_PHY_HT_BANDCTL 0x009 /* Band control */ |
11 | #define B43_PHY_HT_BANDCTL_5GHZ 0x0001 /* Use the 5GHz band */ | ||
8 | #define B43_PHY_HT_TABLE_ADDR 0x072 /* Table address */ | 12 | #define B43_PHY_HT_TABLE_ADDR 0x072 /* Table address */ |
9 | #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */ | 13 | #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */ |
10 | #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */ | 14 | #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */ |