0.9.3.1 will not compile with 2.6.22; I had the same error.
Download http://snapshots.madwifi.org/madwifi-ng-current.tar.gz
Enter the directory you saved it to and
tar zxvf madwifi-ng-current.tar.gz
cd into the extracted directory
make
make install
modprobe ath_pci
reboot
the world is a great place. At least it worked well for me. mileage may
vary of course...