Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Dec 2011 02:30:15 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-wireless@FreeBSD.org
Subject:   Re: kern/163312: commit references a PR
Message-ID:  <201112230230.pBN2UFXU081305@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/163312; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/163312: commit references a PR
Date: Fri, 23 Dec 2011 02:21:36 +0000 (UTC)

 Author: adrian
 Date: Fri Dec 23 02:21:22 2011
 New Revision: 228829
 URL: http://svn.freebsd.org/changeset/base/228829
 
 Log:
   Add a temporary debugging statement in order to try and identify what's
   going on with the occasional garbage rs_antenna field reported by AR9285
   users.
   
   I've discovered that the 11n NICs only fill out the entire RX status
   descriptor on the final descriptor in an aggregate. Some of the fields
   (notably RSSI) are complete nonsense for A-MPDU subframes. This may
   be another example of this.
   
   The driver doesn't currently toss out statistics for non-final aggregate
   frames. It's likely that this should be done.
   
   If any users hit this particular debugging message they should report it
   immediately to freebsd-wireless@freebsd.org - please ensure you have
   ATH_DEBUG enabled so it prints out the full receive descriptor.
   
   PR:		kern/163312
 
 Modified:
   head/sys/dev/ath/if_ath.c
 
 Modified: head/sys/dev/ath/if_ath.c
 ==============================================================================
 --- head/sys/dev/ath/if_ath.c	Fri Dec 23 02:13:42 2011	(r228828)
 +++ head/sys/dev/ath/if_ath.c	Fri Dec 23 02:21:22 2011	(r228829)
 @@ -4111,6 +4111,35 @@ rx_accept:
  			m->m_pkthdr.len = len;
  		}
  
 +		/*
 +		 * Validate rs->rs_antenna.
 +		 *
 +		 * Some users w/ AR9285 NICs have reported crashes
 +		 * here because rs_antenna field is bogusly large.
 +		 * Let's enforce the maximum antenna limit of 8
 +		 * (and it shouldn't be hard coded, but that's a
 +		 * separate problem) and if there's an issue, print
 +		 * out an error and adjust rs_antenna to something
 +		 * sensible.
 +		 *
 +		 * This code should be removed once the actual
 +		 * root cause of the issue has been identified.
 +		 * For example, it may be that the rs_antenna
 +		 * field is only valid for the lsat frame of
 +		 * an aggregate and it just happens that it is
 +		 * "mostly" right. (This is a general statement -
 +		 * the majority of the statistics are only valid
 +		 * for the last frame in an aggregate.
 +		 */
 +		if (rs->rs_antenna > 7) {
 +			device_printf(sc->sc_dev, "%s: rs_antenna > 7 (%d)\n",
 +			    __func__, rs->rs_antenna);
 +#ifdef	ATH_DEBUG
 +			ath_printrxbuf(sc, bf, 0, status == HAL_OK);
 +#endif /* ATH_DEBUG */
 +			rs->rs_antenna = 0;	/* XXX better than nothing */
 +		}
 +
  		ifp->if_ipackets++;
  		sc->sc_stats.ast_ant_rx[rs->rs_antenna]++;
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112230230.pBN2UFXU081305>