if_athvar.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. /*
  2. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted (subject to the limitations in the
  7. * disclaimer below) provided that the following conditions are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the
  15. * distribution.
  16. *
  17. * * Neither the name of Qualcomm Atheros nor the names of its
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  22. * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  23. * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
  24. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  25. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  27. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  28. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  29. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  30. * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  31. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  32. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  33. * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. */
  35. #ifndef _DEV_ATH_ATHVAR_H
  36. #define _DEV_ATH_ATHVAR_H
  37. #include <adf_os_types.h>
  38. #include <adf_os_dma.h>
  39. #include <adf_os_timer.h>
  40. #include <adf_os_lock.h>
  41. #include <adf_os_io.h>
  42. #include <adf_os_mem.h>
  43. #include <adf_os_util.h>
  44. #include <adf_os_stdtypes.h>
  45. #include <adf_os_defer.h>
  46. #include <adf_os_atomic.h>
  47. #include <adf_nbuf.h>
  48. #include <adf_net.h>
  49. #include <adf_net_types.h>
  50. #include <adf_net_wcmd.h>
  51. #include <asf_queue.h>
  52. #include "ah.h"
  53. #include "ieee80211_var.h"
  54. #include "ieee80211_node.h"
  55. #include "if_athrate.h"
  56. #include <osapi.h>
  57. #include <Magpie_api.h>
  58. #include <htc_services.h>
  59. #include <htc.h>
  60. #include <wlan_hdr.h>
  61. #include <wlan_cfg.h>
  62. #define tq_struct adf_os_bh_t
  63. #define ATH_INIT_TQUEUE(a,b,c,d) adf_os_init_bh((a),(b),(c),(void *)(d))
  64. #define ATH_SCHEDULE_TQUEUE(a,b) adf_os_sched_bh((a),(b))
  65. typedef void * TQUEUE_ARG;
  66. #define ATH_MIN(a,b) ((a) < (b) ? (a) : (b))
  67. #define ATH_AC_2_TXQ(_sc, _ac) (_sc)->sc_ac2q[(_ac)]
  68. #define TID_TO_ACTXQ(tidno) sc->sc_ac2q[ TID_TO_WME_AC(tidno)]
  69. #define RATE_TABLE_SIZE 32
  70. #define INCR(_l, _sz) (_l) ++; (_l) &= ((_sz) - 1)
  71. #define IEEE80211_SEQ_MAX 4096
  72. #define SEQNO_FROM_BF_SEQNO(_x) (_x >> IEEE80211_SEQ_SEQ_SHIFT)
  73. #define BAW_WITHIN(_start, _bawsz, _seqno) \
  74. ((((_seqno) - (_start)) & 4095) < (_bawsz))
  75. #define __stats(sc, _x) sc->sc_tx_stats._x ++
  76. #define __statsn(sc, _x, _n) sc->sc_tx_stats._x += _n
  77. #define IS_HT_RATE(_rate) ((_rate) & 0x80)
  78. typedef enum {
  79. ATH_TGT_AGGR_DONE,
  80. ATH_TGT_AGGR_BAW_CLOSED,
  81. ATH_TGT_AGGR_LIMITED,
  82. ATH_AGGR_SHORTPKT,
  83. ATH_AGGR_8K_LIMITED,
  84. } ATH_AGGR_STATUS;
  85. #define ATH_BA_ISSET(_bm, _n) (((_n) < (WME_BA_BMP_SIZE)) && \
  86. ((_bm)[(_n) >> 5] & (1 << ((_n) & 31))))
  87. #define ATH_DS_BA_SEQ(_ds) ((struct ath_tx_desc *)_ds)->ds_us.tx.ts_seqnum
  88. #define ATH_DS_BA_BITMAP(_ds) (&((struct ath_tx_desc *)_ds)->ds_us.tx.ba_low)
  89. #define ATH_DS_TX_BA(_ds) (((struct ath_tx_desc *)_ds)->ds_us.tx.ts_flags & HAL_TX_BA)
  90. #define ATH_DS_TX_STATUS(_ds) ((struct ath_tx_desc *)_ds)->ds_us.tx.ts_status
  91. #define ATH_DS_TX_FLAGS(_ds) ((struct ath_tx_desc *)_ds)->ds_us.tx.ts_flags
  92. #define ATH_BA_INDEX(_st, _seq) (((_seq) - (_st)) & (IEEE80211_SEQ_MAX - 1))
  93. #define ATH_AGGR_DELIM_SZ 4
  94. #define ATH_AGGR_MINPLEN 256
  95. #define ATH_AGGR_ENCRYPTDELIM 10
  96. #define ATH_AGGR_GET_NDELIM(_len) \
  97. (((((_len) + ATH_AGGR_DELIM_SZ) < ATH_AGGR_MINPLEN) ? \
  98. (ATH_AGGR_MINPLEN - (_len) - ATH_AGGR_DELIM_SZ) : 0) >> 2)
  99. #define PADBYTES(_len) ((4 - ((_len) % 4)) % 4)
  100. #define OWLMAX_RETRIES 10
  101. #define OWLMAX_BAR_RETRIES 10
  102. #define ATH_AN_2_TID(_an, _tidno) (&(_an)->tid[(_tidno)])
  103. #define ATH_TXDESC 1
  104. #define ATH_TXMAXTRY 11
  105. #define TARGET_NODE_MAX ATH_NODE_MAX
  106. #define TARGET_VAP_MAX ATH_VAP_MAX
  107. #define MAX_RATE_POWER 63
  108. #define ATH_COMP_PROC_NO_COMP_NO_CCS 3
  109. #define ATH_BUFSTATUS_DONE 0x00000001 /* hw processing complete, desc processed by hal */
  110. #define ATH_AGGR_MIN_QDEPTH 1
  111. struct ath_softc_tgt;
  112. struct ath_buf;
  113. struct ath_txq;
  114. #define ATH_TXQ(_sc, _qi) (&(_sc)->sc_txq[(_qi)])
  115. #define ATH_TXQ_SETUP(sc, i) ((sc)->sc_txqsetup & (1<<i))
  116. #define ATH_NODE_TARGET(_n) ((struct ath_node_target *)(_n))
  117. /*
  118. * Built-in implementation for skb free.
  119. */
  120. #define ath_free_rx_skb(_sc,_skb) BUF_Pool_free_buf(_sc->pool_handle, POOL_ID_WLAN_RX_BUF, _skb)
  121. #define ath_free_tx_skb(_htc_handle, endpt, _skb) HTC_ReturnBuffers(_htc_handle, endpt, _skb);
  122. struct ath_tx_buf;
  123. typedef void (*ath_txq_add_fn_t)(struct ath_softc_tgt *sc, struct ath_tx_buf *bf);
  124. typedef void (*ath_tx_comp_fn_t)(struct ath_softc_tgt *sc, struct ath_tx_buf *bf);
  125. struct ath_buf_state {
  126. ath_tx_comp_fn_t bfs_comp; /* completion function */
  127. ath_txq_add_fn_t bfs_txq_add; /* txq buffer add function */
  128. a_uint16_t bfs_pktlen; /* pktlen including crc */
  129. a_uint16_t bfs_seqno; /* sequence nuber */
  130. a_uint8_t bfs_hdrlen; /* header length */
  131. a_uint8_t bfs_keyix; /* key index */
  132. a_uint8_t bfs_atype; /* packet type */
  133. a_uint8_t bfs_ndelim; /* # delims for padding */
  134. a_uint8_t bfs_nframes; /* # frames in aggregate */
  135. a_uint8_t bfs_tidno; /* tid of the buffer */
  136. a_uint16_t bfs_al; /* length of aggregate */
  137. struct ath_rc_series bfs_rcs[4]; /* rate series */
  138. struct ath_txq *bfs_txq; /* transmit h/w queue */
  139. a_uint8_t bfs_protmode; /* protection mode */
  140. a_uint8_t bfs_keytype; /* encr key type */
  141. a_uint8_t bfs_retries; /* current retries */
  142. a_uint32_t bfs_ismcast : 1; /* is multicast */
  143. a_uint32_t bfs_shpream : 1; /* use short preamble */
  144. a_uint32_t bfs_isaggr : 1; /* is an aggregate */
  145. a_uint32_t bfs_isretried: 1; /* is retried */
  146. };
  147. #define bf_comp bf_state.bfs_comp
  148. #define bf_txq_add bf_state.bfs_txq_add
  149. #define bf_pktlen bf_state.bfs_pktlen
  150. #define bf_hdrlen bf_state.bfs_hdrlen
  151. #define bf_keyix bf_state.bfs_keyix
  152. #define bf_atype bf_state.bfs_atype
  153. #define bf_seqno bf_state.bfs_seqno
  154. #define bf_ndelim bf_state.bfs_ndelim
  155. #define bf_nframes bf_state.bfs_nframes
  156. #define bf_al bf_state.bfs_al
  157. #define bf_tidno bf_state.bfs_tidno
  158. #define bf_rcs bf_state.bfs_rcs
  159. #define bf_txq bf_state.bfs_txq
  160. #define bf_protmode bf_state.bfs_protmode
  161. #define bf_keytype bf_state.bfs_keytype
  162. #define bf_ismcast bf_state.bfs_ismcast
  163. #define bf_shpream bf_state.bfs_shpream
  164. #define bf_isaggr bf_state.bfs_isaggr
  165. #define bf_isretried bf_state.bfs_isretried
  166. #define bf_retries bf_state.bfs_retries
  167. #define ATH_GENERIC_BUF \
  168. adf_os_dma_map_t bf_dmamap; \
  169. adf_os_dmamap_info_t bf_dmamap_info; \
  170. struct ieee80211_node_target *bf_node; \
  171. adf_nbuf_queue_t bf_skbhead; \
  172. adf_nbuf_t bf_skb;
  173. struct ath_buf
  174. {
  175. ATH_GENERIC_BUF
  176. asf_tailq_entry(ath_buf) bf_list;
  177. struct ath_buf *bf_next;
  178. struct ath_desc *bf_lastds;
  179. struct ath_desc *bf_desc;
  180. struct ath_desc *bf_descarr;
  181. };
  182. struct ath_tx_buf
  183. {
  184. ATH_GENERIC_BUF
  185. asf_tailq_entry(ath_tx_buf) bf_list;
  186. struct ath_tx_buf *bf_next;
  187. struct ath_tx_desc *bf_desc;
  188. struct ath_tx_desc *bf_descarr;
  189. struct ath_tx_desc *bf_lastds;
  190. struct ath_buf_state bf_state;
  191. a_uint16_t bf_flags;
  192. HTC_ENDPOINT_ID bf_endpt;
  193. a_uint16_t al_delta;
  194. a_uint8_t bf_cookie;
  195. };
  196. struct ath_rx_buf
  197. {
  198. ATH_GENERIC_BUF
  199. asf_tailq_entry(ath_rx_buf) bf_list;
  200. struct ath_rx_buf *bf_next;
  201. struct ath_rx_desc *bf_desc;
  202. struct ath_rx_desc *bf_descarr;
  203. struct ath_rx_desc *bf_lastds;
  204. a_uint32_t bf_status;
  205. struct ath_rx_status bf_rx_status;
  206. };
  207. #define ATH_BUF_GET_DESC_PHY_ADDR(bf) (a_uint32_t)bf->bf_desc
  208. #define ATH_BUF_GET_DESC_PHY_ADDR_WITH_IDX(bf, idx) (adf_os_dma_addr_t)(&bf->bf_descarr[idx])
  209. #define ATH_BUF_SET_DESC_PHY_ADDR(bf, addr)
  210. #define ATH_BUF_SET_DESC_PHY_ADDR_WITH_IDX(bf, idx, addr)
  211. typedef asf_tailq_head(ath_deschead_s, ath_rx_desc) ath_deschead;
  212. typedef asf_tailq_head(ath_bufhead_s, ath_buf) ath_bufhead;
  213. typedef asf_tailq_head(ath_rx_bufhead_s, ath_rx_buf) ath_rx_bufhead;
  214. typedef asf_tailq_head(ath_tx_bufhead_s, ath_tx_buf) ath_tx_bufhead;
  215. #define WME_NUM_TID 8
  216. #define WME_BA_BMP_SIZE 64
  217. #define WME_MAX_BA WME_BA_BMP_SIZE
  218. #define ATH_TID_MAX_BUFS (2 * WME_MAX_BA)
  219. #define TID_CLEANUP_INPROGRES 0x1
  220. #define TID_AGGR_ENABLED 0x2
  221. #define TID_REINITIALIZE 0x4
  222. #define TAILQ_DEQ(_q, _elm, _field) do { \
  223. (_elm) = asf_tailq_first((_q)); \
  224. if (_elm) { \
  225. asf_tailq_remove((_q), (_elm), _field); \
  226. } \
  227. } while (0)
  228. #define TX_BUF_BITMAP_SIZE 32
  229. #define TX_BUF_BITMAP_SET(bitmap, i) bitmap[i>>5] |= ((a_uint32_t)1 << (i&0x1f))
  230. #define TX_BUF_BITMAP_CLR(bitmap, i) bitmap[i>>5] &= (~((a_uint32_t)1 << (i&0x1f)))
  231. #define TX_BUF_BITMAP_IS_SET(bitmap, i) ((bitmap[i>>5] & ((a_uint32_t)1 << (i&0x1f))) != 0)
  232. typedef struct ath_atx_tid {
  233. a_int32_t tidno;
  234. a_uint16_t seq_start;
  235. a_uint16_t seq_next;
  236. a_uint16_t baw_size;
  237. a_int32_t baw_head;
  238. a_int32_t baw_tail;
  239. a_uint32_t tx_buf_bitmap[ATH_TID_MAX_BUFS/TX_BUF_BITMAP_SIZE];
  240. asf_tailq_entry(ath_atx_tid) tid_qelem;
  241. asf_tailq_head(ath_tid_rbq,ath_tx_buf) buf_q;
  242. a_int8_t paused;
  243. a_int8_t sched;
  244. a_uint8_t flag;
  245. a_int8_t incomp;
  246. struct ath_node_target *an;
  247. } ath_atx_tid_t;
  248. struct ath_node_target {
  249. struct ieee80211_node_target ni;
  250. struct ath_atx_tid tid[WME_NUM_TID];
  251. a_int8_t an_valid;
  252. void *an_rcnode;
  253. };
  254. struct ath_descdma {
  255. const a_int8_t *dd_name;
  256. struct ath_desc *dd_desc;
  257. adf_os_dma_map_t dd_desc_dmamap;
  258. adf_os_dma_addr_t dd_desc_paddr;
  259. adf_os_size_t dd_desc_len;
  260. struct ath_buf *dd_bufptr;
  261. };
  262. struct ath_txq {
  263. a_uint32_t axq_qnum;
  264. a_uint32_t *axq_link;
  265. asf_tailq_head(,ath_tx_buf) axq_q;
  266. a_uint32_t axq_depth;
  267. struct ath_tx_buf *axq_linkbuf;
  268. asf_tailq_head(,ath_atx_tid) axq_tidq;
  269. };
  270. struct wmi_rc_rate_mask_cmd {
  271. a_uint8_t vap_index;
  272. a_uint8_t band;
  273. a_uint32_t mask;
  274. a_uint16_t pad;
  275. } POSTPACK;
  276. struct ath_vap_target {
  277. struct ieee80211vap_target av_vap;
  278. struct ath_txq av_mcastq;
  279. struct ath_tx_buf *av_bcbuf;
  280. a_uint32_t av_rate_mask[2]; /* 0 - 2G, 1 - 5G */
  281. a_uint8_t av_minrateidx[2]; /* 0 - 2G, 1 - 5G */
  282. a_int8_t av_valid;
  283. };
  284. #define ATH_RXBUF_RESET(bf) \
  285. bf->bf_status=0
  286. struct ath_softc_tgt
  287. {
  288. /* Target-side HTC/HIF/WMI related data structure */
  289. pool_handle_t pool_handle;
  290. hif_handle_t tgt_hif_handle;
  291. htc_handle_t tgt_htc_handle;
  292. wmi_handle_t tgt_wmi_handle;
  293. /* Target HTC Service IDs */
  294. HTC_SERVICE htc_beacon_service;
  295. HTC_SERVICE htc_cab_service;
  296. HTC_SERVICE htc_uapsd_service;
  297. HTC_SERVICE htc_mgmt_service;
  298. HTC_SERVICE htc_data_VO_service;
  299. HTC_SERVICE htc_data_VI_service;
  300. HTC_SERVICE htc_data_BE_service;
  301. HTC_SERVICE htc_data_BK_service;
  302. /* Target HTC Endpoint IDs */
  303. HTC_ENDPOINT_ID wmi_command_ep;
  304. HTC_ENDPOINT_ID beacon_ep;
  305. HTC_ENDPOINT_ID cab_ep;
  306. HTC_ENDPOINT_ID uapsd_ep;
  307. HTC_ENDPOINT_ID mgmt_ep;
  308. HTC_ENDPOINT_ID data_VO_ep;
  309. HTC_ENDPOINT_ID data_VI_ep;
  310. HTC_ENDPOINT_ID data_BE_ep;
  311. HTC_ENDPOINT_ID data_BK_ep;
  312. adf_os_handle_t sc_hdl;
  313. adf_os_device_t sc_dev;
  314. a_uint8_t sc_bhalq;
  315. struct ath_ratectrl *sc_rc;
  316. a_uint32_t sc_invalid : 1,
  317. sc_tx_draining : 1,
  318. sc_enable_coex : 1;
  319. a_int32_t sc_rxbufsize;
  320. a_uint16_t sc_cachelsz;
  321. struct ath_interrupt_stats sc_int_stats;
  322. struct ath_tx_stats sc_tx_stats;
  323. struct ath_rx_stats sc_rx_stats;
  324. const HAL_RATE_TABLE *sc_rates[IEEE80211_MODE_MAX];
  325. const HAL_RATE_TABLE *sc_currates;
  326. a_uint8_t sc_rixmap[256];
  327. enum ieee80211_phymode sc_curmode;
  328. a_uint8_t sc_protrix;
  329. HAL_INT sc_imask;
  330. tq_struct sc_rxtq;
  331. tq_struct sc_bmisstq;
  332. tq_struct sc_txtotq;
  333. tq_struct sc_fataltq;
  334. ath_rx_bufhead sc_rxbuf;
  335. ath_deschead sc_rxdesc_idle;
  336. ath_deschead sc_rxdesc;
  337. struct ath_rx_desc *sc_rxdesc_held;
  338. struct ath_tx_buf *sc_txbuf_held;
  339. struct ath_descdma sc_rxdma;
  340. struct ath_descdma sc_txdma;
  341. struct ath_descdma sc_bdma;
  342. a_uint32_t *sc_rxlink;
  343. ath_tx_bufhead sc_txbuf;
  344. a_uint8_t sc_txqsetup;
  345. struct ath_txq sc_txq[HAL_NUM_TX_QUEUES];
  346. struct ath_txq *sc_ac2q[WME_NUM_AC];
  347. tq_struct sc_txtq;
  348. struct ath_hal *sc_ah;
  349. struct ath_txq *sc_cabq;
  350. struct ath_txq *sc_uapsdq;
  351. struct ath_node_target sc_sta[TARGET_NODE_MAX];
  352. struct ath_vap_target sc_vap[TARGET_VAP_MAX];
  353. struct ieee80211com_target sc_ic;
  354. ath_tx_bufhead sc_bbuf;
  355. a_uint64_t sc_swba_tsf;
  356. WMI_TXSTATUS_EVENT tx_status[2];
  357. };
  358. #define SM(_v, _f) (((_v) << _f##_S) & _f)
  359. #define MS(_v, _f) (((_v) & _f) >> _f##_S)
  360. #define ATH9K_HTC_TXSTAT_ACK 1<<0
  361. #define ATH9K_HTC_TXSTAT_FILT 1<<1
  362. #define ATH9K_HTC_TXSTAT_RTC_CTS 1<<2
  363. #define ATH9K_HTC_TXSTAT_MCS 1<<3
  364. #define ATH9K_HTC_TXSTAT_CW40 1<<4
  365. #define ATH9K_HTC_TXSTAT_SGI 1<<5
  366. #define ATH9K_HTC_TXSTAT_RATE 0x0f
  367. #define ATH9K_HTC_TXSTAT_RATE_S 0
  368. #define ATH9K_HTC_TXSTAT_EPID 0xf0
  369. #define ATH9K_HTC_TXSTAT_EPID_S 4
  370. #define TAILQ_INSERTQ_HEAD(head, tq, field) do { \
  371. if ((head)->tqh_first) { \
  372. *(tq)->tqh_last = (head)->tqh_first; \
  373. (head)->tqh_first->field.tqe_prev = (tq)->tqh_last; \
  374. } else { \
  375. (head)->tqh_last = (tq)->tqh_last; \
  376. } \
  377. (head)->tqh_first = (tq)->tqh_first; \
  378. (tq)->tqh_first->field.tqe_prev = &(head)->tqh_first; \
  379. } while (0)
  380. #define ATH_TXQ_INSERT_TAIL(_tq, _elm, _field) do { \
  381. asf_tailq_insert_tail( &(_tq)->axq_q, (_elm), _field); \
  382. (_tq)->axq_depth++; \
  383. (_tq)->axq_linkbuf = (_elm); \
  384. } while (0)
  385. #define ATH_TXQ_REMOVE_HEAD(_tq, _elm, _field) do { \
  386. asf_tailq_remove(&(_tq)->axq_q, (_elm), _field); \
  387. (_tq)->axq_depth--; \
  388. } while (0)
  389. struct ieee80211_rate {
  390. struct ieee80211_rateset rates;
  391. struct ieee80211_rateset htrates;
  392. } __attribute__((packed));
  393. struct wmi_rc_state_change_cmd {
  394. a_uint8_t vap_index;
  395. a_uint8_t vap_state;
  396. a_uint8_t pad[2];
  397. a_uint32_t capflag;
  398. struct ieee80211_rate rs;
  399. } __attribute__((packed));
  400. struct wmi_rc_rate_update_cmd {
  401. a_uint8_t node_index;
  402. a_uint8_t isNew;
  403. a_uint8_t pad[2];
  404. a_uint32_t capflag;
  405. struct ieee80211_rate rs;
  406. } __attribute__((packed));
  407. typedef enum {
  408. OWL_TXQ_ACTIVE = 0,
  409. OWL_TXQ_STOPPED,
  410. OWL_TXQ_FILTERED,
  411. } owl_txq_state_t;
  412. a_uint8_t ath_get_minrateidx(struct ath_softc_tgt *sc, struct ath_vap_target *avp);
  413. #endif /* _DEV_ATH_ATHVAR_H */