Now I am using the buildin driver in Ubuntu 9.10 called ath5k for my wireless netcard (chipset AR5007). The madwifi driver still is a better choice but it is a bit annoying to rebuild and reinstall the madwifi driver after every kernel update.
I found that the ath5k driver has a serious problem: If your AP is set to use channels 1-4 then the driver cannot connect to the wireless network. It keeps prompting for the network key.
When I configure the AP to use channels 5-13 then there is no problem at all.
This problem I have found when using different AP’s from Zyxel, Netgear and Linksys – so my conclusion is that it must be a driver error.
You can find a similar description on ThinkPad adapters here. Notice that they cannot use channels 7-13.