aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_ht.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/phy_ht.c')
-rw-r--r--drivers/net/wireless/b43/phy_ht.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c
index d40e799b8dbc..3d0bddb64b3d 100644
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -37,8 +37,9 @@
37static void b43_radio_2059_channel_setup(struct b43_wldev *dev, 37static void b43_radio_2059_channel_setup(struct b43_wldev *dev,
38 const struct b43_phy_ht_channeltab_e_radio2059 *e) 38 const struct b43_phy_ht_channeltab_e_radio2059 *e)
39{ 39{
40 u8 i; 40 static const u16 routing[] = { R2059_C1, R2059_C2, R2059_C3, };
41 u16 routing; 41 u16 r;
42 int core;
42 43
43 b43_radio_write(dev, 0x16, e->radio_syn16); 44 b43_radio_write(dev, 0x16, e->radio_syn16);
44 b43_radio_write(dev, 0x17, e->radio_syn17); 45 b43_radio_write(dev, 0x17, e->radio_syn17);
@@ -53,25 +54,17 @@ static void b43_radio_2059_channel_setup(struct b43_wldev *dev,
53 b43_radio_write(dev, 0x41, e->radio_syn41); 54 b43_radio_write(dev, 0x41, e->radio_syn41);
54 b43_radio_write(dev, 0x43, e->radio_syn43); 55 b43_radio_write(dev, 0x43, e->radio_syn43);
55 b43_radio_write(dev, 0x47, e->radio_syn47); 56 b43_radio_write(dev, 0x47, e->radio_syn47);
56 b43_radio_write(dev, 0x4a, e->radio_syn4a); 57
57 b43_radio_write(dev, 0x58, e->radio_syn58); 58 for (core = 0; core < 3; core++) {
58 b43_radio_write(dev, 0x5a, e->radio_syn5a); 59 r = routing[core];
59 b43_radio_write(dev, 0x6a, e->radio_syn6a); 60 b43_radio_write(dev, r | 0x4a, e->radio_rxtx4a);
60 b43_radio_write(dev, 0x6d, e->radio_syn6d); 61 b43_radio_write(dev, r | 0x58, e->radio_rxtx58);
61 b43_radio_write(dev, 0x6e, e->radio_syn6e); 62 b43_radio_write(dev, r | 0x5a, e->radio_rxtx5a);
62 b43_radio_write(dev, 0x92, e->radio_syn92); 63 b43_radio_write(dev, r | 0x6a, e->radio_rxtx6a);
63 b43_radio_write(dev, 0x98, e->radio_syn98); 64 b43_radio_write(dev, r | 0x6d, e->radio_rxtx6d);
64 65 b43_radio_write(dev, r | 0x6e, e->radio_rxtx6e);
65 for (i = 0; i < 2; i++) { 66 b43_radio_write(dev, r | 0x92, e->radio_rxtx92);
66 routing = i ? R2059_C3 : R2059_C2; 67 b43_radio_write(dev, r | 0x98, e->radio_rxtx98);
67 b43_radio_write(dev, routing | 0x4a, e->radio_rxtx4a);
68 b43_radio_write(dev, routing | 0x58, e->radio_rxtx58);
69 b43_radio_write(dev, routing | 0x5a, e->radio_rxtx5a);
70 b43_radio_write(dev, routing | 0x6a, e->radio_rxtx6a);
71 b43_radio_write(dev, routing | 0x6d, e->radio_rxtx6d);
72 b43_radio_write(dev, routing | 0x6e, e->radio_rxtx6e);
73 b43_radio_write(dev, routing | 0x92, e->radio_rxtx92);
74 b43_radio_write(dev, routing | 0x98, e->radio_rxtx98);
75 } 68 }
76 69
77 udelay(50); 70 udelay(50);