I buy a usb WiFi key whith id codes  0cde:001a
 
I rebuilt kernel  2.6.21.6
I modify zd_usb.c adding the line
 
{ USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211 },
 
when the kernel boots i get :
 
dmesg | grep zd1211
[   25.092000] zd1211rw usb_init()
[   25.668000] zd1211rw 4-1:1.0: zd_netdev_alloc() netdev->flags 0x1002
[   25.668000] zd1211rw 4-1:1.0: zd_netdev_alloc() netdev->features 0x00000000
[   25.668000] usb 4-1: request_fw_file() fw name zd1211/zd1211_ub
[   25.716000] usb 4-1: request_fw_file() fw name zd1211/zd1211_ur
[   25.736000] usb 4-1: request_fw_file() fw name zd1211/zd1211_uphr
[   25.752000] zd1211rw 4-1:1.0: zd_usb_enable_int()
[   25.752000] zd1211rw 4-1:1.0: zd_usb_enable_int() submit urb d7577160
[   25.752000] zd1211rw 4-1:1.0: zd_chip_init_hw()
[   25.756000] zd1211rw 4-1:1.0: dump_cr() CR_AFTER_PNP 0x00000000
[   25.756000] zd1211rw 4-1:1.0: dump_cr() CR_GPI_EN 0x00000000
[   25.760000] zd1211rw 4-1:1.0: dump_cr() CR_INTERRUPT 0x00000000
[   25.760000] zd1211rw 4-1:1.0: read_fw_regs_offset() fw_regs_base: 0xf7d4
[   25.764000] zd1211rw 4-1:1.0: read_pod() E2P_POD 0x80000184
[   25.764000] zd1211rw 4-1:1.0: read_pod() RF AL2230_RF 0x4 PA type 0x0 patch CCK 1 patch CR157 0 patch 6M 0 new PHY 1 link LED2 tx led 1
[   25.764000] zd1211rw 4-1:1.0: hw_init()
[   25.764000] zd1211rw 4-1:1.0: zd1211_hw_reset_phy()
[   25.768000] zd1211rw 4-1:1.0: zd_chip_lock_phy_regs() CR_REG1: 0x00 -> 0x00
[   25.776000] zd1211rw 4-1:1.0: zd_chip_unlock_phy_regs() CR_REG1: 0x00 -> 0x80
[   25.776000] zd1211rw 4-1:1.0: zd1211_hw_init_hmac()
[   25.776000] zd1211rw 4-1:1.0: get_aw_pt_bi() aw 0 pt 0 bi 0
[   25.776000] zd1211rw 4-1:1.0: set_aw_pt_bi() aw 0 pt 99 bi 100
[   25.780000] zd1211rw 4-1:1.0: zd_chip_lock_phy_regs() CR_REG1: 0xa0 -> 0x20
[   25.780000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x003f790 bits 24
[   25.784000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0033331 bits 24
[   25.784000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000000d bits 24
[   25.788000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x00b3331 bits 24
[   25.788000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x003b812 bits 24
[   25.792000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000fff3 bits 24
[   25.792000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0000824 bits 24
[   25.796000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0000da4 bits 24
[   25.796000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x00f4dc5 bits 24
[   25.800000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x00805b6 bits 24
[   25.800000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0011687 bits 24
[   25.804000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0000688 bits 24
[   25.804000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x00403b9 bits 24
[   25.808000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000dbba bits 24
[   25.808000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000099b bits 24
[   25.812000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x00bdffc bits 24
[   25.812000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000000d bits 24
[   25.816000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000500f bits 24
[   25.816000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000d00f bits 24
[   25.820000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0004c0f bits 24
[   25.820000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000540f bits 24
[   25.824000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000700f bits 24
[   25.824000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000500f bits 24
[   25.828000] zd1211rw 4-1:1.0: zd_chip_unlock_phy_regs() CR_REG1: 0x20 -> 0xa0
[   25.832000] zd1211rw 4-1:1.0: firmware version 4605
[   25.832000] zd1211rw 4-1:1.0: dump_fw_registers() FW_FIRMWARE_VER 0x4605
[   25.832000] zd1211rw 4-1:1.0: dump_fw_registers() FW_USB_SPEED 0x0001
[   25.832000] zd1211rw 4-1:1.0: dump_fw_registers() FW_FIX_TX_RATE 0x0000
[   25.832000] zd1211rw 4-1:1.0: dump_fw_registers() FW_LINK_STATUS 0x0000
[   25.836000] zd1211rw 4-1:1.0: dump_cr() CR_AFTER_PNP 0x00000001
[   25.836000] zd1211rw 4-1:1.0: dump_cr() CR_GPI_EN 0x00000000
[   25.840000] zd1211rw 4-1:1.0: dump_cr() CR_INTERRUPT 0x00000000
[   25.880000] zd1211rw 4-1:1.0: zd1211 chip 0cde:001a v4810 high 00-60-b3 AL2230_RF pa0 g--NS
[   25.880000] zd1211rw 4-1:1.0: zd_write_mac_addr() mac addr 00:60:b3:0d:81:ab
[   25.884000] zd1211rw 4-1:1.0: zd_read_regdomain() regdomain: 0x30
[   25.884000] zd1211rw 4-1:1.0: regdomain 0x30
[   25.884000] zd1211rw 4-1:1.0: zd_usb_disable_int() urb d7577160 killed
[   25.884000] zd1211rw 4-1:1.0: probe() successful
[   25.884000] zd1211rw 4-1:1.0: eth1
[   25.884000] usbcore: registered new interface driver zd1211rw
[   25.884000] zd1211rw initialized
 
Then I execute :
ifconfig eth1 up
 
and the kernel get:
Jul 11 21:30:34 Marx kernel: [  545.584000] zd1211rw 4-1:1.0: zd_usb_enable_int()
Jul 11 21:30:34 Marx kernel: [  545.584000] zd1211rw 4-1:1.0: zd_usb_enable_int() submit urb d70e5820
Jul 11 21:30:34 Marx kernel: [  545.584000] zd1211rw 4-1:1.0: zd_chip_set_basic_rates_locked() ff0f
Jul 11 21:30:34 Marx kernel: [  545.588000] zd1211rw 4-1:1.0: zd_chip_lock_phy_regs() CR_REG1: 0xa0 -> 0x20
Jul 11 21:30:34 Marx kernel: [  545.588000] zd1211rw 4-1:1.0: zd_chip_unlock_phy_regs() CR_REG1: 0x20 -> 0xa0
Jul 11 21:30:34 Marx kernel: [  545.592000] zd1211rw 4-1:1.0: zd_chip_lock_phy_regs() CR_REG1: 0xa0 -> 0x20
Jul 11 21:30:34 Marx kernel: [  545.592000] zd1211rw 4-1:1.0: zd_rf_set_channel() channel: 1
Jul 11 21:30:34 Marx kernel: [  545.592000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x003f790 bits 24
Jul 11 21:30:34 Marx kernel: [  545.592000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x0033331 bits 24
Jul 11 21:30:34 Marx kernel: [  545.596000] zd1211rw 4-1:1.0: zd_usb_rfwrite() value 0x000000d bits 24
Jul 11 21:30:34 Marx kernel: [  545.600000] zd1211rw 4-1:1.0: update_pwr_int() channel 1 pwr_int 0x53
Jul 11 21:30:34 Marx kernel: [  545.600000] zd1211rw 4-1:1.0: patch_cck_gain() patching value 1c
Jul 11 21:30:34 Marx kernel: [  545.600000] zd1211rw 4-1:1.0: zd_chip_unlock_phy_regs() CR_REG1: 0x20 -> 0xa0
Jul 11 21:30:34 Marx kernel: [  545.600000] zd1211rw 4-1:1.0: zd_usb_enable_rx()
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: housekeeping_enable()
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: bssinfo_change() changes: 7
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: zd_mac_set_multicast_list() mc addr 33:33:00:00:00:01
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: zd_mac_set_multicast_list() mc addr 01:00:5e:00:00:01
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: zd_mac_set_multicast_list() mc addr 33:33:00:00:00:01
Jul 11 21:30:34 Marx kernel: [  545.604000] ADDRCONF(NETDEV_UP): eth1: link is not ready
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: zd_mac_set_multicast_list() mc addr 01:00:5e:00:00:01
Jul 11 21:30:34 Marx kernel: [  545.604000] zd1211rw 4-1:1.0: zd_mac_set_multicast_list() mc addr 33:33:00:00:00:01
Jul 11 21:30:34 Marx kernel: [  545.604000] zd121
 
Then i execute :
iwlist eth1 scanning
Warning: Driver for device eth1 has been compiled with version 22
of Wireless Extension, while this program supports up to version 20.
Some things may be broken...
 
eth1      Scan completed :
          Cell 01 - Address: 00:0F:3D:A6:FA:DA
                    ESSID:"********"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:1
                    Encryption key:off
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 22 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Quality=100/100  Signal level=100/100
                    Extra: Last beacon: 536ms ago
 
so i execute
iwconfig eth1 essid "********"
 
an then iwconfig
eth1      IEEE 802.11b/g  ESSID:"********"  Nickname:"zd1211"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:0F:3D:A6:FA:DA
          Bit Rate=1 Mb/s
          Encryption key:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
 
but after 2 second if i execute :
eth1      IEEE 802.11b/g  ESSID:"********"  Nickname:"zd1211"
          Mode:Managed  Frequency:2.412 GHz  Access Point: Invalid
          Bit Rate=1 Mb/s
          Encryption key:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
 
The interface seems to not work properly.
 
What i can do ??