athvar.h revision 1.5 1 1.5 ichiro /* $NetBSD: athvar.h,v 1.5 2003/10/16 07:55:18 ichiro Exp $ */
2 1.4 itojun
3 1.1 dyoung /*-
4 1.1 dyoung * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
5 1.1 dyoung * All rights reserved.
6 1.1 dyoung *
7 1.1 dyoung * Redistribution and use in source and binary forms, with or without
8 1.1 dyoung * modification, are permitted provided that the following conditions
9 1.1 dyoung * are met:
10 1.1 dyoung * 1. Redistributions of source code must retain the above copyright
11 1.1 dyoung * notice, this list of conditions and the following disclaimer,
12 1.1 dyoung * without modification.
13 1.1 dyoung * 2. Redistributions in binary form must reproduce at minimum a disclaimer
14 1.1 dyoung * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
15 1.1 dyoung * redistribution must be conditioned upon including a substantially
16 1.1 dyoung * similar Disclaimer requirement for further binary redistribution.
17 1.1 dyoung * 3. Neither the names of the above-listed copyright holders nor the names
18 1.1 dyoung * of any contributors may be used to endorse or promote products derived
19 1.1 dyoung * from this software without specific prior written permission.
20 1.1 dyoung *
21 1.1 dyoung * Alternatively, this software may be distributed under the terms of the
22 1.1 dyoung * GNU General Public License ("GPL") version 2 as published by the Free
23 1.1 dyoung * Software Foundation.
24 1.1 dyoung *
25 1.1 dyoung * NO WARRANTY
26 1.1 dyoung * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 1.1 dyoung * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 1.1 dyoung * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
29 1.1 dyoung * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
30 1.1 dyoung * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
31 1.1 dyoung * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 dyoung * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 dyoung * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
34 1.1 dyoung * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 dyoung * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 1.1 dyoung * THE POSSIBILITY OF SUCH DAMAGES.
37 1.1 dyoung *
38 1.1 dyoung * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.6 2003/09/05 22:22:49 sam Exp $
39 1.1 dyoung */
40 1.1 dyoung
41 1.1 dyoung /*
42 1.1 dyoung * Defintions for the Atheros Wireless LAN controller driver.
43 1.1 dyoung */
44 1.1 dyoung #ifndef _DEV_ATH_ATHVAR_H
45 1.1 dyoung #define _DEV_ATH_ATHVAR_H
46 1.1 dyoung
47 1.2 dyoung #ifdef __FreeBSD__
48 1.1 dyoung #include <sys/taskqueue.h>
49 1.1 dyoung
50 1.2 dyoung #include <contrib/dev/ic/ah.h>
51 1.2 dyoung #else
52 1.2 dyoung #include <../contrib/sys/dev/ic/athhal.h>
53 1.2 dyoung #endif
54 1.1 dyoung #include <net80211/ieee80211_radiotap.h>
55 1.2 dyoung #ifdef __FreeBSD__
56 1.1 dyoung #include <dev/ath/if_athioctl.h>
57 1.2 dyoung #else
58 1.2 dyoung #include <dev/ic/athioctl.h>
59 1.2 dyoung #endif
60 1.1 dyoung
61 1.1 dyoung #define ATH_TIMEOUT 1000
62 1.1 dyoung
63 1.1 dyoung #define ATH_RXBUF 40 /* number of RX buffers */
64 1.1 dyoung #define ATH_TXBUF 60 /* number of TX buffers */
65 1.1 dyoung #define ATH_TXDESC 8 /* number of descriptors per buffer */
66 1.1 dyoung
67 1.1 dyoung /* driver-specific node */
68 1.1 dyoung struct ath_node {
69 1.1 dyoung struct ieee80211_node an_node; /* base class */
70 1.1 dyoung u_int an_tx_ok; /* tx ok pkt */
71 1.1 dyoung u_int an_tx_err; /* tx !ok pkt */
72 1.1 dyoung u_int an_tx_retr; /* tx retry count */
73 1.1 dyoung int an_tx_upper; /* tx upper rate req cnt */
74 1.1 dyoung u_int an_tx_antenna; /* antenna for last good frame */
75 1.1 dyoung u_int an_rx_antenna; /* antenna for last rcvd frame */
76 1.1 dyoung };
77 1.1 dyoung #define ATH_NODE(_n) ((struct ath_node *)(_n))
78 1.1 dyoung
79 1.1 dyoung struct ath_buf {
80 1.1 dyoung TAILQ_ENTRY(ath_buf) bf_list;
81 1.2 dyoung bus_dmamap_t bf_dmamap; /* DMA map of the buffer */
82 1.2 dyoung #ifdef __FreeBSD__
83 1.1 dyoung int bf_nseg;
84 1.2 dyoung bus_dma_segment_t bf_segs[ATH_MAX_SCATTER];
85 1.2 dyoung bus_size_t bf_mapsize;
86 1.2 dyoung #else
87 1.2 dyoung #define bf_nseg bf_dmamap->dm_nsegs
88 1.2 dyoung #define bf_mapsize bf_dmamap->dm_mapsize
89 1.2 dyoung #define bf_segs bf_dmamap->dm_segs
90 1.2 dyoung #endif
91 1.1 dyoung struct ath_desc *bf_desc; /* virtual addr of desc */
92 1.1 dyoung bus_addr_t bf_daddr; /* physical addr of desc */
93 1.1 dyoung struct mbuf *bf_m; /* mbuf for buf */
94 1.1 dyoung struct ieee80211_node *bf_node; /* pointer to the node */
95 1.1 dyoung #define ATH_MAX_SCATTER 64
96 1.1 dyoung };
97 1.1 dyoung
98 1.1 dyoung struct ath_softc {
99 1.2 dyoung #ifdef __NetBSD__
100 1.2 dyoung struct device sc_dev;
101 1.2 dyoung #endif
102 1.1 dyoung struct ieee80211com sc_ic; /* IEEE 802.11 common */
103 1.3 ichiro #ifndef __FreeBSD__
104 1.3 ichiro int (*sc_enable)(struct ath_softc *);
105 1.3 ichiro void (*sc_disable)(struct ath_softc *);
106 1.3 ichiro void (*sc_power)(struct ath_softc *, int);
107 1.3 ichiro #endif
108 1.1 dyoung int (*sc_newstate)(struct ieee80211com *,
109 1.1 dyoung enum ieee80211_state, int);
110 1.2 dyoung #ifdef __FreeBSD__
111 1.1 dyoung device_t sc_dev;
112 1.2 dyoung #endif
113 1.1 dyoung bus_space_tag_t sc_st; /* bus space tag */
114 1.1 dyoung bus_space_handle_t sc_sh; /* bus space handle */
115 1.1 dyoung bus_dma_tag_t sc_dmat; /* bus DMA tag */
116 1.2 dyoung #ifdef __FreeBSD__
117 1.1 dyoung struct mtx sc_mtx; /* master lock (recursive) */
118 1.2 dyoung #endif
119 1.1 dyoung struct ath_hal *sc_ah; /* Atheros HAL */
120 1.1 dyoung unsigned int sc_invalid : 1,/* disable hardware accesses */
121 1.1 dyoung sc_have11g : 1,/* have 11g support */
122 1.1 dyoung sc_doani : 1,/* dynamic noise immunity */
123 1.1 dyoung sc_probing : 1;/* probing AP on beacon miss */
124 1.1 dyoung /* rate tables */
125 1.1 dyoung const HAL_RATE_TABLE *sc_rates[IEEE80211_MODE_MAX];
126 1.1 dyoung const HAL_RATE_TABLE *sc_currates; /* current rate table */
127 1.1 dyoung enum ieee80211_phymode sc_curmode; /* current phy mode */
128 1.1 dyoung u_int8_t sc_rixmap[256]; /* IEEE to h/w rate table ix */
129 1.1 dyoung u_int8_t sc_hwmap[32]; /* h/w rate ix to IEEE table */
130 1.1 dyoung HAL_INT sc_imask; /* interrupt mask copy */
131 1.1 dyoung
132 1.2 dyoung #ifdef __FreeBSD__
133 1.1 dyoung struct bpf_if *sc_drvbpf;
134 1.2 dyoung #else
135 1.2 dyoung caddr_t sc_drvbpf;
136 1.2 dyoung #endif
137 1.1 dyoung union {
138 1.1 dyoung struct ath_tx_radiotap_header th;
139 1.1 dyoung u_int8_t pad[64];
140 1.1 dyoung } u_tx_rt;
141 1.1 dyoung union {
142 1.1 dyoung struct ath_rx_radiotap_header th;
143 1.1 dyoung u_int8_t pad[64];
144 1.1 dyoung } u_rx_rt;
145 1.1 dyoung
146 1.1 dyoung struct ath_desc *sc_desc; /* TX/RX descriptors */
147 1.1 dyoung bus_dma_segment_t sc_dseg;
148 1.2 dyoung #ifdef __NetBSD__
149 1.2 dyoung int sc_dnseg; /* number of segments */
150 1.2 dyoung #endif
151 1.1 dyoung bus_dmamap_t sc_ddmamap; /* DMA map for descriptors */
152 1.1 dyoung bus_addr_t sc_desc_paddr; /* physical addr of sc_desc */
153 1.1 dyoung bus_addr_t sc_desc_len; /* size of sc_desc */
154 1.1 dyoung
155 1.2 dyoung ath_task_t sc_fataltask; /* fatal int processing */
156 1.2 dyoung ath_task_t sc_rxorntask; /* rxorn int processing */
157 1.1 dyoung
158 1.1 dyoung TAILQ_HEAD(, ath_buf) sc_rxbuf; /* receive buffer */
159 1.1 dyoung u_int32_t *sc_rxlink; /* link ptr in last RX desc */
160 1.2 dyoung ath_task_t sc_rxtask; /* rx int processing */
161 1.1 dyoung
162 1.1 dyoung u_int sc_txhalq; /* HAL q for outgoing frames */
163 1.1 dyoung u_int32_t *sc_txlink; /* link ptr in last TX desc */
164 1.1 dyoung int sc_tx_timer; /* transmit timeout */
165 1.1 dyoung TAILQ_HEAD(, ath_buf) sc_txbuf; /* transmit buffer */
166 1.2 dyoung #ifdef __FreeBSD__
167 1.1 dyoung struct mtx sc_txbuflock; /* txbuf lock */
168 1.2 dyoung #endif
169 1.1 dyoung TAILQ_HEAD(, ath_buf) sc_txq; /* transmitting queue */
170 1.2 dyoung #ifdef __FreeBSD__
171 1.1 dyoung struct mtx sc_txqlock; /* lock on txq and txlink */
172 1.2 dyoung #endif
173 1.2 dyoung ath_task_t sc_txtask; /* tx int processing */
174 1.1 dyoung
175 1.1 dyoung u_int sc_bhalq; /* HAL q for outgoing beacons */
176 1.1 dyoung struct ath_buf *sc_bcbuf; /* beacon buffer */
177 1.1 dyoung struct ath_buf *sc_bufptr; /* allocated buffer ptr */
178 1.2 dyoung ath_task_t sc_swbatask; /* swba int processing */
179 1.2 dyoung ath_task_t sc_bmisstask; /* bmiss int processing */
180 1.1 dyoung
181 1.1 dyoung struct callout sc_cal_ch; /* callout handle for cals */
182 1.1 dyoung struct callout sc_scan_ch; /* callout handle for scan */
183 1.1 dyoung struct ath_stats sc_stats; /* interface statistics */
184 1.3 ichiro
185 1.3 ichiro #ifndef __FreeBSD__
186 1.3 ichiro void *sc_sdhook; /* shutdown hook */
187 1.3 ichiro void *sc_powerhook; /* power management hook */
188 1.3 ichiro u_int sc_flags; /* misc flags */
189 1.3 ichiro #endif
190 1.1 dyoung };
191 1.3 ichiro #ifndef __FreeBSD__
192 1.3 ichiro #define ATH_ATTACHED 0x0001 /* attach has succeeded */
193 1.3 ichiro #define ATH_ENABLED 0x0002 /* chip is enabled */
194 1.3 ichiro
195 1.3 ichiro #define ATH_IS_ENABLED(sc) ((sc)->sc_flags & ATH_ENABLED)
196 1.3 ichiro #endif
197 1.3 ichiro
198 1.1 dyoung #define sc_tx_th u_tx_rt.th
199 1.1 dyoung #define sc_rx_th u_rx_rt.th
200 1.1 dyoung
201 1.1 dyoung int ath_attach(u_int16_t, struct ath_softc *);
202 1.1 dyoung int ath_detach(struct ath_softc *);
203 1.3 ichiro void ath_resume(struct ath_softc *, int);
204 1.3 ichiro void ath_suspend(struct ath_softc *, int);
205 1.5 ichiro #ifdef __NetBSD__
206 1.3 ichiro int ath_activate(struct device *, enum devact);
207 1.3 ichiro void ath_power(int, void *);
208 1.3 ichiro #endif
209 1.2 dyoung #ifdef __FreeBSD__
210 1.5 ichiro void ath_shutdown(struct ath_softc *);
211 1.1 dyoung void ath_intr(void *);
212 1.2 dyoung #else
213 1.5 ichiro void ath_shutdown(void *);
214 1.2 dyoung int ath_intr(void *);
215 1.2 dyoung #endif
216 1.1 dyoung
217 1.1 dyoung /*
218 1.1 dyoung * HAL definitions to comply with local coding convention.
219 1.1 dyoung */
220 1.1 dyoung #define ath_hal_reset(_ah, _opmode, _chan, _outdoor, _pstatus) \
221 1.1 dyoung ((*(_ah)->ah_reset)((_ah), (_opmode), (_chan), (_outdoor), (_pstatus)))
222 1.1 dyoung #define ath_hal_getratetable(_ah, _mode) \
223 1.1 dyoung ((*(_ah)->ah_getRateTable)((_ah), (_mode)))
224 1.1 dyoung #define ath_hal_getregdomain(_ah) \
225 1.1 dyoung ((*(_ah)->ah_getRegDomain)((_ah)))
226 1.1 dyoung #define ath_hal_getcountrycode(_ah) (_ah)->ah_countryCode
227 1.1 dyoung #define ath_hal_getmac(_ah, _mac) \
228 1.1 dyoung ((*(_ah)->ah_getMacAddress)((_ah), (_mac)))
229 1.1 dyoung #define ath_hal_detach(_ah) \
230 1.1 dyoung ((*(_ah)->ah_detach)((_ah)))
231 1.1 dyoung #define ath_hal_intrset(_ah, _mask) \
232 1.1 dyoung ((*(_ah)->ah_setInterrupts)((_ah), (_mask)))
233 1.1 dyoung #define ath_hal_intrget(_ah) \
234 1.1 dyoung ((*(_ah)->ah_getInterrupts)((_ah)))
235 1.1 dyoung #define ath_hal_intrpend(_ah) \
236 1.1 dyoung ((*(_ah)->ah_isInterruptPending)((_ah)))
237 1.1 dyoung #define ath_hal_getisr(_ah, _pmask) \
238 1.1 dyoung ((*(_ah)->ah_getPendingInterrupts)((_ah), (_pmask)))
239 1.1 dyoung #define ath_hal_updatetxtriglevel(_ah, _inc) \
240 1.1 dyoung ((*(_ah)->ah_updateTxTrigLevel)((_ah), (_inc)))
241 1.1 dyoung #define ath_hal_setpower(_ah, _mode, _sleepduration) \
242 1.1 dyoung ((*(_ah)->ah_setPowerMode)((_ah), (_mode), AH_TRUE, (_sleepduration)))
243 1.1 dyoung #define ath_hal_keyreset(_ah, _ix) \
244 1.1 dyoung ((*(_ah)->ah_resetKeyCacheEntry)((_ah), (_ix)))
245 1.1 dyoung #define ath_hal_keyset(_ah, _ix, _pk) \
246 1.1 dyoung ((*(_ah)->ah_setKeyCacheEntry)((_ah), (_ix), (_pk), NULL, AH_FALSE))
247 1.1 dyoung #define ath_hal_keyisvalid(_ah, _ix) \
248 1.1 dyoung (((*(_ah)->ah_isKeyCacheEntryValid)((_ah), (_ix))))
249 1.1 dyoung #define ath_hal_keysetmac(_ah, _ix, _mac) \
250 1.1 dyoung ((*(_ah)->ah_setKeyCacheEntryMac)((_ah), (_ix), (_mac)))
251 1.1 dyoung #define ath_hal_getrxfilter(_ah) \
252 1.1 dyoung ((*(_ah)->ah_getRxFilter)((_ah)))
253 1.1 dyoung #define ath_hal_setrxfilter(_ah, _filter) \
254 1.1 dyoung ((*(_ah)->ah_setRxFilter)((_ah), (_filter)))
255 1.1 dyoung #define ath_hal_setmcastfilter(_ah, _mfilt0, _mfilt1) \
256 1.1 dyoung ((*(_ah)->ah_setMulticastFilter)((_ah), (_mfilt0), (_mfilt1)))
257 1.1 dyoung #define ath_hal_waitforbeacon(_ah, _bf) \
258 1.1 dyoung ((*(_ah)->ah_waitForBeaconDone)((_ah), (_bf)->bf_daddr))
259 1.1 dyoung #define ath_hal_putrxbuf(_ah, _bufaddr) \
260 1.1 dyoung ((*(_ah)->ah_setRxDP)((_ah), (_bufaddr)))
261 1.1 dyoung #define ath_hal_gettsf32(_ah) \
262 1.1 dyoung ((*(_ah)->ah_getTsf32)((_ah)))
263 1.1 dyoung #define ath_hal_gettsf64(_ah) \
264 1.1 dyoung ((*(_ah)->ah_getTsf64)((_ah)))
265 1.1 dyoung #define ath_hal_resettsf(_ah) \
266 1.1 dyoung ((*(_ah)->ah_resetTsf)((_ah)))
267 1.1 dyoung #define ath_hal_rxena(_ah) \
268 1.1 dyoung ((*(_ah)->ah_enableReceive)((_ah)))
269 1.1 dyoung #define ath_hal_puttxbuf(_ah, _q, _bufaddr) \
270 1.1 dyoung ((*(_ah)->ah_setTxDP)((_ah), (_q), (_bufaddr)))
271 1.1 dyoung #define ath_hal_gettxbuf(_ah, _q) \
272 1.1 dyoung ((*(_ah)->ah_getTxDP)((_ah), (_q)))
273 1.1 dyoung #define ath_hal_getrxbuf(_ah) \
274 1.1 dyoung ((*(_ah)->ah_getRxDP)((_ah)))
275 1.1 dyoung #define ath_hal_txstart(_ah, _q) \
276 1.1 dyoung ((*(_ah)->ah_startTxDma)((_ah), (_q)))
277 1.1 dyoung #define ath_hal_setchannel(_ah, _chan) \
278 1.1 dyoung ((*(_ah)->ah_setChannel)((_ah), (_chan)))
279 1.1 dyoung #define ath_hal_calibrate(_ah, _chan) \
280 1.1 dyoung ((*(_ah)->ah_perCalibration)((_ah), (_chan)))
281 1.1 dyoung #define ath_hal_setledstate(_ah, _state) \
282 1.1 dyoung ((*(_ah)->ah_setLedState)((_ah), (_state)))
283 1.1 dyoung #define ath_hal_beaconinit(_ah, _opmode, _nextb, _bperiod) \
284 1.1 dyoung ((*(_ah)->ah_beaconInit)((_ah), (_opmode), (_nextb), (_bperiod)))
285 1.1 dyoung #define ath_hal_beaconreset(_ah) \
286 1.1 dyoung ((*(_ah)->ah_resetStationBeaconTimers)((_ah)))
287 1.1 dyoung #define ath_hal_beacontimers(_ah, _bs, _tsf, _dc, _cc) \
288 1.1 dyoung ((*(_ah)->ah_setStationBeaconTimers)((_ah), (_bs), (_tsf), \
289 1.1 dyoung (_dc), (_cc)))
290 1.1 dyoung #define ath_hal_setassocid(_ah, _bss, _associd) \
291 1.1 dyoung ((*(_ah)->ah_writeAssocid)((_ah), (_bss), (_associd), 0))
292 1.1 dyoung #define ath_hal_setopmode(_ah, _opmode) \
293 1.1 dyoung ((*(_ah)->ah_setPCUConfig)((_ah), (_opmode)))
294 1.1 dyoung #define ath_hal_stoptxdma(_ah, _qnum) \
295 1.1 dyoung ((*(_ah)->ah_stopTxDma)((_ah), (_qnum)))
296 1.1 dyoung #define ath_hal_stoppcurecv(_ah) \
297 1.1 dyoung ((*(_ah)->ah_stopPcuReceive)((_ah)))
298 1.1 dyoung #define ath_hal_startpcurecv(_ah) \
299 1.1 dyoung ((*(_ah)->ah_startPcuReceive)((_ah)))
300 1.1 dyoung #define ath_hal_stopdmarecv(_ah) \
301 1.1 dyoung ((*(_ah)->ah_stopDmaReceive)((_ah)))
302 1.1 dyoung #define ath_hal_dumpstate(_ah) \
303 1.1 dyoung ((*(_ah)->ah_dumpState)((_ah)))
304 1.1 dyoung #define ath_hal_dumpeeprom(_ah) \
305 1.1 dyoung ((*(_ah)->ah_dumpEeprom)((_ah)))
306 1.1 dyoung #define ath_hal_dumprfgain(_ah) \
307 1.1 dyoung ((*(_ah)->ah_dumpRfGain)((_ah)))
308 1.1 dyoung #define ath_hal_dumpani(_ah) \
309 1.1 dyoung ((*(_ah)->ah_dumpAni)((_ah)))
310 1.1 dyoung #define ath_hal_setuptxqueue(_ah, _type, _irq) \
311 1.1 dyoung ((*(_ah)->ah_setupTxQueue)((_ah), (_type), (_irq)))
312 1.1 dyoung #define ath_hal_resettxqueue(_ah, _q) \
313 1.1 dyoung ((*(_ah)->ah_resetTxQueue)((_ah), (_q)))
314 1.1 dyoung #define ath_hal_releasetxqueue(_ah, _q) \
315 1.1 dyoung ((*(_ah)->ah_releaseTxQueue)((_ah), (_q)))
316 1.1 dyoung #define ath_hal_hasveol(_ah) \
317 1.1 dyoung ((*(_ah)->ah_hasVEOL)((_ah)))
318 1.1 dyoung #define ath_hal_getrfgain(_ah) \
319 1.1 dyoung ((*(_ah)->ah_getRfGain)((_ah)))
320 1.1 dyoung #define ath_hal_rxmonitor(_ah) \
321 1.1 dyoung ((*(_ah)->ah_rxMonitor)((_ah)))
322 1.1 dyoung
323 1.1 dyoung #define ath_hal_setupbeacondesc(_ah, _ds, _opmode, _flen, _hlen, \
324 1.1 dyoung _rate, _antmode) \
325 1.1 dyoung ((*(_ah)->ah_setupBeaconDesc)((_ah), (_ds), (_opmode), \
326 1.1 dyoung (_flen), (_hlen), (_rate), (_antmode)))
327 1.1 dyoung #define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \
328 1.1 dyoung ((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq)))
329 1.1 dyoung #define ath_hal_rxprocdesc(_ah, _ds) \
330 1.1 dyoung ((*(_ah)->ah_procRxDesc)((_ah), (_ds)))
331 1.1 dyoung #define ath_hal_setuptxdesc(_ah, _ds, _plen, _hlen, _atype, _txpow, \
332 1.1 dyoung _txr0, _txtr0, _keyix, _ant, _flags, \
333 1.1 dyoung _rtsrate, _rtsdura) \
334 1.1 dyoung ((*(_ah)->ah_setupTxDesc)((_ah), (_ds), (_plen), (_hlen), (_atype), \
335 1.1 dyoung (_txpow), (_txr0), (_txtr0), (_keyix), (_ant), \
336 1.1 dyoung (_flags), (_rtsrate), (_rtsdura)))
337 1.1 dyoung #define ath_hal_setupxtxdesc(_ah, _ds, _short, \
338 1.1 dyoung _txr1, _txtr1, _txr2, _txtr2, _txr3, _txtr3) \
339 1.1 dyoung ((*(_ah)->ah_setupXTxDesc)((_ah), (_ds), (_short), \
340 1.1 dyoung (_txr1), (_txtr1), (_txr2), (_txtr2), (_txr3), (_txtr3)))
341 1.1 dyoung #define ath_hal_filltxdesc(_ah, _ds, _l, _first, _last) \
342 1.1 dyoung ((*(_ah)->ah_fillTxDesc)((_ah), (_ds), (_l), (_first), (_last)))
343 1.1 dyoung #define ath_hal_txprocdesc(_ah, _ds) \
344 1.1 dyoung ((*(_ah)->ah_procTxDesc)((_ah), (_ds)))
345 1.1 dyoung
346 1.1 dyoung #endif /* _DEV_ATH_ATHVAR_H */
347