summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-05-11 18:13:38 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-05-11 18:13:38 +0000
commit7cdc4f9eb78d328200a38185a05e059793b770a0 (patch)
treeba768ec940abc5798f3776c3ecdbb4382949b3aa
parent372869fe603bd9497c86ff9f35fb8c498d1a4153 (diff)
always reset the Tx status descriptor before leaving ar9003_tx_process().
-rw-r--r--sys/dev/ic/ar9003.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/ic/ar9003.c b/sys/dev/ic/ar9003.c
index 0b682f3dba2..5c9edc7dad5 100644
--- a/sys/dev/ic/ar9003.c
+++ b/sys/dev/ic/ar9003.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9003.c,v 1.2 2010/05/11 17:59:39 damien Exp $ */
+/* $OpenBSD: ar9003.c,v 1.3 2010/05/11 18:13:37 damien Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -957,17 +957,19 @@ ar9003_tx_process(struct athn_softc *sc)
/* Check that it is a valid Tx status descriptor. */
if ((ds->ds_info & (AR_TXI_DESC_ID_M | AR_TXI_DESC_TX)) !=
- (SM(AR_TXI_DESC_ID, AR_VENDOR_ATHEROS) | AR_TXI_DESC_TX))
+ (SM(AR_TXI_DESC_ID, AR_VENDOR_ATHEROS) | AR_TXI_DESC_TX)) {
+ memset(ds, 0, sizeof(*ds));
return (0);
-
+ }
/* Retrieve the queue that was used to send this PDU. */
qid = MS(ds->ds_info, AR_TXI_QCU_NUM);
txq = &sc->txq[qid];
bf = SIMPLEQ_FIRST(&txq->head);
- if (__predict_false(bf == NULL))
+ if (__predict_false(bf == NULL)) {
+ memset(ds, 0, sizeof(*ds));
return (0);
-
+ }
SIMPLEQ_REMOVE_HEAD(&txq->head, bf_list);
ifp->if_opackets++;