When I installed the kernel source from the DVD using Mandrake control center, it installed version 2.4.27-0.pre2.1mdk. But 'uname -r' gave me 2.6.8.1-12mdk. With the kernel source from the DVD, madwifi nor ndiswrapper would compile. Then 'hockeyfan' suggested to install the source from the shell prompt.
Well I decided to format my entire system and start afresh. But for some reason, I decided to choose 'Upgrade' option rather than the 'Install' option at bootup. To my surprise, the older kernel source was patched to the latest version during the upgrade. After this is just did
cd wirelesstools
make
make install
and then
cd madwifi
make
make install
Everything went on perfectly (except for a few warnings). I then used the mandrake control centre to add a new connection and it automatically showed me an atheros card in my pcmcia slot. The rest was easy
.
Thanks a lot hockeyfan