書きかけ

$ mkdir tmp
$ cd !$
$ wget http://open1211.googlecode.com/files/open1211_20100215.tar.gz
$ tar xzvf open1211_20100215.tar.gz
$ ls
Makefile  apps  ar2524drv  docs  open1211_20100215.tar.gz
$ cd ar2524drv/

// 長いのでエラー出力だけ。
$ make ZD1211REV_B=1 2>&1 1>/dev/null
In file included from /tmp/hato/ar2524drv/src/zd1205.h:49,
                 from /tmp/hato/ar2524drv/src/zd1205.c:41:
/tmp/hato/ar2524drv/src/zdcompat.h:72:1: warning: "IRQ_RETVAL" redefined
In file included from include/linux/interrupt.h:10,
                 from include/linux/netdevice.h:1071,
                 from include/net/sock.h:50,
                 from include/linux/tcp.h:177,
                 from /tmp/hato/ar2524drv/src/zd1205.c:35:
include/linux/irqreturn.h:17:1: warning: this is the location of the previous definition
In file included from /tmp/hato/ar2524drv/src/zd1205.c:42:
/tmp/hato/ar2524drv/src/zdinlinef.h:571:5: warning: "ZDCONF_ENABLE_USELESS_FUNCTION" is not defined
In file included from /tmp/hato/ar2524drv/src/zd1205.c:53:
/tmp/hato/ar2524drv/src/zd1211.h:117:6: warning: "fDRV_UPDATE_EEP" is not defined
/tmp/hato/ar2524drv/src/zd1205.c:486: warning: initialization from incompatible pointer type
/tmp/hato/ar2524drv/src/zd1205.c:833:9: warning: "fPROG_FLASH" is not defined
/tmp/hato/ar2524drv/src/zd1205.c:873:9: warning: "fPROG_FLASH" is not defined
/tmp/hato/ar2524drv/src/zd1205.c: In function ‘zd1205_alloc_skb’:
/tmp/hato/ar2524drv/src/zd1205.c:1923: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:1923: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:1924: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:1924: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:1925: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:1926: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:1927: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘U32’
/tmp/hato/ar2524drv/src/zd1205.c:9718:5: warning: "fPROG_FLASH" is not defined
/tmp/hato/ar2524drv/src/zd1205.c: In function ‘zdcb_rx_ind’:
/tmp/hato/ar2524drv/src/zd1205.c:11392: error: ‘NET_RX_BAD’ undeclared (first use in this function)
/tmp/hato/ar2524drv/src/zd1205.c:11392: error: (Each undeclared identifier is reported only once
/tmp/hato/ar2524drv/src/zd1205.c:11392: error: for each function it appears in.)
/tmp/hato/ar2524drv/src/zd1205.c:11394: error: ‘NET_RX_CN_MOD’ undeclared (first use in this function)
/tmp/hato/ar2524drv/src/zd1205.c:11395: error: ‘NET_RX_CN_HIGH’ undeclared (first use in this function)
/tmp/hato/ar2524drv/src/zd1205.c: In function ‘zdcb_dis_intr’:
/tmp/hato/ar2524drv/src/zd1205.c:11631: warning: comparison of distinct pointer types lacks a cast
make[2]: *** [/tmp/hato/ar2524drv/src/zd1205.o] エラー 1
make[1]: *** [_module_/tmp/hato/ar2524drv] エラー 2
make: *** [all] エラー 2

$ cd src/
$ cp -a zd1205.c{,.org}
// zd1205.c 編集
$ cd ..
$ make ZD1211REV_B=1


# cd /lib/modules/2.6.32-22-generic/kernel/drivers/net/wireless
# mv zd1201.ko{,.org}
# cp -a /home/hato/tmp/ar2524drv/zd1211b.ko .
# depmod -a

$ tail -F /var/log/messages
kernel: [ 1542.092022] usb 2-3: new high speed USB device using ehci_hcd and address 3
kernel: [ 1542.224920] usb 2-3: configuration #1 chosen from 1 choice
kernel: [ 1542.340016] usb 2-3: reset high speed USB device using ehci_hcd and address 3
kernel: [ 1542.474982] zd1211rw 2-3:1.0: phy1
kernel: [ 1542.484112] usb 2-3: firmware: requesting zd1211/zd1211b_ub
kernel: [ 1542.488267] usb 2-3: firmware: requesting zd1211/zd1211b_uphr
kernel: [ 1542.533073] zd1211rw 2-3:1.0: firmware version 4725
kernel: [ 1542.573086] zd1211rw 2-3:1.0: zd1211b chip 2019:5303 v4810 high 00-90-cc AL2230_RF pa0 ---N-
kernel: [ 1542.589972] usb 2-3: firmware: requesting zd1211/zd1211b_ub
kernel: [ 1542.591583] usb 2-3: firmware: requesting zd1211/zd1211b_uphr


$ ifconfig wlan0
wlan0     Link encap:イーサネット  ハードウェアアドレス xx:xx:xx:xx:xx:xx
          BROADCAST MULTICAST  MTU:1500  メトリック:1
          RXパケット:0 エラー:0 損失:0 オーバラン:0 フレーム:0
          TXパケット:0 エラー:0 損失:0 オーバラン:0 キャリア:0
          衝突(Collisions):0 TXキュー長:1000
          RXバイト:0 (0.0 B)  TXバイト:0 (0.0 B)

# modprobe -r zd1211rw
# modprobe -r zd1201
# modprobe zd1211b

$ lsmod | grep zd
zd1211b               470880  0

# cat /etc/network/interface
auto ath0
iface ath0 inet static
        address 10.0.0.1
        netmask 255.255.255.0
        wireless-mode Master
        wireless-essid test-ssida33
        wireless-key s:1234567890123
        wireless-channel 11
        wireless-rate 11M
// iwconfig ath0 mode Master
# iwconfig ath0
// iwconfig ath0 channel 11
// iwconfig ath0 rate 11M

# iwlist scanning