Nobody replied, so I fixed the problem without the benefit of the insight
of resident experts.
I don't rely on the USB vendor/product-IDs to distinguish between ZD1211
and ZD1211B (Abocom don't assign unique product-IDs), but use the firmware
version instead. Also if I get a E2P_POD of 0x0A then I force the
al2230s_bit to 1 to handle the RF chip as a AL2230S. This works great with
both types of Abocom WLAN modules.
A patch against 2.6.21.5 is below.
I suspect Abocom manufacture using chips they can source at any given time
and don't bother assigning a different USB product-ID because the Windows
XP or Vista drivers know how to distinguish between the various chips
(AL2230 versus AL2230S and ZD1211 versus ZD1211B).
Enjoy
Tom
diff -c -r zd1211rw_2.6.21.5/zd_rf.c zd1211rw_good_backup/zd_rf.c
*** zd1211rw_2.6.21.5/zd_rf.c 2007-06-27 13:42:48.000000000 +0800
--- zd1211rw_good_backup/zd_rf.c 2007-06-27 12:34:32.000000000
+0800
***************
*** 34,40 ****
[AL2210_RF] = "AL2210_RF",
[MAXIM_NEW_RF] = "MAXIM_NEW_RF",
[UW2453_RF] = "UW2453_RF",
! [UNKNOWN_A_RF] = "UNKNOWN_A_RF",
[RALINK_RF] = "RALINK_RF",
[INTERSIL_RF] = "INTERSIL_RF",
[RF2959_RF] = "RF2959_RF",
--- 34,40 ----
[AL2210_RF] = "AL2210_RF",
[MAXIM_NEW_RF] = "MAXIM_NEW_RF",
[UW2453_RF] = "UW2453_RF",
! [AL2230S_RF] = "AL2230S_RF",
[RALINK_RF] = "RALINK_RF",
[INTERSIL_RF] = "INTERSIL_RF",
[RF2959_RF] = "RF2959_RF",
***************
*** 71,76 ****
--- 71,79 ----
if (r)
return r;
break;
+ case AL2230S_RF:
+ chip->al2230s_bit = 1;
+ /* fall through */
case AL2230_RF:
r = zd_rf_init_al2230(rf);
if (r)
diff -c -r zd1211rw_2.6.21.5/zd_rf.h zd1211rw_good_backup/zd_rf.h
*** zd1211rw_2.6.21.5/zd_rf.h 2007-06-27 13:42:48.000000000 +0800
--- zd1211rw_good_backup/zd_rf.h 2007-06-27 12:35:24.000000000
+0800
***************
*** 26,32 ****
#define AL2210_RF 0x7
#define MAXIM_NEW_RF 0x8
#define UW2453_RF 0x9
! #define UNKNOWN_A_RF 0xa
#define RALINK_RF 0xb
#define INTERSIL_RF 0xc
#define RF2959_RF 0xd
--- 26,32 ----
#define AL2210_RF 0x7
#define MAXIM_NEW_RF 0x8
#define UW2453_RF 0x9
! #define AL2230S_RF 0xa
#define RALINK_RF 0xb
#define INTERSIL_RF 0xc
#define RF2959_RF 0xd
diff -c -r zd1211rw_2.6.21.5/zd_usb.c zd1211rw_good_backup/zd_usb.c
*** zd1211rw_2.6.21.5/zd_usb.c 2007-06-27 13:42:01.000000000 +0800
--- zd1211rw_good_backup/zd_usb.c 2007-06-27 13:48:11.000000000
+0800
***************
*** 228,234 ****
return r;
}
! static int upload_firmware(struct usb_device *udev, u8 device_type)
{
int r;
u16 fw_bcdDevice;
--- 228,234 ----
return r;
}
! static int upload_firmware(struct usb_device *udev, u8 *device_type)
{
int r;
u16 fw_bcdDevice;
***************
*** 239,246 ****
bcdDevice = get_bcdDevice(udev);
r = request_fw_file(&ub_fw,
! get_fw_name(fw_name, sizeof(fw_name), device_type, "ub"),
&udev->dev);
if (r)
goto error;
--- 239,257 ----
bcdDevice = get_bcdDevice(udev);
+ /*
+ * We use the firmware version to determine if it is a ZD1211 or a
ZD1211B.
+ */
+ if (bcdDevice == 0x4810) {
+ printk("I think this is a ZD1211B\n");
+ *device_type = DEVICE_ZD1211B;
+ } else {
+ printk("I think this is a ZD1211\n");
+ *device_type = DEVICE_ZD1211;
+ }
+
r = request_fw_file(&ub_fw,
! get_fw_name(fw_name, sizeof(fw_name), *device_type, "ub"),
&udev->dev);
if (r)
goto error;
***************
*** 255,261 ****
dev_warn(&udev->dev, "device has old bootcode,
please "
"report success or failure\n");
! r = handle_version_mismatch(udev, device_type, ub_fw);
if (r)
goto error;
} else {
--- 266,272 ----
dev_warn(&udev->dev, "device has old bootcode,
please "
"report success or failure\n");
! r = handle_version_mismatch(udev, *device_type, ub_fw);
if (r)
goto error;
} else {
***************
*** 264,272 ****
"actual device id\n", fw_bcdDevice);
}
-
r = request_fw_file(&uph_fw,
! get_fw_name(fw_name, sizeof(fw_name), device_type,
"uphr"),
&udev->dev);
if (r)
goto error;
--- 275,282 ----
"actual device id\n", fw_bcdDevice);
}
r = request_fw_file(&uph_fw,
! get_fw_name(fw_name, sizeof(fw_name), *device_type,
"uphr"),
&udev->dev);
if (r)
goto error;
***************
*** 916,921 ****
--- 926,932 ----
int r;
struct usb_device *udev = interface_to_usbdev(intf);
struct net_device *netdev = NULL;
+ u8 device_type = id->driver_info;
print_id(udev);
***************
*** 941,947 ****
goto error;
}
! r = upload_firmware(udev, id->driver_info);
if (r) {
dev_err(&intf->dev,
"couldn't load firmware. Error number %d\n", r);
--- 952,958 ----
goto error;
}
! r = upload_firmware(udev, &device_type);
if (r) {
dev_err(&intf->dev,
"couldn't load firmware. Error number %d\n", r);
***************
*** 960,966 ****
* notify that the initialization of the MAC will require the
* interrupts to be temporary enabled.
*/
! r = zd_mac_init_hw(zd_netdev_mac(netdev), id->driver_info);
if (r) {
dev_dbg_f(&intf->dev,
"couldn't initialize mac. Error number %d\n", r);
--- 971,977 ----
* notify that the initialization of the MAC will require the
* interrupts to be temporary enabled.
*/
! r = zd_mac_init_hw(zd_netdev_mac(netdev), device_type);
if (r) {
dev_dbg_f(&intf->dev,
"couldn't initialize mac. Error number %d\n", r);
This email is confidential. If you are not the intended recipient you must
not disclose or use the information contained in it. If you have received
this email in error please notify us immediately by return email and
delete this email and any attachments. ERG is not responsible for any
changes made to this email or any attachments, other than those made by
ERG, or for the effect of the changes on the meaning of the email or any
attachments. ERG accepts no liability for any damage caused by this email
or any attachments due to viruses, interference, interception, corruption
or unauthorised access.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs