Path: blob/main/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h
48525 views
/*1* Copyright (c) 2013 Qualcomm Atheros, Inc.2*3* Permission to use, copy, modify, and/or distribute this software for any4* purpose with or without fee is hereby granted, provided that the above5* copyright notice and this permission notice appear in all copies.6*7* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH8* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY9* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,10* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM11* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR12* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR13* PERFORMANCE OF THIS SOFTWARE.14*/151617/* Contains descriptor definitions for Osprey */181920#ifndef _ATH_AR9300_DESC_H_21#define _ATH_AR9300_DESC_H_2223#ifdef _KERNEL24#include "ar9300_freebsd_inc.h"25#endif2627/* Osprey Status Descriptor. */28struct ar9300_txs {29u_int32_t ds_info;30u_int32_t status1;31u_int32_t status2;32u_int32_t status3;33u_int32_t status4;34u_int32_t status5;35u_int32_t status6;36u_int32_t status7;37u_int32_t status8;38};3940struct ar9300_rxs {41u_int32_t ds_info;42u_int32_t status1;43u_int32_t status2;44u_int32_t status3;45u_int32_t status4;46u_int32_t status5;47u_int32_t status6;48u_int32_t status7;49u_int32_t status8;50u_int32_t status9;51u_int32_t status10;52u_int32_t status11;53};5455/* Transmit Control Descriptor */56struct ar9300_txc {57u_int32_t ds_info; /* descriptor information */58u_int32_t ds_link; /* link pointer */59u_int32_t ds_data0; /* data pointer to 1st buffer */60u_int32_t ds_ctl3; /* DMA control 3 */61u_int32_t ds_data1; /* data pointer to 2nd buffer */62u_int32_t ds_ctl5; /* DMA control 5 */63u_int32_t ds_data2; /* data pointer to 3rd buffer */64u_int32_t ds_ctl7; /* DMA control 7 */65u_int32_t ds_data3; /* data pointer to 4th buffer */66u_int32_t ds_ctl9; /* DMA control 9 */67u_int32_t ds_ctl10; /* DMA control 10 */68u_int32_t ds_ctl11; /* DMA control 11 */69u_int32_t ds_ctl12; /* DMA control 12 */70u_int32_t ds_ctl13; /* DMA control 13 */71u_int32_t ds_ctl14; /* DMA control 14 */72u_int32_t ds_ctl15; /* DMA control 15 */73u_int32_t ds_ctl16; /* DMA control 16 */74u_int32_t ds_ctl17; /* DMA control 17 */75u_int32_t ds_ctl18; /* DMA control 18 */76u_int32_t ds_ctl19; /* DMA control 19 */77u_int32_t ds_ctl20; /* DMA control 20 */78u_int32_t ds_ctl21; /* DMA control 21 */79u_int32_t ds_ctl22; /* DMA control 22 */80u_int32_t ds_ctl23; /* DMA control 23 */81u_int32_t ds_pad[8]; /* pad to cache line (128 bytes/32 dwords) */82};838485#define AR9300RXS(_rxs) ((struct ar9300_rxs *)(_rxs))86#define AR9300TXS(_txs) ((struct ar9300_txs *)(_txs))87#define AR9300TXC(_ds) ((struct ar9300_txc *)(_ds))8889#define AR9300TXC_CONST(_ds) ((const struct ar9300_txc *)(_ds))909192/* ds_info */93#define AR_desc_len 0x000000ff94#define AR_rx_priority 0x0000010095#define AR_tx_qcu_num 0x00000f0096#define AR_tx_qcu_num_S 897#define AR_ctrl_stat 0x0000400098#define AR_ctrl_stat_S 1499#define AR_tx_rx_desc 0x00008000100#define AR_tx_rx_desc_S 15101#define AR_desc_id 0xffff0000102#define AR_desc_id_S 16103104/***********105* TX Desc *106***********/107108/* ds_ctl3 */109/* ds_ctl5 */110/* ds_ctl7 */111/* ds_ctl9 */112#define AR_buf_len 0x0fff0000113#define AR_buf_len_S 16114115/* ds_ctl10 */116#define AR_tx_desc_id 0xffff0000117#define AR_tx_desc_id_S 16118#define AR_tx_ptr_chk_sum 0x0000ffff119120/* ds_ctl11 */121#define AR_frame_len 0x00000fff122#define AR_virt_more_frag 0x00001000123#define AR_tx_ctl_rsvd00 0x00002000124#define AR_low_rx_chain 0x00004000125#define AR_tx_clear_retry 0x00008000126#define AR_xmit_power0 0x003f0000127#define AR_xmit_power0_S 16128#define AR_rts_enable 0x00400000129#define AR_veol 0x00800000130#define AR_clr_dest_mask 0x01000000131#define AR_tx_bf0 0x02000000132#define AR_tx_bf1 0x04000000133#define AR_tx_bf2 0x08000000134#define AR_tx_bf3 0x10000000135#define AR_TxBfSteered 0x1e000000 /* for tx_bf*/136#define AR_tx_intr_req 0x20000000137#define AR_dest_idx_valid 0x40000000138#define AR_cts_enable 0x80000000139140/* ds_ctl12 */141#define AR_tx_ctl_rsvd02 0x000001ff142#define AR_paprd_chain_mask 0x00000e00143#define AR_paprd_chain_mask_S 9144#define AR_tx_more 0x00001000145#define AR_dest_idx 0x000fe000146#define AR_dest_idx_S 13147#define AR_frame_type 0x00f00000148#define AR_frame_type_S 20149#define AR_no_ack 0x01000000150#define AR_insert_ts 0x02000000151#define AR_corrupt_fcs 0x04000000152#define AR_ext_only 0x08000000153#define AR_ext_and_ctl 0x10000000154#define AR_more_aggr 0x20000000155#define AR_is_aggr 0x40000000156#define AR_more_rifs 0x80000000157#define AR_loc_mode 0x00000100 /* Positioning bit in TX desc */158159/* ds_ctl13 */160#define AR_burst_dur 0x00007fff161#define AR_burst_dur_S 0162#define AR_dur_update_ena 0x00008000163#define AR_xmit_data_tries0 0x000f0000164#define AR_xmit_data_tries0_S 16165#define AR_xmit_data_tries1 0x00f00000166#define AR_xmit_data_tries1_S 20167#define AR_xmit_data_tries2 0x0f000000168#define AR_xmit_data_tries2_S 24169#define AR_xmit_data_tries3 0xf0000000170#define AR_xmit_data_tries3_S 28171172/* ds_ctl14 */173#define AR_xmit_rate0 0x000000ff174#define AR_xmit_rate0_S 0175#define AR_xmit_rate1 0x0000ff00176#define AR_xmit_rate1_S 8177#define AR_xmit_rate2 0x00ff0000178#define AR_xmit_rate2_S 16179#define AR_xmit_rate3 0xff000000180#define AR_xmit_rate3_S 24181182/* ds_ctl15 */183#define AR_packet_dur0 0x00007fff184#define AR_packet_dur0_S 0185#define AR_rts_cts_qual0 0x00008000186#define AR_packet_dur1 0x7fff0000187#define AR_packet_dur1_S 16188#define AR_rts_cts_qual1 0x80000000189190/* ds_ctl16 */191#define AR_packet_dur2 0x00007fff192#define AR_packet_dur2_S 0193#define AR_rts_cts_qual2 0x00008000194#define AR_packet_dur3 0x7fff0000195#define AR_packet_dur3_S 16196#define AR_rts_cts_qual3 0x80000000197198/* ds_ctl17 */199#define AR_aggr_len 0x0000ffff200#define AR_aggr_len_S 0201#define AR_tx_ctl_rsvd60 0x00030000202#define AR_pad_delim 0x03fc0000203#define AR_pad_delim_S 18204#define AR_encr_type 0x1c000000205#define AR_encr_type_S 26206#define AR_tx_dc_ap_sta_sel 0x40000000207#define AR_tx_ctl_rsvd61 0xc0000000208#define AR_calibrating 0x40000000209#define AR_ldpc 0x80000000210211/* ds_ctl18 */212#define AR_2040_0 0x00000001213#define AR_gi0 0x00000002214#define AR_chain_sel0 0x0000001c215#define AR_chain_sel0_S 2216#define AR_2040_1 0x00000020217#define AR_gi1 0x00000040218#define AR_chain_sel1 0x00000380219#define AR_chain_sel1_S 7220#define AR_2040_2 0x00000400221#define AR_gi2 0x00000800222#define AR_chain_sel2 0x00007000223#define AR_chain_sel2_S 12224#define AR_2040_3 0x00008000225#define AR_gi3 0x00010000226#define AR_chain_sel3 0x000e0000227#define AR_chain_sel3_S 17228#define AR_rts_cts_rate 0x0ff00000229#define AR_rts_cts_rate_S 20230#define AR_stbc0 0x10000000231#define AR_stbc1 0x20000000232#define AR_stbc2 0x40000000233#define AR_stbc3 0x80000000234235/* ds_ctl19 */236#define AR_tx_ant0 0x00ffffff237#define AR_tx_ant_sel0 0x80000000238#define AR_RTS_HTC_TRQ 0x10000000 /* bit 28 for rts_htc_TRQ*/ /*for tx_bf*/239#define AR_not_sounding 0x20000000240#define AR_ness 0xc0000000241#define AR_ness_S 30242243/* ds_ctl20 */244#define AR_tx_ant1 0x00ffffff245#define AR_xmit_power1 0x3f000000246#define AR_xmit_power1_S 24247#define AR_tx_ant_sel1 0x80000000248#define AR_ness1 0xc0000000249#define AR_ness1_S 30250251/* ds_ctl21 */252#define AR_tx_ant2 0x00ffffff253#define AR_xmit_power2 0x3f000000254#define AR_xmit_power2_S 24255#define AR_tx_ant_sel2 0x80000000256#define AR_ness2 0xc0000000257#define AR_ness2_S 30258259/* ds_ctl22 */260#define AR_tx_ant3 0x00ffffff261#define AR_xmit_power3 0x3f000000262#define AR_xmit_power3_S 24263#define AR_tx_ant_sel3 0x80000000264#define AR_ness3 0xc0000000265#define AR_ness3_S 30266267/*************268* TX Status *269*************/270271/* ds_status1 */272#define AR_tx_status_rsvd 0x0000ffff273274/* ds_status2 */275#define AR_tx_rssi_ant00 0x000000ff276#define AR_tx_rssi_ant00_S 0277#define AR_tx_rssi_ant01 0x0000ff00278#define AR_tx_rssi_ant01_S 8279#define AR_tx_rssi_ant02 0x00ff0000280#define AR_tx_rssi_ant02_S 16281#define AR_tx_status_rsvd00 0x3f000000282#define AR_tx_ba_status 0x40000000283#define AR_tx_status_rsvd01 0x80000000284285/* ds_status3 */286#define AR_frm_xmit_ok 0x00000001287#define AR_excessive_retries 0x00000002288#define AR_fifounderrun 0x00000004289#define AR_filtered 0x00000008290#define AR_rts_fail_cnt 0x000000f0291#define AR_rts_fail_cnt_S 4292#define AR_data_fail_cnt 0x00000f00293#define AR_data_fail_cnt_S 8294#define AR_virt_retry_cnt 0x0000f000295#define AR_virt_retry_cnt_S 12296#define AR_tx_delim_underrun 0x00010000297#define AR_tx_data_underrun 0x00020000298#define AR_desc_cfg_err 0x00040000299#define AR_tx_timer_expired 0x00080000300#define AR_tx_status_rsvd10 0xfff00000301302/* ds_status7 */303#define AR_tx_rssi_ant10 0x000000ff304#define AR_tx_rssi_ant10_S 0305#define AR_tx_rssi_ant11 0x0000ff00306#define AR_tx_rssi_ant11_S 8307#define AR_tx_rssi_ant12 0x00ff0000308#define AR_tx_rssi_ant12_S 16309#define AR_tx_rssi_combined 0xff000000310#define AR_tx_rssi_combined_S 24311312/* ds_status8 */313#define AR_tx_done 0x00000001314#define AR_seq_num 0x00001ffe315#define AR_seq_num_S 1316#define AR_tx_status_rsvd80 0x0001e000317#define AR_tx_op_exceeded 0x00020000318#define AR_tx_status_rsvd81 0x001c0000319#define AR_TXBFStatus 0x001c0000320#define AR_TXBFStatus_S 18321#define AR_tx_bf_bw_mismatch 0x00040000322#define AR_tx_bf_stream_miss 0x00080000323#define AR_final_tx_idx 0x00600000324#define AR_final_tx_idx_S 21325#define AR_tx_bf_dest_miss 0x00800000326#define AR_tx_bf_expired 0x01000000327#define AR_power_mgmt 0x02000000328#define AR_tx_status_rsvd83 0x0c000000329#define AR_tx_tid 0xf0000000330#define AR_tx_tid_S 28331#define AR_tx_fast_ts 0x08000000 /* 27th bit for locationing */332333334/*************335* Rx Status *336*************/337338/* ds_status1 */339#define AR_rx_rssi_ant00 0x000000ff340#define AR_rx_rssi_ant00_S 0341#define AR_rx_rssi_ant01 0x0000ff00342#define AR_rx_rssi_ant01_S 8343#define AR_rx_rssi_ant02 0x00ff0000344#define AR_rx_rssi_ant02_S 16345#define AR_rx_rate 0xff000000346#define AR_rx_rate_S 24347348/* ds_status2 */349#define AR_data_len 0x00000fff350#define AR_data_len_S 0351#define AR_rx_more 0x00001000352#define AR_num_delim 0x003fc000353#define AR_num_delim_S 14354#define AR_hw_upload_data 0x00400000355#define AR_hw_upload_data_S 22356#define AR_rx_status_rsvd10 0xff800000357358359/* ds_status4 */360#define AR_gi 0x00000001361#define AR_2040 0x00000002362#define AR_parallel40 0x00000004363#define AR_parallel40_S 2364#define AR_rx_stbc 0x00000008365#define AR_rx_not_sounding 0x00000010366#define AR_rx_ness 0x00000060367#define AR_rx_ness_S 5368#define AR_hw_upload_data_valid 0x00000080369#define AR_hw_upload_data_valid_S 7370#define AR_rx_antenna 0xffffff00371#define AR_rx_antenna_S 8372373/* ds_status5 */374#define AR_rx_rssi_ant10 0x000000ff375#define AR_rx_rssi_ant10_S 0376#define AR_rx_rssi_ant11 0x0000ff00377#define AR_rx_rssi_ant11_S 8378#define AR_rx_rssi_ant12 0x00ff0000379#define AR_rx_rssi_ant12_S 16380#define AR_rx_rssi_combined 0xff000000381#define AR_rx_rssi_combined_S 24382383/* ds_status6 */384#define AR_rx_evm0 status6385386/* ds_status7 */387#define AR_rx_evm1 status7388389/* ds_status8 */390#define AR_rx_evm2 status8391392/* ds_status9 */393#define AR_rx_evm3 status9394395/* ds_status11 */396#define AR_rx_done 0x00000001397#define AR_rx_frame_ok 0x00000002398#define AR_crc_err 0x00000004399#define AR_decrypt_crc_err 0x00000008400#define AR_phyerr 0x00000010401#define AR_michael_err 0x00000020402#define AR_pre_delim_crc_err 0x00000040403#define AR_apsd_trig 0x00000080404#define AR_rx_key_idx_valid 0x00000100405#define AR_key_idx 0x0000fe00406#define AR_key_idx_S 9407#define AR_phy_err_code 0x0000ff00408#define AR_phy_err_code_S 8409#define AR_rx_more_aggr 0x00010000410#define AR_rx_aggr 0x00020000411#define AR_post_delim_crc_err 0x00040000412#define AR_rx_status_rsvd71 0x01f80000413#define AR_hw_upload_data_type 0x06000000414#define AR_hw_upload_data_type_S 25415#define AR_position_bit 0x08000000 /* positioning bit */416#define AR_hi_rx_chain 0x10000000417#define AR_rx_first_aggr 0x20000000418#define AR_decrypt_busy_err 0x40000000419#define AR_key_miss 0x80000000420421#define TXCTL_OFFSET(ah) 11422#define TXCTL_NUMWORDS(ah) 12423#define TXSTATUS_OFFSET(ah) 2424#define TXSTATUS_NUMWORDS(ah) 7425426#define RXCTL_OFFSET(ah) 0427#define RXCTL_NUMWORDS(ah) 0428#define RXSTATUS_OFFSET(ah) 1429#define RXSTATUS_NUMWORDS(ah) 11430431432#define TXC_INFO(_qcu, _desclen) (ATHEROS_VENDOR_ID << AR_desc_id_S) \433| (1 << AR_tx_rx_desc_S) \434| (1 << AR_ctrl_stat_S) \435| (_qcu << AR_tx_qcu_num_S) \436| (_desclen)437438#define VALID_KEY_TYPES \439((1 << HAL_KEY_TYPE_CLEAR) | (1 << HAL_KEY_TYPE_WEP)|\440(1 << HAL_KEY_TYPE_AES) | (1 << HAL_KEY_TYPE_TKIP))441#define is_valid_key_type(_t) ((1 << (_t)) & VALID_KEY_TYPES)442443#define set_11n_tries(_series, _index) \444(SM((_series)[_index].Tries, AR_xmit_data_tries##_index))445446#define set_11n_rate(_series, _index) \447(SM((_series)[_index].Rate, AR_xmit_rate##_index))448449#define set_11n_pkt_dur_rts_cts(_series, _index) \450(SM((_series)[_index].PktDuration, AR_packet_dur##_index) |\451((_series)[_index].RateFlags & HAL_RATESERIES_RTS_CTS ?\452AR_rts_cts_qual##_index : 0))453454#define not_two_stream_rate(_rate) (((_rate) >0x8f) || ((_rate)<0x88))455456#define set_11n_tx_bf_ldpc( _series) \457((( not_two_stream_rate((_series)[0].Rate) && (not_two_stream_rate((_series)[1].Rate)|| \458(!(_series)[1].Tries)) && (not_two_stream_rate((_series)[2].Rate)||(!(_series)[2].Tries)) \459&& (not_two_stream_rate((_series)[3].Rate)||(!(_series)[3].Tries)))) \460? AR_ldpc : 0)461462#define set_11n_rate_flags(_series, _index) \463((_series)[_index].RateFlags & HAL_RATESERIES_2040 ? AR_2040_##_index : 0) \464|((_series)[_index].RateFlags & HAL_RATESERIES_HALFGI ? AR_gi##_index : 0) \465|((_series)[_index].RateFlags & HAL_RATESERIES_STBC ? AR_stbc##_index : 0) \466|SM((_series)[_index].ChSel, AR_chain_sel##_index)467468#define set_11n_tx_power(_index, _txpower) \469SM(_txpower, AR_xmit_power##_index)470471#define IS_3CHAIN_TX(_ah) (AH9300(_ah)->ah_tx_chainmask == 7)472/*473* Descriptor Access Functions474*/475/* XXX valid Tx rates will change for 3 stream support */476#define VALID_PKT_TYPES \477((1<<HAL_PKT_TYPE_NORMAL)|(1<<HAL_PKT_TYPE_ATIM)|\478(1<<HAL_PKT_TYPE_PSPOLL)|(1<<HAL_PKT_TYPE_PROBE_RESP)|\479(1<<HAL_PKT_TYPE_BEACON))480#define is_valid_pkt_type(_t) ((1<<(_t)) & VALID_PKT_TYPES)481#define VALID_TX_RATES \482((1<<0x0b)|(1<<0x0f)|(1<<0x0a)|(1<<0x0e)|(1<<0x09)|(1<<0x0d)|\483(1<<0x08)|(1<<0x0c)|(1<<0x1b)|(1<<0x1a)|(1<<0x1e)|(1<<0x19)|\484(1<<0x1d)|(1<<0x18)|(1<<0x1c))485#define is_valid_tx_rate(_r) ((1<<(_r)) & VALID_TX_RATES)486487488#ifdef _KERNEL489/* TX common functions */490491extern HAL_BOOL ar9300_update_tx_trig_level(struct ath_hal *,492HAL_BOOL IncTrigLevel);493extern u_int16_t ar9300_get_tx_trig_level(struct ath_hal *);494extern HAL_BOOL ar9300_set_tx_queue_props(struct ath_hal *ah, int q,495const HAL_TXQ_INFO *q_info);496extern HAL_BOOL ar9300_get_tx_queue_props(struct ath_hal *ah, int q,497HAL_TXQ_INFO *q_info);498extern int ar9300_setup_tx_queue(struct ath_hal *ah, HAL_TX_QUEUE type,499const HAL_TXQ_INFO *q_info);500extern HAL_BOOL ar9300_release_tx_queue(struct ath_hal *ah, u_int q);501extern HAL_BOOL ar9300_reset_tx_queue(struct ath_hal *ah, u_int q);502extern u_int32_t ar9300_get_tx_dp(struct ath_hal *ah, u_int q);503extern HAL_BOOL ar9300_set_tx_dp(struct ath_hal *ah, u_int q, u_int32_t txdp);504extern HAL_BOOL ar9300_start_tx_dma(struct ath_hal *ah, u_int q);505extern u_int32_t ar9300_num_tx_pending(struct ath_hal *ah, u_int q);506extern HAL_BOOL ar9300_stop_tx_dma(struct ath_hal *ah, u_int q, u_int timeout);507extern HAL_BOOL ar9300_stop_tx_dma_indv_que(struct ath_hal *ah, u_int q, u_int timeout);508extern HAL_BOOL ar9300_abort_tx_dma(struct ath_hal *ah);509extern void ar9300_get_tx_intr_queue(struct ath_hal *ah, u_int32_t *);510511extern void ar9300_tx_req_intr_desc(struct ath_hal *ah, void *ds);512extern HAL_BOOL ar9300_fill_tx_desc(struct ath_hal *ah, void *ds, HAL_DMA_ADDR *buf_addr,513u_int32_t *seg_len, u_int desc_id, u_int qcu, HAL_KEY_TYPE key_type, HAL_BOOL first_seg,514HAL_BOOL last_seg, const void *ds0);515extern void ar9300_set_desc_link(struct ath_hal *, void *ds, u_int32_t link);516extern void ar9300_get_desc_link_ptr(struct ath_hal *, void *ds, u_int32_t **link);517extern void ar9300_clear_tx_desc_status(struct ath_hal *ah, void *ds);518#ifdef ATH_SWRETRY519extern void ar9300_clear_dest_mask(struct ath_hal *ah, void *ds);520#endif521extern HAL_STATUS ar9300_proc_tx_desc(struct ath_hal *ah, void *);522extern void ar9300_get_raw_tx_desc(struct ath_hal *ah, u_int32_t *);523extern void ar9300_get_tx_rate_code(struct ath_hal *ah, void *, struct ath_tx_status *);524extern u_int32_t ar9300_calc_tx_airtime(struct ath_hal *ah, void *, struct ath_tx_status *,525HAL_BOOL comp_wastedt, u_int8_t nbad, u_int8_t nframes);526extern void ar9300_setup_tx_status_ring(struct ath_hal *ah, void *, u_int32_t , u_int16_t);527extern void ar9300_set_paprd_tx_desc(struct ath_hal *ah, void *ds, int chain_num);528HAL_STATUS ar9300_is_tx_done(struct ath_hal *ah);529extern void ar9300_set_11n_tx_desc(struct ath_hal *ah, void *ds,530u_int pkt_len, HAL_PKT_TYPE type, u_int tx_power,531u_int key_ix, HAL_KEY_TYPE key_type, u_int flags);532extern void ar9300_set_rx_chainmask(struct ath_hal *ah, int rxchainmask);533extern void ar9300_update_loc_ctl_reg(struct ath_hal *ah, int pos_bit);534535/* for tx_bf*/536#define ar9300_set_11n_txbf_cal(ah, ds, cal_pos, code_rate, cec, opt)537/* for tx_bf*/538539extern void ar9300_set_11n_rate_scenario(struct ath_hal *ah, void *ds,540void *lastds, u_int dur_update_en, u_int rts_cts_rate, u_int rts_cts_duration, HAL_11N_RATE_SERIES series[],541u_int nseries, u_int flags, u_int32_t smartAntenna);542extern void ar9300_set_11n_aggr_first(struct ath_hal *ah, struct ath_desc *ds,543u_int aggr_len, u_int num_delims);544extern void ar9300_set_11n_aggr_middle(struct ath_hal *ah, struct ath_desc *ds,545u_int num_delims);546extern void ar9300_set_11n_aggr_last(struct ath_hal *ah, struct ath_desc *ds);547extern void ar9300_clr_11n_aggr(struct ath_hal *ah, struct ath_desc *ds);548extern void ar9300_set_11n_burst_duration(struct ath_hal *ah,549struct ath_desc *ds, u_int burst_duration);550extern void ar9300_set_11n_rifs_burst_middle(struct ath_hal *ah, void *ds);551extern void ar9300_set_11n_rifs_burst_last(struct ath_hal *ah, void *ds);552extern void ar9300_clr_11n_rifs_burst(struct ath_hal *ah, void *ds);553extern void ar9300_set_11n_aggr_rifs_burst(struct ath_hal *ah, void *ds);554extern void ar9300_set_11n_virtual_more_frag(struct ath_hal *ah,555struct ath_desc *ds, u_int vmf);556#ifdef AH_PRIVATE_DIAG557extern void ar9300__cont_tx_mode(struct ath_hal *ah, void *ds, int mode);558#endif559560/* RX common functions */561562extern u_int32_t ar9300_get_rx_dp(struct ath_hal *ath, HAL_RX_QUEUE qtype);563extern void ar9300_set_rx_dp(struct ath_hal *ah, u_int32_t rxdp, HAL_RX_QUEUE qtype);564extern void ar9300_enable_receive(struct ath_hal *ah);565extern HAL_BOOL ar9300_stop_dma_receive(struct ath_hal *ah, u_int timeout);566extern void ar9300_start_pcu_receive(struct ath_hal *ah, HAL_BOOL is_scanning);567extern void ar9300_stop_pcu_receive(struct ath_hal *ah);568extern void ar9300_set_multicast_filter(struct ath_hal *ah,569u_int32_t filter0, u_int32_t filter1);570extern u_int32_t ar9300_get_rx_filter(struct ath_hal *ah);571extern void ar9300_set_rx_filter(struct ath_hal *ah, u_int32_t bits);572extern HAL_BOOL ar9300_set_rx_sel_evm(struct ath_hal *ah, HAL_BOOL, HAL_BOOL);573extern HAL_BOOL ar9300_set_rx_abort(struct ath_hal *ah, HAL_BOOL);574575extern HAL_STATUS ar9300_proc_rx_desc(struct ath_hal *ah,576struct ath_desc *, u_int32_t, struct ath_desc *, u_int64_t, struct ath_rx_status *);577extern HAL_STATUS ar9300_get_rx_key_idx(struct ath_hal *ah,578struct ath_desc *, u_int8_t *, u_int8_t *);579extern HAL_STATUS ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *,580u_int32_t, struct ath_desc *, struct ath_rx_status *, void *);581582extern void ar9300_promisc_mode(struct ath_hal *ah, HAL_BOOL enable);583extern void ar9300_read_pktlog_reg(struct ath_hal *ah, u_int32_t *, u_int32_t *, u_int32_t *, u_int32_t *);584extern void ar9300_write_pktlog_reg(struct ath_hal *ah, HAL_BOOL , u_int32_t , u_int32_t , u_int32_t , u_int32_t );585586#endif587588#endif /* _ATH_AR9300_DESC_H_ */589590591