summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-04-02 00:27:22 +0000
committeradrian <adrian@FreeBSD.org>2011-04-02 00:27:22 +0000
commite29d8f598e183d514dc98a5b6ffe282707d152cc (patch)
tree7e2889c27286ecf642953637a4102d61d876011d /sys/dev
parent4b46d6dec163f39e05a89baa0f2fea93deff5bd0 (diff)
downloadFreeBSD-src-e29d8f598e183d514dc98a5b6ffe282707d152cc.zip
FreeBSD-src-e29d8f598e183d514dc98a5b6ffe282707d152cc.tar.gz
From ath9k - clear the RX descriptor status before recycling it.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_recv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c b/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
index 4a480aa..251f826 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
@@ -67,6 +67,7 @@ ar5416SetupRxDesc(struct ath_hal *ah, struct ath_desc *ds,
uint32_t size, u_int flags)
{
struct ar5416_desc *ads = AR5416DESC(ds);
+ HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
HALASSERT((size &~ AR_BufLen) == 0);
@@ -77,6 +78,10 @@ ar5416SetupRxDesc(struct ath_hal *ah, struct ath_desc *ds,
/* this should be enough */
ads->ds_rxstatus8 &= ~AR_RxDone;
+ /* clear the rest of the status fields */
+ if (! pCap->halAutoSleepSupport)
+ OS_MEMZERO(&(ads->u), sizeof(ads->u));
+
return AH_TRUE;
}
OpenPOWER on IntegriCloud