At my place, everything seemed to work OK (WPA2 and all), but when I tried it at work, the wireless connection dropped every x seconds, and needed to reauthenticate.
So I guess the problem depends on the type of wireless router.
I did some googling, and often I read that I had to pass the nohwcrypt=1 option to the ath9k kernel module. Which did not work. So I cluelessly tried some more suggestions, and finally I found a set of options that do work: nohwcrypt=1 blink=1 btcoex_enable=1 enable_diversity=1.
To try this out, you can do the following:
rmmod ath9k modprobe ath9k nohwcrypt=1 blink=1 btcoex_enable=1 enable_diversity=1
(Maybe you have to log out and log on again after this command).
If it works, you can persist the settings, adding the following line to /etc/modprobe.d/ath9k.conf
options ath9k nohwcrypt=1 blink=1 btcoex_enable=1 enable_diversity=1
That worked for me. So I hope this information is useful for someone else as wel.
Many thanks to Sergei Winitzki, who posted the comment that saved my day.