From bofh@redwerk.com  Sun Mar 28 19:31:22 2010
Return-Path: <bofh@redwerk.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B31BC106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Mar 2010 19:31:22 +0000 (UTC)
	(envelope-from bofh@redwerk.com)
Received: from redwerk.com (redwerk.com [89.105.196.9])
	by mx1.freebsd.org (Postfix) with ESMTP id 50E8C8FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Mar 2010 19:31:22 +0000 (UTC)
Received: from [192.168.250.7] (helo=localhost)
	by redwerk.com with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.71)
	(envelope-from <bofh@redwerk.com>)
	id 1NvyCe-0001yU-II
	for FreeBSD-gnats-submit@freebsd.org; Sun, 28 Mar 2010 21:31:21 +0200
Received: from bofh by localhost with local (Exim 4.71 (FreeBSD))
	(envelope-from <bofh@redwerk.com>)
	id 1NvyCb-0009yX-PI
	for FreeBSD-gnats-submit@freebsd.org; Sun, 28 Mar 2010 22:31:17 +0300
Message-Id: <20100328193117.GA38303@localhost>
Date: Sun, 28 Mar 2010 22:31:17 +0300
From: Eugeny N Dzhurinsky <bofh@redwerk.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: network connection freezes if using WPA-PSK encryption with 2
 Atheros WIFI cards on AR9285 chipset connected to same AP

>Number:         145123
>Category:       kern
>Synopsis:       [ath] network connection freezes if using WPA-PSK encryption with 2 Atheros WIFI cards on AR9285 chipset connected to same AP
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 28 19:40:03 UTC 2010
>Closed-Date:    Mon Mar 29 19:42:07 UTC 2010
>Last-Modified:  Mon Mar 29 19:42:07 UTC 2010
>Originator:     Eugene Dzhurinsky
>Release:        FreeBSD 8.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD localhost 8.0-STABLE FreeBSD 8.0-STABLE #34: Mon Mar 22 23:31:30 EET 2010 root@localhost:/usr/obj/usr/src/sys/BOFH i386

- Laptop ASUS K40IN with Atheros wifi on AR9285 chipset. The one which gets the wifi connection frozen after some time. FreeBSD 8.0 stable.
ath0 : <Atheros 9285> mem 0xfebf0000-0xfebfffff irq 17 at device 0.0 on pci4

- AP with FreeBSD 7.2 and Dlink DWL ral0: <Ralink Technology RT2561> mem 0xfebf8000-0xfebfffff irq 20 at device 0.0 on pci4

- Laptop ASUS K40IJ with Atheros wifi on AR9285 chipset. Operates under Ubuntu 9.04. No problems with wifi connection are noticed.

>Description:

I do have 2 laptops as described above, and the home server with FreeBSD 7.2 STABLE installed on it. Dlink WiFi card is installed over there and serves in AP mode. The hostapd config is below:

interface=ral0
debug=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=freebsdap
wpa=1
wpa_passphrase=****************
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP

My laptop has FreeBSD 8.0 stable installed. It uses wpa_supplicant to establish secure connection over wifi with AP. My wpa_supplicant.conf file is listed below:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
    ssid="freebsdap"
    psk="AnghotsoctIv"
    scan_ssid=1
}

The problem raises when second laptop (Asus K40IJ) connects to the AP. My own (Asus K40IN) simply stops to transmit packets. At this time ifconfig shows that AP is associated

wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:25:d3:5c:f0:c8
	inet 192.168.10.3 netmask 0xffffff00 broadcast 192.168.10.255
	media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g
	status: associated
	ssid freebsdap channel 1 (2412 MHz 11g) bssid 00:1b:11:01:6b:f6
	regdomain 33411 country RU indoor ecm authmode WPA privacy ON
	deftxkey UNDEF TKIP 2:128-bit txpower 20 bmiss 7 scanvalid 450 bgscan
	bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
	wme burst roaming MANUAL

but no IP packets are transferred. 

tcpdump -vvv -i wlan1

gives no output

issuing the command

wpa_supplicant reassociate

results in state "no carrier" for interface wlan1 for some time, then it seems to reassociate well - an interface wlan1 becomes "associated". But still no packets are noticed on wlan1. In logs of wpa_supplicant I can see something like

WPA: Key negotiation completed with 00:1b:11:01:6b:f6 [PTK=CCMP GTK=TKIP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to 00:1b:11:01:6b:f6 completed (auth) [id=0 id_str=]
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
EAPOL: startWhen --> 0
EAPOL: disable timer tick

and no errors. At this time on another laptop (with Ubuntu) no such problems arise.

If I use another Wifi adapter - DLink USB stick, which uses if_rum driver, no such problem occurs at all. My Asus K40IN stays connected for hours without any problem in transmitting of packets.

>How-To-Repeat:

I'm not sure, but looks like problem is reproducible if you plug 2 laptops with AR9285 Wifi card into Wifi network with WPA-PSK security enabled.

>Fix:

Restarting wpa_supplicant fixes the problem.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Mar 29 09:42:26 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145123 

From: Eugeny N Dzhurinsky <bofh@redwerk.com>
To: bug-followup@FreeBSD.org, bofh@redwerk.com
Cc:  
Subject: Re: kern/145123: network connection freezes if using WPA-PSK
 encryption with 2 Atheros WIFI cards on AR9285 chipset connected to same
 AP
Date: Mon, 29 Mar 2010 20:40:43 +0300

 Sorry, my bad. After trying to investigate the problem on access point I
 realized that there was conflict between IP addresses of network adapters on
 laptops, which I should notice immediately if I would look carefully at logs
 on AP side.
 
 So please close this PR.
 
 Shame on me...
State-Changed-From-To: open->closed 
State-Changed-By: vwe 
State-Changed-When: Mon Mar 29 19:41:11 UTC 2010 
State-Changed-Why:  
submitter requests to close this 
thank you Eugeny for reporting and feeding back 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145123 
>Unformatted:
 To: FreeBSD-gnats-submit@freebsd.org
 From: Eugene Dzhurinsky <bofh@redwerk.com>
 Reply-To: Eugene Dzhurinsky <bofh@redwerk.com>
 Cc: 
 X-send-pr-version: 3.113
 X-GNATS-Notify: 
 
 
