Kernel Bug Tracker – Bug 12373
ath9k drops connection after 2 to 3 minutes connected
Last modified: 2009-01-18 08:37:36 UTC
Latest working kernel version: 2.6.28
Earliest failing kernel version: 2.6.28
Hardware Environment: asus m70vm-x1 laptop
Software Environment: gnome, firefox, thunderbird, eclipse, ssh tunnels, eio
This new years, I compiled the linux kernel from source, hoping that the fixes on the ath9k would fix a dropping issue, that I was having in 2.6.27 which would only drop my connection if I left my laptop on over night, which wasn't a big issue. Anyway, the problem I am having now, is that when I get onto my system, it usually drops my connection after 2 to 3 minutes. I restart the connection /etc/init.d/net.wlan0 restart, then I get a connection to only be dropped 2 to 3 minutes again. I end up rebooting into the 2.6.27 kernel since it is much stabler. I also notice alot more missing keystrokes on the 2.6.28 kernel, this might be unrelated.
Steps to reproduce:
1. Log on, and wait for it to drop connection. Or, just log on and restart by typing: /etc/init.d/net.wlan restart on a command line.
> Latest working kernel version: 2.6.28
I assumed that this should have been 2.6.27, and marked it as a regression.
Nope, this is 2.6.28 that the problem is happening in. However, there were drops in 2.6.27 as well. But it was less of a problem in 2.6.27
Experiencing the same problems in 2.6.28 on AR5418 (MacBook Pro 3.1)
On my WEP network, I can re-establish a connection with:
# iwconfig essid ath0 $my_essid
without needing to do DHCP or anything again.
I should add that on a handful of occasions my connection has lasted 10-20 minutes, but indeed most of the time it loses association in under 5 minutes.
On my laptop Samsung P28 with mini-pci wifi adapter TP-LINK 861N I have Ubuntu 8.10 Desktop i386 installed with the kernel 2.6.27-11. Currently I am using wifi router Trendnet TEW-633GR rev. 1.0 in bgn mixed mode. Laptop every time fails to get associated with it and recieve an IP address from its dhcp server. But if rebooting in Windows XP SP3 there are no such problems at all. Wifi adapter works fine in n-mode. I have compiled compat-wireless 2.6 and to my surprise ath9k has begun to connect to the router but with strange bitrate 135. I can see that on the satus --> wireless tab on the admin router's web page. This value never changes with no downing and upping either.
But if doing in command line: iwconfig wlan0 there is no any sign of bitrate at all. Gnome-NetworkManager applet also can't indicate the speed of that connection. It reads as unknown.
I'm trying to find any solution to encrease the bitrate of the connection for ath9k up to 270-300Mbps.
If you want bleeding edge ath9k please try wireless-testing  or compat-wireless . Compat-wireless is the same as wireless-testing but it backports the code down to older kernels so you don't have to recompile your entire kernel, it just updates your wireless subsystem without deleting your kernel's drivers. If you try out wireless-testing or compat-wireless please do not report bugs on the kernel.org bugzilla but simply report the issues you see on the linux-wireless mailing list.
This particular bug report is about connectivity issues on 2.6.28, a loss of connectivity is being reported after a few minutes. I believe the issue here is the fact that 2.6.28 was shipped without the beacon filter enabled on RX when operating in STA mode. The reason you may loose connectivity could be due to the fact that you may be in a noisy environment and mac80211 is not getting the beacons it does expect. We have fixed this in wireless-testing and Greg recently pushed the patch onto 2.6.28 via 2.6.28-stable review patch series,
[patch 87/94] ath9k: enable RXing of beacons on STA/IBSS
I suspect this will go into 188.8.131.52 but since it is not out yet you can test the get the patch and feel free to test it:
Please report back if this cures your connectivity issues.
Yes, the ath9k in wireless-compat appears to fix this for me on 2.6.28.
please check the patch posted and see if this corrects your own connectivity issues seen on the 2.6.28 stock kernel.
That seems to fix it. I have been connected for several hours now, only once did it disconnect.
dmesg reveals this:
wlan0: no IPv6 routers present
I left it on since 17:00 yesterday. According to my logs, NetworkManager decided to do DHCP again at around 02:00, then it disconnected permanently at around 09:00. I received an I/O error from "iwlist ath0 scanning", and nothing I did would reconnect me until I reloaded the driver.
So, it seems this bug is fixed though there is still another issue. Whether it is related or not I don't know.
Levi, you can ignore the ForceXPAon messages, they were supposed to have been "debug" messages but that one slipped. You will see one of those per hw reset on the chip which is done on channel changes, for example.
Created attachment 19876 [details]
Enable debugging on ath9k for 2.6.28
Alexander, can you please open up a new bug report? Please provide debugging output. For 2.6.28 ath9k you will need to modify a driver file for ath9k to enable debugging output for it. Please apply the attached patch and supply the log form it.
It will be *a lot* of information so you may first want to try to reproduce the issue in a shorter period of time. You can also just provide the last part of the log where you start seeing the issues.
Alexander as per Sujith's recommendation you can also just use ATH_DBG_CONFIG instead of ATH_DBG_ANY -- that will produce a lot less amount of messages.