diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-06-19 06:17:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-22 16:09:43 -0400 |
commit | a6b7da5d2cf8b67c310aedf09e8e74bfb53423ba (patch) | |
tree | 048effe18ad621dcc99da712922d36a09ac9fbc1 /drivers/net | |
parent | 39ca554c96d25436b7c9acdd8f3b5fb9702049c6 (diff) |
b43: HT-PHY: switch radio to requested channel
Switching channel happens after specific SHM write to B43_SHM_SH_CHAN.
This is the way we found it in BCM4331 MMIO dumps. By comparing with
N-PHY code we noticed there is routing used for SYN and TX/RX.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.c | 39 | ||||
-rw-r--r-- | drivers/net/wireless/b43/radio_2059.h | 30 |
2 files changed, 68 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c index 12ad47f38dff..0b13f6f37c2f 100644 --- a/drivers/net/wireless/b43/phy_ht.c +++ b/drivers/net/wireless/b43/phy_ht.c | |||
@@ -30,6 +30,45 @@ | |||
30 | static void b43_radio_2059_channel_setup(struct b43_wldev *dev, | 30 | static void b43_radio_2059_channel_setup(struct b43_wldev *dev, |
31 | const struct b43_phy_ht_channeltab_e_radio2059 *e) | 31 | const struct b43_phy_ht_channeltab_e_radio2059 *e) |
32 | { | 32 | { |
33 | u8 i; | ||
34 | u16 routing; | ||
35 | |||
36 | b43_radio_write(dev, 0x16, e->radio_syn16); | ||
37 | b43_radio_write(dev, 0x17, e->radio_syn17); | ||
38 | b43_radio_write(dev, 0x22, e->radio_syn22); | ||
39 | b43_radio_write(dev, 0x25, e->radio_syn25); | ||
40 | b43_radio_write(dev, 0x27, e->radio_syn27); | ||
41 | b43_radio_write(dev, 0x28, e->radio_syn28); | ||
42 | b43_radio_write(dev, 0x29, e->radio_syn29); | ||
43 | b43_radio_write(dev, 0x2c, e->radio_syn2c); | ||
44 | b43_radio_write(dev, 0x2d, e->radio_syn2d); | ||
45 | b43_radio_write(dev, 0x37, e->radio_syn37); | ||
46 | b43_radio_write(dev, 0x41, e->radio_syn41); | ||
47 | b43_radio_write(dev, 0x43, e->radio_syn43); | ||
48 | b43_radio_write(dev, 0x47, e->radio_syn47); | ||
49 | b43_radio_write(dev, 0x4a, e->radio_syn4a); | ||
50 | b43_radio_write(dev, 0x58, e->radio_syn58); | ||
51 | b43_radio_write(dev, 0x5a, e->radio_syn5a); | ||
52 | b43_radio_write(dev, 0x6a, e->radio_syn6a); | ||
53 | b43_radio_write(dev, 0x6d, e->radio_syn6d); | ||
54 | b43_radio_write(dev, 0x6e, e->radio_syn6e); | ||
55 | b43_radio_write(dev, 0x92, e->radio_syn92); | ||
56 | b43_radio_write(dev, 0x98, e->radio_syn98); | ||
57 | |||
58 | for (i = 0; i < 2; i++) { | ||
59 | routing = i ? 0x800 : 0x400; | ||
60 | b43_radio_write(dev, routing | 0x4a, e->radio_rxtx4a); | ||
61 | b43_radio_write(dev, routing | 0x58, e->radio_rxtx58); | ||
62 | b43_radio_write(dev, routing | 0x5a, e->radio_rxtx5a); | ||
63 | b43_radio_write(dev, routing | 0x6a, e->radio_rxtx6a); | ||
64 | b43_radio_write(dev, routing | 0x6d, e->radio_rxtx6d); | ||
65 | b43_radio_write(dev, routing | 0x6e, e->radio_rxtx6e); | ||
66 | b43_radio_write(dev, routing | 0x92, e->radio_rxtx92); | ||
67 | b43_radio_write(dev, routing | 0x98, e->radio_rxtx98); | ||
68 | } | ||
69 | |||
70 | udelay(50); | ||
71 | |||
33 | /* TODO */ | 72 | /* TODO */ |
34 | } | 73 | } |
35 | 74 | ||
diff --git a/drivers/net/wireless/b43/radio_2059.h b/drivers/net/wireless/b43/radio_2059.h index 69eb46ee376f..c2874b145266 100644 --- a/drivers/net/wireless/b43/radio_2059.h +++ b/drivers/net/wireless/b43/radio_2059.h | |||
@@ -10,7 +10,35 @@ struct b43_phy_ht_channeltab_e_radio2059 { | |||
10 | /* The channel frequency in MHz */ | 10 | /* The channel frequency in MHz */ |
11 | u16 freq; | 11 | u16 freq; |
12 | /* Values for radio registers */ | 12 | /* Values for radio registers */ |
13 | /* TODO */ | 13 | u8 radio_syn16; |
14 | u8 radio_syn17; | ||
15 | u8 radio_syn22; | ||
16 | u8 radio_syn25; | ||
17 | u8 radio_syn27; | ||
18 | u8 radio_syn28; | ||
19 | u8 radio_syn29; | ||
20 | u8 radio_syn2c; | ||
21 | u8 radio_syn2d; | ||
22 | u8 radio_syn37; | ||
23 | u8 radio_syn41; | ||
24 | u8 radio_syn43; | ||
25 | u8 radio_syn47; | ||
26 | u8 radio_syn4a; | ||
27 | u8 radio_syn58; | ||
28 | u8 radio_syn5a; | ||
29 | u8 radio_syn6a; | ||
30 | u8 radio_syn6d; | ||
31 | u8 radio_syn6e; | ||
32 | u8 radio_syn92; | ||
33 | u8 radio_syn98; | ||
34 | u8 radio_rxtx4a; | ||
35 | u8 radio_rxtx58; | ||
36 | u8 radio_rxtx5a; | ||
37 | u8 radio_rxtx6a; | ||
38 | u8 radio_rxtx6d; | ||
39 | u8 radio_rxtx6e; | ||
40 | u8 radio_rxtx92; | ||
41 | u8 radio_rxtx98; | ||
14 | /* Values for PHY registers */ | 42 | /* Values for PHY registers */ |
15 | struct b43_phy_ht_channeltab_e_phy phy_regs; | 43 | struct b43_phy_ht_channeltab_e_phy phy_regs; |
16 | }; | 44 | }; |