From: Jouni Malinen (jkmaline_at_cc.hut.fi)
Date: 2002-09-10 14:39:37 UTC
I remember seeing a few reports about problems with getting station
authenticated and associated when using kernel driver code for AP
management functionality. This has usually resulted in repeated
'authentication ...' and 'TX EXC RetryErr' messages.
I think I finally found the reason for this and hopefully improved the situation with the change I just added to CVS repository. In other words, if you have had problems like this, please test with the latest snapshot.
It looks like the problem was in spending too much time before sending a reply to authentication frame (or assoc req). This is quite repeatable with systems that send kernel debug messages (printk with KERN_DEBUG) to serial console or possible also if those are logged to a file or remote syslogd. If the station does not receive a reply within some time, it will not even ACK the reply that comes a bit later. This will result in those RetryErr messages.
I run into this when using 'dmesg -n 8' to get all kernel messages on serial console (9600 bps).. With this setup, it took more than 0.1 sec to get the reply out and this was clearly too much. I modified the code to first process the authentication/assoc req frame and only after having queued the reply for TX, write the log message. This reduced the interval between the frames to about 1.2 ms and removed problems in my test setup. I think this is enough for now, but I will consider changing the mgmt frame handling to be done in interrupt context (although after ACKing hw interrupt) in the next version, if there is still some problems with this.
In addition to the improved printk logging of auth/assoc frames, I changed TXEXC logging. Now the default is not to write headers of failed TX frames to kernel log. There is a txexc error counter for each associated station and this is now available from STA info file in procfs. In addition, the old behavior of logging TXEXCs can be enabled by setting bit2 of prism2_param 'dump' (e.g., with 'prism2_param wlan0 dump 4').
-- Jouni Malinen PGP id EFC895FA