aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_ht.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2013-03-16 18:40:01 -0400
committerRafał Miłecki <zajec5@gmail.com>2013-04-23 06:27:55 -0400
commit9a0bc41e1c85d2be2f3e7e7772319d58afe28f1b (patch)
tree91269d7b8f8dd29900a3870a6eee50cf8f4cf0b9 /drivers/net/wireless/b43/phy_ht.c
parentd6657db90a917595b5ed96669239d35a5f69db94 (diff)
b43: HT-PHY: tables: don't duplicate core-generic regs
Now when we know many radio regs at 0x000 are core-generic, I've noticed we duplicate some values in the tables. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
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);