From nobody@FreeBSD.org  Thu Sep 20 17:47:28 2012
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 B5F071065902
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Sep 2012 17:47:28 +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 97C1D8FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Sep 2012 17:47:28 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8KHlS4O047949
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Sep 2012 17:47:28 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8KHlSWH047948;
	Thu, 20 Sep 2012 17:47:28 GMT
	(envelope-from nobody)
Message-Id: <201209201747.q8KHlSWH047948@red.freebsd.org>
Date: Thu, 20 Sep 2012 17:47:28 GMT
From: Adrian Chadd <adrian@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ath] [net80211] BAR TX overlapping with key renegotiation is causing issues?
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171816
>Category:       kern
>Synopsis:       [ath] [net80211] BAR TX overlapping with key renegotiation is causing issues?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-wireless
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 20 17:50:13 UTC 2012
>Closed-Date:    Fri Oct 05 14:01:05 UTC 2012
>Last-Modified:  Fri Oct 05 14:01:05 UTC 2012
>Originator:     Adrian Chadd
>Release:        -HEAD
>Organization:
>Environment:
FreeBSD freebsd-wifi-build 10.0-CURRENT FreeBSD 10.0-CURRENT #62 r240628:240733M: Wed Dec 31 16:00:00 PST 1969     adrian@dummy:/home
reebsd/svn/src/sys/RSPRO  mips                                    

>Description:
I'm seeing disconnects via hostapd whenever I'm doing a TCP iperf test. I think this is a recent thing (from CLRDMASK/filtered frame changes.)

See:


ath0: ath_tx_tid_bar_suspend: tid=0xc0503e84, bar_wait=0, bar_tx=0, called
ath0: ath_tx_tid_bar_tx_ready: tid=0xc0503e84 (0), bar ready
ath0: ath_tx_tid_bar_tx: tid=0xc0503e84, called
ath0: ath_tx_tid_bar_tx: tid=0xc0503e84, new BAW left edge=248
ath0: ath_bar_response: called; tap=0xc05022c0, atid=0xc0503e84, txa_tid=0, atid->tid=0, status=0, attempts=1
ath0: ath_tx_tid_bar_unsuspend: tid=0xc0503e84, called
wlan0: [8c:7b:9d:d6:65:ba] station deauth via MLME (reason 2)
wlan0: [8c:7b:9d:d6:65:ba] station with aid 1 leaves
ath0: ath_tx_tid_drain_print: node 0xc0502000: bf=0xc0428e50: addbaw=0, dobaw=1, seqno=2957, retry=0
ath0: ath_tx_tid_drain_print: node 0xc0502000: bf=0xc0428e50: txq axq_depth=2, axq_aggr_depth=2
ath0: ath_tx_tid_drain_print: node 0xc0502000: bf=0xc0428e50: tid txq_depth=4 hwq_depth=2, bar_wait=0, isfiltered=0
ath0: ath_tx_tid_drain_print: node 0xc0502000: tid 0: sched=0, paused=0, incomp=0, baw_head=60, baw_tail=65 txa_start=2952, ni_txseqs
FRDS 00:0d:60:38:72:88->8c:7b:9d:d6:65:ba(00:03:7f:0c:e8:19) data QoS [TID 0] WEP [IV d8 52 00 b5 00 00 KID 0] 0M
 8842 0000 8c7b 9dd6 65ba 0003 7f0c e819 000d 6038 7288 d0b8 0000 0000 d852 0020 b500 0000 aaaa 0300 0000 0800
ath0: ath_tx_tid_drain_pkt: wasn't added: seqno 2957
ath0: ath_tx_tid_drain_pkt: wasn't added: seqno 2958
ath0: ath_tx_tid_drain_pkt: wasn't added: seqno 2959
ath0: ath_tx_tid_drain_pkt: wasn't added: seqno 2960
ath0: ath_tx_tid_drain_print: node 0xc0502000: bf=0xc0441110: addbaw=0, dobaw=0, seqno=0, retry=0
ath0: ath_tx_tid_drain_print: node 0xc0502000: bf=0xc0441110: txq axq_depth=2, axq_aggr_depth=2
ath0: ath_tx_tid_drain_print: node 0xc0502000: bf=0xc0441110: tid txq_depth=1 hwq_depth=0, bar_wait=0, isfiltered=0
ath0: ath_tx_tid_drain_print: node 0xc0502000: tid 16: sched=0, paused=0, incomp=0, baw_head=0, baw_tail=0 txa_start=-1, ni_txseqs=29
NODS 00:03:7f:0c:e8:19->8c:7b:9d:d6:65:ba(00:03:7f:0c:e8:19) deauth 0M
 c000 0000 8c7b 9dd6 65ba 0003 7f0c e819 0003 7f0c e819 c001 0200
ath0: ath_tx_default_comp: bf 0xc0428e50: seqno 2957: dobaw should've been cleared!
ath0: ath_tx_default_comp: bf 0xc042df10: seqno 2958: dobaw should've been cleared!
ath0: ath_tx_default_comp: bf 0xc042a4a0: seqno 2959: dobaw should've been cleared!
ath0: ath_tx_default_comp: bf 0xc043ab10: seqno 2960: dobaw should've been cleared!
wlan0: [8c:7b:9d:d6:65:ba] RSN ie: mc 3/0 uc 3/0 key 2 caps 0x0
wlan0: [8c:7b:9d:d6:65:ba] station associated at aid 1: short preamble, short slot time, QoS, HT40 (+AMPDU)
wlan0: [8c:7b:9d:d6:65:ba] station unauthorize via MLME
wlan0: [8c:7b:9d:d6:65:ba] station authorize via MLME

>How-To-Repeat:
* configure 802.11n AP + WPA2-PSK
* wlandebug +assoc +state
* sysctl dev.ath.X.debug=0x10000000 (BAR SW TX debug)
* iperf TCP test from wireless STA -> wired server
* wait
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Oct 5 03:44:26 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171816 
State-Changed-From-To: open->closed 
State-Changed-By: adrian 
State-Changed-When: Fri Oct 5 13:59:11 UTC 2012 
State-Changed-Why:  
This turned out to be an invalid bug - the actual cause of my 
disconnects were "EAPOL frames were non-QoS and dumped into TID 16; 
then they'd be put in the same hardware TXQ as best effort traffic; 
any non-QoS broadcast/multicast traffic (eg ARP) would end up in TID 
16." 

Then "if any powersave occured, the EAPOL frames may be stuck in 
a software queue; the ARP frames would be stuffed into the CABQ 
and the ARP frames would go out first. But if they came in AFTER 
the EAPOL frame, the EAPOL frame would have a sequence number 
which is earlier and it'd be dropped.." 


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