From nobody@FreeBSD.org  Tue Dec 13 08:32:57 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8DBE1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Dec 2011 08:32:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A86168FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Dec 2011 08:32:57 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pBD8Wvsd029408
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 13 Dec 2011 08:32:57 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pBD8Wveq029407;
	Tue, 13 Dec 2011 08:32:57 GMT
	(envelope-from nobody)
Message-Id: <201112130832.pBD8Wveq029407@red.freebsd.org>
Date: Tue, 13 Dec 2011 08:32:57 GMT
From: Gustau Prez <gperez@entel.upc.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: AR5416 as HostAP. Delays among clients when 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163237
>Category:       kern
>Synopsis:       [ath] AR5416 as HostAP. Delays among clients when a client is in Power saving mode
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-wireless
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 13 08:40:13 UTC 2011
>Closed-Date:    
>Last-Modified:  Sun Mar 11 15:55:54 UTC 2012
>Originator:     Gustau Prez
>Release:        FreeBSD 10.0-CURRENT #31 r227346
>Organization:
>Environment:
FreeBSD harkserver 9.9-CURRENT FreeBSD 10.0-CURRENT #31 r227364: Thu Nov 24 18:04:08 CET 2011     root@harkserver:/usr/obj/root/deviant2/sys/CUSTOM  amd64

>Description:
  This is the environment:

  I'm using an AR5416 card acting as an AP with hostap in 11g mode. I'm running g mode because I did not have time to test the 11n work yet. The box is running CURRENT/AMD64.

  These are the symptoms:

  A few days ago I began to see very big delays between the AP and my laptop (which has an AR9287 with FreeBSD/AMD64 CURRENT). I tried a simple icmp with 1 second between pings. It is quite curious thing that the delays increase from 30ms until around 100ms (those times are in the same order of magnitude of a ping to google) and then they fall til 30ms again. It did not work like that.

   I tested with different clients (an iPhone, a laptop running FreeBSD with an Intel 3945, an asus eeePC laptop with windows7 and other devices). All of them showed the same behavior. No matter if I'm accessing the HostAP box or trying to access internet, everything takes long. 

   The bisect lead me to commit r227364, which is one quite large. Running the previous commit fixes it. 
>How-To-Repeat:
Compile a custom kernel with r227364 in a box with an AR5416 and use the box as an AP. 
>Fix:


>Release-Note:
>Audit-Trail:

From: =?ISO-8859-1?Q?Gustau_P=E9rez?= <gperez@entel.upc.edu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/163237: AR5416 as HostAP. Delays among clients when
Date: Wed, 14 Dec 2011 19:55:33 +0100

 Further tests show that when an iPhone associates with the AP, the 
 problem appears. As soon as the iPhone deassociates the latency goes down.
 
 Some tests where made. The tree elements during the tests were: the AP 
 Box, an iPhone and a FreeBSD 10/CURRENT laptop. The laptop was sending 
 icmp messages to the AP while the iPhone was associated.
 
 The AP Box has the 192.168.1.100/24 address. The
 
 A first test consisted of sending 10 icmp messages per second from the 
 laptop to the AP Box. The command used was:
 
      ping -c 0.1 192.168.1.100
 
   When doing this test the latency was constantly growing untill the 
 time taken to reach the box and back got up to around 110ms, then it 
 fell to around 10ms (which quite big, I would say three orders of 
 magnitude.I would have expected about 0.5ms). The frequency of the 
 phenomenon was of around 80 icmp messages (that is about 8 seconds of 
 icmp messages).
 
    A second test consisted of sending 100 icmp messages per second to 
 the box. Now the behavior was different. The latency keep falling to 
 around 20ms and then it suddenly grew to around 110ms. The frequency 
 this time was of about 8 icmp messages.
 
     I can obtain traces and upload them somewhere and share the links.
Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless 
Responsible-Changed-By: adrian 
Responsible-Changed-When: Sun Mar 11 15:55:21 UTC 2012 
Responsible-Changed-Why:  
Reassign/update. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=163237 
>Unformatted:
