From owner-freebsd-net@FreeBSD.ORG Thu May 8 21:36:43 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 729DF1065673 for ; Thu, 8 May 2008 21:36:43 +0000 (UTC) (envelope-from petar@morrison.andev.ch) Received: from morrison.andev.ch (morrison.andev.ch [78.47.142.202]) by mx1.freebsd.org (Postfix) with ESMTP id C2B098FC1C for ; Thu, 8 May 2008 21:36:42 +0000 (UTC) (envelope-from petar@morrison.andev.ch) Received: by morrison.andev.ch (Postfix, from userid 1000) id E59265DB74; Thu, 8 May 2008 23:37:36 +0200 (CEST) Date: Thu, 8 May 2008 23:35:12 +0200 From: Petar Bogdanovic To: Sam Leffler Message-ID: <20080508213512.GA9389@pintail.smokva.net> Mail-Followup-To: Sam Leffler , freebsd-net@freebsd.org References: <20080502093655.GA3535@pintail.smokva.net> <481BB0E5.8000803@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <481BB0E5.8000803@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-net@freebsd.org Subject: Re: authentication timeouts with ath(4) in hostap mode X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 21:36:43 -0000 On Fri, May 02, 2008 at 05:25:09PM -0700, Sam Leffler wrote: > Petar Bogdanovic wrote: >> Hi, >> >> I'm using an alix2c0 board with two winstron CM9 ath(4)-cards and >> FreeBSD 7: >> >> ifconfig ath0 (...) mediaopt hostap mode 11a channel 36 ssid sn.a -bgscan >> ifconfig ath1 (...) mediaopt hostap mode 11g channel 11 ssid sn.g -bgscan >> >> >> When I try to raise the traffic (i.e. dd | ssh AP dd) my Linux >> wpa_supplicant drops the connection and has to reassociate. This however >> does not work immediately; The supplicant fails a few times before >> reconnecting: >> >> <2>CTRL-EVENT-CONNECTED - Connection to 00:0b:0b:06:0d:09 completed (reauth) [id=0 id_str=] >> <2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Authentication with 00:0b:0b:06:0d:09 timed out. >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Authentication with 00:0b:0b:06:0d:09 timed out. >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Authentication with 00:0b:0b:06:0d:09 timed out. >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Authentication with 00:0b:0b:06:0d:09 timed out. >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Authentication with 00:0b:0b:06:0d:09 timed out. >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Authentication with 00:0b:0b:06:0d:09 timed out. >> <2>Trying to associate with 00:0b:0b:06:0d:09 (SSID='sn.a' freq=5320 MHz) >> <2>Associated with 00:0b:0b:06:0d:09 >> <2>WPA: Key negotiation completed with 00:0b:0b:06:0d:09 [PTK=CCMP GTK=CCMP] >> <2>CTRL-EVENT-CONNECTED - Connection to 00:0b:0b:06:0d:09 completed (reauth) [id=0 id_str=] >> >> >> This happens more on the 11a than on the 11g network. When I'm next to >> the AP, the timeouts are almost gone but they still happen. (My laptop >> is just one room away from the AP). Here is the athstats-output of ath0 >> (11a): >> >> # ./athstats -i ath0 >> 481546 data frames received >> 330669 data frames transmit >> 13395 tx frames with an alternate rate >> 78558 long on-chip tx retries >> 1431 tx failed 'cuz too many retries >> 36M current transmit rate >> 78 tx management frames >> 3 tx frames discarded prior to association >> 45 tx frames with no ack marked >> 2894 rx failed 'cuz of bad CRC >> 2 rx failed 'cuz decryption >> 92711 rx failed 'cuz of PHY err >> 92708 OFDM timing >> 3 OFDM restart >> 318332 beacons transmitted >> 1111 periodic calibrations >> 2 rfgain value change >> 22 rssi of last ack >> 23 avg recv rssi >> -96 rx noise floor >> 2530 switched default/rx antenna >> Antenna profile: >> [1] tx 173364 rx 123068 >> [2] tx 155874 rx 358671 > > So the obvious question is whether your system config has enough isolation > of the radios for them not to impact each other? I have no experience with > Alix boards but it's not uncommon for there to be power and signal issues > when operating multiple radios in an enclosure (and yes, even with the > radios on different bands). > > You don't indicate what you've done to diagnose this problem. Have you > verified the packets are present in the air? Have you traced packets > and/or phy errors around the time of the problem? Does turning off one > radio give you stable operation? Have you tried different channels? Have > you tried different boards? > > >> >> >> All this is well known to me, since I had NetBSD running on this device >> for months and it suffered the same problems -- it was even worse, the >> timeouts occured every few minutes. Back then, it seemed that ath had >> some interrupt problems: >> >> ath0: device timeout >> >> as David Young from NetBSD noticed in his mail some time ago: >> >> http://mail-index.netbsd.org/tech-net/2007/11/29/0001.html >> >> >> FreeBSD doesn't seem to have this `device timeouts'. I don't see any in >> /var/log/messages and there are none when I'm connected to the device >> over a serial port. >> >> I'm a bit lost here, but ready to debug if someone knows more. > > netbsd's code base is many _years_ out of date wrt freebsd; comparing > operation of the two systems is unlikely to be useful. Just for the record: After various (client-)tests with Intel 2200BG and 3945ABG chips and one AR5212 chip on FreeBSD, it seems that only the madwifi client caused interrupts or more precisly: interrupts after a missed beacon. My observations correspond with the following madwifi ticket: http://madwifi.org/ticket/848 One beacon miss, one interrupt. The FreeBSD ath-driver does _not_ show any similar behaviour on the same device. Kind regards, Petar