From nobody@FreeBSD.org  Wed Apr  4 15:10:05 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B0346106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  4 Apr 2012 15:10:05 +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 9233D8FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  4 Apr 2012 15:10:05 +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 q34FA5fF061629
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 4 Apr 2012 15:10:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q34FA5YJ061628;
	Wed, 4 Apr 2012 15:10:05 GMT
	(envelope-from nobody)
Message-Id: <201204041510.q34FA5YJ061628@red.freebsd.org>
Date: Wed, 4 Apr 2012 15:10:05 GMT
From: Andrew Atrens <andrew@atrens.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: in 802.11n mode for FreeBSD AP, having a station in powersave cripples AP TX.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         166642
>Category:       kern
>Synopsis:       [ieee80211] [patch] in 802.11n mode for FreeBSD AP, having a station in powersave cripples AP TX.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-wireless
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 04 15:20:01 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun Apr 08 05:54:20 UTC 2012
>Originator:     Andrew Atrens
>Release:        trunk
>Organization:
>Environment:
not platform specific.
>Description:
This little bit of code (wrapped by me in notanymore) absolutely cripples FreeBSD 802.11n AP  tx throughput if one or more stations is in power save mode (or as macbooks and ipods do - going in and out of power save mode constantly).

All ping times also ratchet from sub 1ms up to 100+ms.


-- atrens@andrew: /localdisk/freebsd/sys/dev/ath (11:02) --
$ svn diff .
Index: if_ath_tx.c
===================================================================
--- if_ath_tx.c (revision 233851)
+++ if_ath_tx.c (working copy)
@@ -1451,8 +1451,10 @@
         * anyone.  This is likely a very suboptimal way of dealing
         * with things.
         */
+#if notanymore
        if ((! is_ampdu) && (vap->iv_ps_sta || avp->av_mcastq.axq_depth))
                txq = &avp->av_mcastq;
+#endif
 
        /* Do the generic frame setup */
        /* XXX should just bzero the bf_state? */



>How-To-Repeat:
Set up a FreeBSD AP in 802.11n mode and start a ping to any station.  Turn on your ipod and let it connect to the network.  You will see the pings ratchet from sub 1ms up to 100+ms .. FreeBSD AP tx throughput will also be crippled.
>Fix:

Workaround for me is to remove the mentioned code snippet. I'm not sure of the original intent of that change but the net effect of this bug is likely more deleterious than the problem the change attempted to address.

 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Apr 5 01:41:46 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166642 
State-Changed-From-To: open->patched 
State-Changed-By: adrian 
State-Changed-When: Sun Apr 8 05:53:39 UTC 2012 
State-Changed-Why:  
I've patched this in r234009. 

I busted things, my bad. :-) 


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