ZD1211rw with patches for aircrack-ng

From D3xt3r01.tk
Jump to navigationJump to search

WHAT ?

I'm trying to make my zd1211rw driver card support injection in Ubuntu Jaunty in order to be able to use the airecrack-ng suite.

HOW ?

Get the headers and prepare everything ..

 cd ~
 apt-get install linux-headers-$(uname -r)
 apt-get build-dep linux-image-$(uname -r)
 apt-get source linux-image-$(uname -r)

Now get and apply the patch

 wget http://patches.aircrack-ng.org/zd1211rw_inject_2.6.26.patch
 cd linux-2.6.28 # be sure to change this .. 
 patch -p0 < ../zd1211rw_inject_2.6.26.patch

You should see some "hunk succeeded" messages like this

 patching file drivers/net/wireless/zd1211rw/zd_mac.c
 Hunk #1 succeeded at 196 (offset 37 lines).
 Hunk #2 succeeded at 671 (offset -13 lines).


Now prepare everything for compiling.

 cp /boot/config-$(uname -r) .config
 cp /lib/modules/$(uname -r)/build/Module.symvers .
 make oldconfig
 make prepare
 make scripts

Now compile our module

 make M=drivers/net/wireless/zd1211rw/

Backup our old module and replace it with the new one

 cd /lib/modules/$(uname -r)/kernel/drivers/net/wireless/zd1211rw/
 cp zd1211rw.ko zd1211rw.ko.orig
 cp ~/linux-2.6.28/drivers/net/wireless/zd1211rw/zd1211rw.ko .

Now load it and be sure there are no errors

 modprobe zd1211rw
 rmmod zd1211rw
 depmod -ae

Now you should see Injection is working! when doing aireplay-ng --test wlan0