Commit 4418583c authored by Daniel Drake's avatar Daniel Drake Committed by John W. Linville

[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: default avatarDaniel Drake <dsd@gentoo.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 86d95c21
...@@ -34,7 +34,7 @@ static const char * const rfs[] = { ...@@ -34,7 +34,7 @@ static const char * const rfs[] = {
[AL2210_RF] = "AL2210_RF", [AL2210_RF] = "AL2210_RF",
[MAXIM_NEW_RF] = "MAXIM_NEW_RF", [MAXIM_NEW_RF] = "MAXIM_NEW_RF",
[UW2453_RF] = "UW2453_RF", [UW2453_RF] = "UW2453_RF",
[UNKNOWN_A_RF] = "UNKNOWN_A_RF", [AL2230S_RF] = "AL2230S_RF",
[RALINK_RF] = "RALINK_RF", [RALINK_RF] = "RALINK_RF",
[INTERSIL_RF] = "INTERSIL_RF", [INTERSIL_RF] = "INTERSIL_RF",
[RF2959_RF] = "RF2959_RF", [RF2959_RF] = "RF2959_RF",
...@@ -77,6 +77,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type) ...@@ -77,6 +77,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type)
r = zd_rf_init_rf2959(rf); r = zd_rf_init_rf2959(rf);
break; break;
case AL2230_RF: case AL2230_RF:
case AL2230S_RF:
r = zd_rf_init_al2230(rf); r = zd_rf_init_al2230(rf);
break; break;
case AL7230B_RF: case AL7230B_RF:
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define AL2210_RF 0x7 #define AL2210_RF 0x7
#define MAXIM_NEW_RF 0x8 #define MAXIM_NEW_RF 0x8
#define UW2453_RF 0x9 #define UW2453_RF 0x9
#define UNKNOWN_A_RF 0xa #define AL2230S_RF 0xa
#define RALINK_RF 0xb #define RALINK_RF 0xb
#define INTERSIL_RF 0xc #define INTERSIL_RF 0xc
#define RF2959_RF 0xd #define RF2959_RF 0xd
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include "zd_usb.h" #include "zd_usb.h"
#include "zd_chip.h" #include "zd_chip.h"
#define IS_AL2230S(chip) ((chip)->al2230s_bit || (chip)->rf.type == AL2230S_RF)
static const u32 zd1211_al2230_table[][3] = { static const u32 zd1211_al2230_table[][3] = {
RF_CHANNEL( 1) = { 0x03f790, 0x033331, 0x00000d, }, RF_CHANNEL( 1) = { 0x03f790, 0x033331, 0x00000d, },
RF_CHANNEL( 2) = { 0x03f790, 0x0b3331, 0x00000d, }, RF_CHANNEL( 2) = { 0x03f790, 0x0b3331, 0x00000d, },
...@@ -176,7 +178,7 @@ static int zd1211_al2230_init_hw(struct zd_rf *rf) ...@@ -176,7 +178,7 @@ static int zd1211_al2230_init_hw(struct zd_rf *rf)
if (r) if (r)
return r; return r;
if (chip->al2230s_bit) { if (IS_AL2230S(chip)) {
r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s, r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s,
ARRAY_SIZE(ioreqs_init_al2230s)); ARRAY_SIZE(ioreqs_init_al2230s));
if (r) if (r)
...@@ -188,7 +190,7 @@ static int zd1211_al2230_init_hw(struct zd_rf *rf) ...@@ -188,7 +190,7 @@ static int zd1211_al2230_init_hw(struct zd_rf *rf)
return r; return r;
/* improve band edge for AL2230S */ /* improve band edge for AL2230S */
if (chip->al2230s_bit) if (IS_AL2230S(chip))
r = zd_rfwrite_locked(chip, 0x000824, RF_RV_BITS); r = zd_rfwrite_locked(chip, 0x000824, RF_RV_BITS);
else else
r = zd_rfwrite_locked(chip, 0x0005a4, RF_RV_BITS); r = zd_rfwrite_locked(chip, 0x0005a4, RF_RV_BITS);
...@@ -314,7 +316,7 @@ static int zd1211b_al2230_init_hw(struct zd_rf *rf) ...@@ -314,7 +316,7 @@ static int zd1211b_al2230_init_hw(struct zd_rf *rf)
if (r) if (r)
return r; return r;
if (chip->al2230s_bit) { if (IS_AL2230S(chip)) {
r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s, r = zd_iowrite16a_locked(chip, ioreqs_init_al2230s,
ARRAY_SIZE(ioreqs_init_al2230s)); ARRAY_SIZE(ioreqs_init_al2230s));
if (r) if (r)
...@@ -328,7 +330,7 @@ static int zd1211b_al2230_init_hw(struct zd_rf *rf) ...@@ -328,7 +330,7 @@ static int zd1211b_al2230_init_hw(struct zd_rf *rf)
if (r) if (r)
return r; return r;
if (chip->al2230s_bit) if (IS_AL2230S(chip))
r = zd_rfwrite_locked(chip, 0x241000, RF_RV_BITS); r = zd_rfwrite_locked(chip, 0x241000, RF_RV_BITS);
else else
r = zd_rfwrite_locked(chip, 0x25a000, RF_RV_BITS); r = zd_rfwrite_locked(chip, 0x25a000, RF_RV_BITS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment