aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/radio_2057.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-07-01 10:19:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-01 14:29:39 -0400
commite90cf1c7abf6b190f51f89e4f63f961defba38a9 (patch)
treea7f6f5e0eb9b10bac9900b8ce1e94ae0a8339a7d /drivers/net/wireless/b43/radio_2057.c
parentc1084e026b4fe73fcc54f82d6a6bd26d9372d583 (diff)
b43: N-PHY: fixes for radio 0x2057
Enable initialization and update calibration code to fix: b43-phy0 ERROR: Radio 0x2057 rcal timeout b43-phy0 debug: Radio 0x2057 rccal timeout b43-phy0 debug: Radio 0x2057 rccal timeout b43-phy0 ERROR: Radio 0x2057 rcal timeout 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/radio_2057.c')
-rw-r--r--drivers/net/wireless/b43/radio_2057.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/radio_2057.c b/drivers/net/wireless/b43/radio_2057.c
index d61d6830c5c7..5e49440d4125 100644
--- a/drivers/net/wireless/b43/radio_2057.c
+++ b/drivers/net/wireless/b43/radio_2057.c
@@ -26,7 +26,7 @@
26#include "radio_2057.h" 26#include "radio_2057.h"
27#include "phy_common.h" 27#include "phy_common.h"
28 28
29static u16 r2057_rev4_init[42][2] = { 29static u16 r2057_rev4_init[][2] = {
30 { 0x0E, 0x20 }, { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, 30 { 0x0E, 0x20 }, { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 },
31 { 0x35, 0x26 }, { 0x3C, 0xff }, { 0x3D, 0xff }, { 0x3E, 0xff }, 31 { 0x35, 0x26 }, { 0x3C, 0xff }, { 0x3D, 0xff }, { 0x3E, 0xff },
32 { 0x3F, 0xff }, { 0x62, 0x33 }, { 0x8A, 0xf0 }, { 0x8B, 0x10 }, 32 { 0x3F, 0xff }, { 0x62, 0x33 }, { 0x8A, 0xf0 }, { 0x8B, 0x10 },
@@ -40,7 +40,7 @@ static u16 r2057_rev4_init[42][2] = {
40 { 0x1AB, 0x00 }, { 0x1AC, 0x00 }, 40 { 0x1AB, 0x00 }, { 0x1AC, 0x00 },
41}; 41};
42 42
43static u16 r2057_rev5_init[44][2] = { 43static u16 r2057_rev5_init[][2] = {
44 { 0x00, 0x00 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x23, 0x6 }, 44 { 0x00, 0x00 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x23, 0x6 },
45 { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, 45 { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 },
46 { 0x59, 0x88 }, { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, 46 { 0x59, 0x88 }, { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f },
@@ -54,7 +54,7 @@ static u16 r2057_rev5_init[44][2] = {
54 { 0x1AC, 0x00 }, { 0x1B7, 0x0c }, { 0x1C1, 0x01 }, { 0x1C2, 0x80 }, 54 { 0x1AC, 0x00 }, { 0x1B7, 0x0c }, { 0x1C1, 0x01 }, { 0x1C2, 0x80 },
55}; 55};
56 56
57static u16 r2057_rev5a_init[45][2] = { 57static u16 r2057_rev5a_init[][2] = {
58 { 0x00, 0x15 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x23, 0x6 }, 58 { 0x00, 0x15 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x23, 0x6 },
59 { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, 59 { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 },
60 { 0x59, 0x88 }, { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, 60 { 0x59, 0x88 }, { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f },
@@ -69,7 +69,7 @@ static u16 r2057_rev5a_init[45][2] = {
69 { 0x1C2, 0x80 }, 69 { 0x1C2, 0x80 },
70}; 70};
71 71
72static u16 r2057_rev7_init[54][2] = { 72static u16 r2057_rev7_init[][2] = {
73 { 0x00, 0x00 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x31, 0x00 }, 73 { 0x00, 0x00 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x31, 0x00 },
74 { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, { 0x59, 0x88 }, 74 { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, { 0x59, 0x88 },
75 { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, { 0x64, 0x13 }, 75 { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, { 0x64, 0x13 },
@@ -86,7 +86,7 @@ static u16 r2057_rev7_init[54][2] = {
86 { 0x1B7, 0x05 }, { 0x1C2, 0xa0 }, 86 { 0x1B7, 0x05 }, { 0x1C2, 0xa0 },
87}; 87};
88 88
89static u16 r2057_rev8_init[54][2] = { 89static u16 r2057_rev8_init[][2] = {
90 { 0x00, 0x08 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x31, 0x00 }, 90 { 0x00, 0x08 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x31, 0x00 },
91 { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, { 0x59, 0x88 }, 91 { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, { 0x59, 0x88 },
92 { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, { 0x64, 0x0f }, 92 { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, { 0x64, 0x0f },
@@ -130,12 +130,10 @@ void r2057_upload_inittabs(struct b43_wldev *dev)
130 } 130 }
131 } 131 }
132 132
133 B43_WARN_ON(!table);
134
133 if (table) { 135 if (table) {
134 for (i = 0; i < 10; i++) { 136 for (i = 0; i < size; i++, table += 2)
135 pr_info("radio_write 0x%X ", *table); 137 b43_radio_write(dev, table[0], table[1]);
136 table++;
137 pr_info("0x%X\n", *table);
138 table++;
139 }
140 } 138 }
141} 139}