svn commit: r239966 - head/sys/dev/ath/ath_hal/ar5212
Adrian Chadd
adrian at FreeBSD.org
Sat Sep 1 05:43:31 UTC 2012
Author: adrian
Date: Sat Sep 1 05:43:30 2012
New Revision: 239966
URL: http://svn.freebsd.org/changeset/base/239966
Log:
Fix the PHY / CRC error bug in the AR5212 HAL, which apparently also pops
up on (at least) the AR5413.
The 30 second summary - if a CRC error frame comes in during PHY error
processing, that CRC bit will be set for all subsequent frames until
a non-CRC error frame is processed.
So to allow for accurate PHY error processing (Radar, and ANI on the AR5212
HAL chips) just tag the frame as being both CRC and PHY - let the driver
decide what to do with it.
PR: kern/169362
Modified:
head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Sep 1 05:35:48 2012 (r239965)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Sep 1 05:43:30 2012 (r239966)
@@ -276,6 +276,14 @@ ar5212ProcRxDesc(struct ath_hal *ah, str
rs->rs_antenna = MS(ads->ds_rxstatus0, AR_RcvAntenna);
rs->rs_more = (ads->ds_rxstatus0 & AR_More) ? 1 : 0;
+ /*
+ * The AR5413 (at least) sometimes sets both AR_CRCErr and
+ * AR_PHYErr when reporting radar pulses. In this instance
+ * set HAL_RXERR_PHY as well as HAL_RXERR_CRC and
+ * let the driver layer figure out what to do.
+ *
+ * See PR kern/169362.
+ */
if ((ads->ds_rxstatus1 & AR_FrmRcvOK) == 0) {
/*
* These four bits should not be set together. The
@@ -286,9 +294,7 @@ ar5212ProcRxDesc(struct ath_hal *ah, str
* Consequently we filter them out here so we don't
* confuse and/or complicate drivers.
*/
- if (ads->ds_rxstatus1 & AR_CRCErr)
- rs->rs_status |= HAL_RXERR_CRC;
- else if (ads->ds_rxstatus1 & AR_PHYErr) {
+ if (ads->ds_rxstatus1 & AR_PHYErr) {
u_int phyerr;
rs->rs_status |= HAL_RXERR_PHY;
@@ -297,7 +303,11 @@ ar5212ProcRxDesc(struct ath_hal *ah, str
if (!AH5212(ah)->ah_hasHwPhyCounters &&
phyerr != HAL_PHYERR_RADAR)
ar5212AniPhyErrReport(ah, rs);
- } else if (ads->ds_rxstatus1 & AR_DecryptCRCErr)
+ }
+
+ if (ads->ds_rxstatus1 & AR_CRCErr)
+ rs->rs_status |= HAL_RXERR_CRC;
+ else if (ads->ds_rxstatus1 & AR_DecryptCRCErr)
rs->rs_status |= HAL_RXERR_DECRYPT;
else if (ads->ds_rxstatus1 & AR_MichaelErr)
rs->rs_status |= HAL_RXERR_MIC;
More information about the svn-src-head
mailing list