From owner-freebsd-net@FreeBSD.ORG Sat May 3 00:25:10 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 E1B991065677 for ; Sat, 3 May 2008 00:25:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 99DEB8FC1E for ; Sat, 3 May 2008 00:25:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from Macintosh-2.local ([10.0.0.194]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m430P9pc075622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 2 May 2008 17:25:10 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <481BB0E5.8000803@freebsd.org> Date: Fri, 02 May 2008 17:25:09 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <20080502093655.GA3535@pintail.smokva.net> In-Reply-To: <20080502093655.GA3535@pintail.smokva.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist 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: Sat, 03 May 2008 00:25:11 -0000 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. Sam