I've downloaded madwifi-0.9.30-10 from subversion, patched the 2.6.18-4 kernel and turned on Atheros support and Crypto API as usual (all compiled inside the kernel instead of modules).
When I compile the kernel I get a file missing error that looks like this:
error: /usr/src/linux-source-2.6.18/drivers/net/wireless/madwifi/ath_rate/amrr/../../hal/public/.opt_ah.h: The directory or file doesn't exist
Playing a bit I've discovered that the error is caused because the file .opt_ah.h, which should point to the current .-elf.opt_ah.h computer architecture (i386, x86_64, PowerPC, etc.), is missing inside the directory.
My temporal patch is to manually create the soft link but it would be nice if this was not necessary... :P
I think the error could be fixed modifying the ./patch.sh script to check the machine architecture and create the .opt_ah.h soft link to the correct file (i.e. i386-elf.opt_ah.h ).