From: Pavel Roskin Date: Fri, 03 Apr 2009 22:06:05 -0400 Subject: [ath9k-devel] iwlist wlan0 scan starts to fail after many iterations In-Reply-To: <204608400904030458o34b465acp7f789f45c7a5fa0f@mail.gmail.com> References: <204608400904030458o34b465acp7f789f45c7a5fa0f@mail.gmail.com> Message-ID: <1238810765.30480.76.camel@mj> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Fri, 2009-04-03 at 07:58 -0400, Joe McEachern wrote: > We are able to reproduce the problem by running iwlist scan in a loop: > > while [ 1 ]; do > iwlist wlan0 scan > done > > After about 5000 scans, the scans start failing. I can reproduce the problem on AR9280 quite quickly. That's what I do: 1) Load ath9k 2) Run wpa_supplicant to connect to an AP 3) Run dhcpcd to get an IP address 4) Run scanning in a loop for about 30 cycles, then interrupt 5) Wait two minutes. The kernel messages are: phy1: Atheros AR9280 MAC/BB Rev:2 AR5133 RF Rev:d0: mem=0xffffc200041c0000, irq=17 udev: renamed network interface wlan0 to wlan1 wlan1: authenticate with AP 00:19:5b:56:fc:73 wlan1: authenticated wlan1: associate with AP 00:19:5b:56:fc:73 wlan1: RX AssocResp from 00:19:5b:56:fc:73 (capab=0x431 status=0 aid=1) wlan1: associated wlan1: beacon loss from AP 00:19:5b:56:fc:73 - sending probe request wlan1: beacon loss from AP 00:19:5b:56:fc:73 - sending probe request wlan1: beacon loss from AP 00:19:5b:56:fc:73 - sending probe request wlan1: beacon loss from AP 00:19:5b:56:fc:73 - sending probe request wlan1: no probe response from AP 00:19:5b:56:fc:73 - disassociating Two first "beacon loss" appear while scanning. That last three messages appear after the scanning script has been interrupted. The last message indicates that the bug has been triggered. Scanning gives no results, even thought it was finding 18 APs before. Scanning with the new "iw" command also gives no results. It's not necessary to remove the module or to bring the interface down to restore the scanning ability. It's sufficient to set the channel with iwconfig. However, setting ESSID is not enough. I'm using the current wireless-testing with the patch I've just posted for invalid memory access (apparently it's a separate issue). I'm using a configuration with most debugging options enabled, which can help trigger the bug. -- Regards, Pavel Roskin