diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-07-01 13:22:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-07-10 14:14:56 -0400 |
commit | 4418583cbf6fcdb715fcdc3719393cfb64b73e97 (patch) | |
tree | 48361f94b8ebb7d1c2ccee0dd12b834f1c737375 /drivers/net | |
parent | 86d95c214357df0e27dc6af493b62a1073e9d6b2 (diff) |
[PATCH] zd1211rw: Detect more AL2230S radios
Zen Kato has a device which reports the 0xa RF type. The vendor driver
treats this as AL2230S, the same as devices with the AL2230S bit in the POD.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf_al2230.c | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_rf.c b/drivers/net/wireless/zd1211rw/zd_rf.c index 7407409b60b1..abe5d38f7f4d 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.c +++ b/drivers/net/wireless/zd1211rw/zd_rf.c | |||
@@ -34,7 +34,7 @@ static const char * const rfs[] = { | |||
34 | [AL2210_RF] = "AL2210_RF", | 34 | [AL2210_RF] = "AL2210_RF", |
35 | [MAXIM_NEW_RF] = "MAXIM_NEW_RF", | 35 | [MAXIM_NEW_RF] = "MAXIM_NEW_RF", |
36 | [UW2453_RF] = "UW2453_RF", | 36 | [UW2453_RF] = "UW2453_RF", |
37 | [UNKNOWN_A_RF] = "UNKNOWN_A_RF", | 37 | [AL2230S_RF] = "AL2230S_RF", |
38 | [RALINK_RF] = "RALINK_RF", | 38 | [RALINK_RF] = "RALINK_RF", |
39 | [INTERSIL_RF] = "INTERSIL_RF", | 39 | [INTERSIL_RF] = "INTERSIL_RF", |
40 | [RF2959_RF] = "RF2959_RF", | 40 | [RF2959_RF] = "RF2959_RF", |
@@ -77,6 +77,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type) | |||
77 | r = zd_rf_init_rf2959(rf); | 77 | r = zd_rf_init_rf2959(rf); |
78 | break; | 78 | break; |
79 | case AL2230_RF: | 79 | case AL2230_RF: |
80 | case AL2230S_RF: | ||
80 | r = zd_rf_init_al2230(rf); | 81 | r = zd_rf_init_al2230(rf); |
81 | break; | 82 | break; |
82 | case AL7230B_RF: | 83 | case AL7230B_RF: |
diff --git a/drivers/net/wireless/zd1211rw/zd_rf.h b/drivers/net/wireless/zd1211rw/zd_rf.h index c6dfd8227f6e..30502f26b71c 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.h +++ b/drivers/net/wireless/zd1211rw/zd_rf.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define AL2210_RF 0x7 | 26 | #define AL2210_RF 0x7 |
27 | #define MAXIM_NEW_RF 0x8 | 27 | #define MAXIM_NEW_RF 0x8 |
28 | #define UW2453_RF 0x9 | 28 | #define UW2453_RF 0x9 |
29 | #define UNKNOWN_A_RF 0xa | 29 | #define AL2230S_RF 0xa |
30 | #define RALINK_RF 0xb | 30 | #define RALINK_RF 0xb |
31 | #define INTERSIL_RF 0xc | 31 | #define INTERSIL_RF 0xc |
32 | #define RF2959_RF 0xd | 32 | #define RF2959_RF 0xd |
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_al2230.c b/drivers/net/wireless/zd1211rw/zd_rf_al2230.c index e7a4ecf7b6e2..be9259eea088 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_al2230.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_al2230.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include "zd_usb.h" | 21 | #include "zd_usb.h" |
22 | #include "zd_chip.h" | 22 | #include "zd_chip.h" |
23 | 23 | ||
24 | #define IS_AL2230S(chip) ((chip)->al2230s_bit || (chip)->rf.type == AL2230S_RF) | ||
25 | |||
24 | static const u32 zd1211_al2230_table[][3] = { | 26 | static const u32 zd1211_al2230_table[][3] = { |
25 | RF_CHANNEL( 1) = { 0x03f790, 0x033331, 0x00000d, }, | 27 | RF_CHANNEL( 1) = { 0x03f790, 0x033331, 0x00000d, }, |
26 | RF_CHANNEL( 2) = { 0x03f790, 0x0b3331, 0x00000d, }, | 28 | RF_CHANNEL( 2) = { 0x03f790, 0x0b3331, 0x00000d, }, |
@@ -176,7 +178,7 @@ static int zd1211_al2230_init_hw(struct zd_rf *rf) | |||
176 | if (r) | 178 | if (r) |
177 | return r; | 179 | return r; |
178 | 180 | ||
179 | if (chip->al2230s_bit) { | 181 | if (IS_AL2230S(chip)) { |
180 | r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s, | 182 | r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s, |
181 | ARRAY_SIZE(ioreqs_init_al2230s)); | 183 | ARRAY_SIZE(ioreqs_init_al2230s)); |
182 | if (r) | 184 | if (r) |
@@ -188,7 +190,7 @@ static int zd1211_al2230_init_hw(struct zd_rf *rf) | |||
188 | return r; | 190 | return r; |
189 | 191 | ||
190 | /* improve band edge for AL2230S */ | 192 | /* improve band edge for AL2230S */ |
191 | if (chip->al2230s_bit) | 193 | if (IS_AL2230S(chip)) |
192 | r = zd_rfwrite_locked(chip, 0x000824, RF_RV_BITS); | 194 | r = zd_rfwrite_locked(chip, 0x000824, RF_RV_BITS); |
193 | else | 195 | else |
194 | r = zd_rfwrite_locked(chip, 0x0005a4, RF_RV_BITS); | 196 | r = zd_rfwrite_locked(chip, 0x0005a4, RF_RV_BITS); |
@@ -314,7 +316,7 @@ static int zd1211b_al2230_init_hw(struct zd_rf *rf) | |||
314 | if (r) | 316 | if (r) |
315 | return r; | 317 | return r; |
316 | 318 | ||
317 | if (chip->al2230s_bit) { | 319 | if (IS_AL2230S(chip)) { |
318 | r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s, | 320 | r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s, |
319 | ARRAY_SIZE(ioreqs_init_al2230s)); | 321 | ARRAY_SIZE(ioreqs_init_al2230s)); |
320 | if (r) | 322 | if (r) |
@@ -328,7 +330,7 @@ static int zd1211b_al2230_init_hw(struct zd_rf *rf) | |||
328 | if (r) | 330 | if (r) |
329 | return r; | 331 | return r; |
330 | 332 | ||
331 | if (chip->al2230s_bit) | 333 | if (IS_AL2230S(chip)) |
332 | r = zd_rfwrite_locked(chip, 0x241000, RF_RV_BITS); | 334 | r = zd_rfwrite_locked(chip, 0x241000, RF_RV_BITS); |
333 | else | 335 | else |
334 | r = zd_rfwrite_locked(chip, 0x25a000, RF_RV_BITS); | 336 | r = zd_rfwrite_locked(chip, 0x25a000, RF_RV_BITS); |