summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ath/if_ath_tx_edma.c22
-rw-r--r--sys/dev/ath/if_athvar.h1
2 files changed, 20 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath_tx_edma.c b/sys/dev/ath/if_ath_tx_edma.c
index c5db404..c4dc384 100644
--- a/sys/dev/ath/if_ath_tx_edma.c
+++ b/sys/dev/ath/if_ath_tx_edma.c
@@ -119,17 +119,33 @@ __FBSDID("$FreeBSD$");
/*
* some general macros
- */
+ */
#define INCR(_l, _sz) (_l) ++; (_l) &= ((_sz) - 1)
#define DECR(_l, _sz) (_l) --; (_l) &= ((_sz) - 1)
+/*
+ * XXX doesn't belong here, and should be tunable
+ */
+#define ATH_TXSTATUS_RING_SIZE 512
+
MALLOC_DECLARE(M_ATHDEV);
static int
ath_edma_dma_txsetup(struct ath_softc *sc)
{
+ int error;
+
+ error = ath_descdma_alloc_desc(sc, &sc->sc_txsdma,
+ NULL, "txcomp", sc->sc_tx_statuslen, ATH_TXSTATUS_RING_SIZE);
+ if (error != 0)
+ return (error);
+
+ ath_hal_setuptxstatusring(sc->sc_ah,
+ (void *) sc->sc_txsdma.dd_desc,
+ sc->sc_txsdma.dd_desc_paddr,
+ ATH_TXSTATUS_RING_SIZE);
+
- /* XXX placeholder */
return (0);
}
@@ -137,7 +153,7 @@ static int
ath_edma_dma_txteardown(struct ath_softc *sc)
{
- /* XXX placeholder */
+ ath_descdma_cleanup(sc, &sc->sc_txsdma, NULL);
return (0);
}
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index c5fb3be..932ce34 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -557,6 +557,7 @@ struct ath_softc {
int sc_txbuf_cnt; /* how many buffers avail */
struct ath_descdma sc_txdma_mgmt; /* mgmt TX descriptors */
ath_bufhead sc_txbuf_mgmt; /* mgmt transmit buffer */
+ struct ath_descdma sc_txsdma; /* EDMA TX status desc's */
struct mtx sc_txbuflock; /* txbuf lock */
char sc_txname[12]; /* e.g. "ath0_buf" */
u_int sc_txqsetup; /* h/w queues setup */
OpenPOWER on IntegriCloud