From nobody@FreeBSD.org  Sat Jun 23 00:41:17 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 4FE0F106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Jun 2012 00:41:17 +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 3A9ED8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Jun 2012 00:41:17 +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 q5N0fHhQ011543
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Jun 2012 00:41:17 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q5N0fGlU011542;
	Sat, 23 Jun 2012 00:41:16 GMT
	(envelope-from nobody)
Message-Id: <201206230041.q5N0fGlU011542@red.freebsd.org>
Date: Sat, 23 Jun 2012 00:41:16 GMT
From: Adrian Chadd <adrian@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ath] ANI isn't triggering in a busy/noisy environment
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         169336
>Category:       kern
>Synopsis:       [ath] ANI isn't triggering in a busy/noisy environment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-wireless
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 23 00:50:07 UTC 2012
>Closed-Date:    
>Last-Modified:  Sat Jun 23 03:53:14 UTC 2012
>Originator:     Adrian Chadd
>Release:        9.0-STABLE i386, with -HEAD net80211/ath
>Organization:
>Environment:
>Description:
I've noticed that ANI isn't triggering when in a noisy environment.

* The ANI poll is called every 1/10th of a second, which updates listenTime;
* However, since we're still doing things via the MIB interrupt (grr), it's triggering frequently upon a hardware counter (in this case, CCK)
* .. so I see upwards of 1600 CCK errors a second;
* .. but ar5416ProcessMibIntr() calculates cckPhyErrCount based on how many just overflowed, so it's seeing the 200 CCK errors that just occured, and that's not greater than cckTrigHigh;
* .. so it's never calling ar5416AniCckTrigger().
* Then, ar5416AniRestart() is called, which sets ofdm/cck error count and listentime to 0.

Now, because of all of this, the ANI code never seems to trigger on _enough_ of any kind of CCK errors.

It's also unclear how the math in ar5416AniPoll() should work. From what I can gather, listenTime is likely supposed to be a value out of 1000. listenTime just never gets that high at the moment, as it keeps being cleared by ar5416AniRestart() whenever the MIB event fires.

>How-To-Repeat:

>Fix:
Not sure.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jun 23 03:53:01 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

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