summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/ath_hal/ar5416/ar5416.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-08-05 10:12:27 +0000
committeradrian <adrian@FreeBSD.org>2012-08-05 10:12:27 +0000
commit71347eff19f8956ccf764c6cd6c3f76870f530ca (patch)
tree8075242bf0c580ee8d147abca44c2d3288d9db65 /sys/dev/ath/ath_hal/ar5416/ar5416.h
parentc00a121761a94418efab6d83840096cb961b71d1 (diff)
downloadFreeBSD-src-71347eff19f8956ccf764c6cd6c3f76870f530ca.zip
FreeBSD-src-71347eff19f8956ccf764c6cd6c3f76870f530ca.tar.gz
Migrate the ath_hal_filltxdesc() API to take a list of buffer/seglen values.
The existing API only exposes 'seglen' (the current buffer (segment) length) with the data buffer pointer set in 'ds_data'. This is fine for the legacy DMA engine but it won't work for the EDMA engines. The EDMA engine has a significantly different TX descriptor layout. * The legacy DMA engine had a ds_data pointer at the same offset in the descriptor for both TX and RX buffers; * The EDMA engine has no ds_data for RX - the data is DMAed after the descriptor; * The EDMA engine has support for 4 TX buffer/segment pairs in the TX DMA descriptor; * The EDMA TX completion is in a different FIFO, and the driver will 'link' the status completion entry to a QCU by a "QCU ID". I don't know why it's just not filled in by the hardware, alas. So given that, here are the changes: * Instead of directly fondling 'ds_data' in ath_desc, change the ath_hal_filltxdesc() to take an array of buffer pointers as well as segment len pointers; * The EDMA TX completion status wants a descriptor and queue id. This (for now) uses bf_state.bfs_txq and will extract the hardware QCU ID from that. * .. and this is ugly and wasteful; it should change to just store the QCU in the bf_state and save 3/7 bytes in the process. Now, the weird crap: * The aggregate TX path was using bf_state->bfs_txq for the TXQ, rather than taking a function argument. I've tidied that up. * The multicast queue frames get put on a software TXQ and then that is appended to the hardware CABQ when appropriate. So for now, make sure that bf_state->bfs_txq points at the CABQ when adding frames to the multicast queue. * .. but the multicast queue TX path for now doesn't use the software queue and instead (a) directly sets up the descriptor contents at that point; (b) the frames on the vap->avp_mcastq are then just appended wholesale to the CABQ. So for now, I don't have to worry about making the multicast path work with aggregation or the per-TID software queue. Phew. What's left to do: * I need to modify the 11n ath_hal_chaintxdesc() API to do the same. I'll do that in a subsequent commit. * Remove bf_state.bfs_txq entirely and store the QCU as appropriate. * .. then do the runtime "is this going on the right HWQ?" checks using that, rather than comparing pointer values. Tested on: * AR9280 STA/AP * AR5416 STA/AP
Diffstat (limited to 'sys/dev/ath/ath_hal/ar5416/ar5416.h')
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416.h b/sys/dev/ath/ath_hal/ar5416/ar5416.h
index 75cd3df..9dc2005 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416.h
@@ -360,7 +360,8 @@ extern HAL_BOOL ar5416SetupXTxDesc(struct ath_hal *, struct ath_desc *,
u_int txRate2, u_int txRetries2,
u_int txRate3, u_int txRetries3);
extern HAL_BOOL ar5416FillTxDesc(struct ath_hal *ah, struct ath_desc *ds,
- u_int segLen, HAL_BOOL firstSeg, HAL_BOOL lastSeg,
+ HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList,
+ u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg,
const struct ath_desc *ds0);
extern HAL_STATUS ar5416ProcTxDesc(struct ath_hal *ah,
struct ath_desc *, struct ath_tx_status *);
OpenPOWER on IntegriCloud