xref: /freebsd/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1 #ifndef	__AR9300_FREEBSD_H__
2 #define	__AR9300_FREEBSD_H__
3 
4 extern	void ar9300_attach_freebsd_ops(struct ath_hal *ah);
5 extern	HAL_BOOL ar9300_reset_freebsd(struct ath_hal *ah, HAL_OPMODE opmode,
6 	    struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
7 	    HAL_RESET_TYPE resetType, HAL_STATUS *status);
8 extern	void ar9300_config_pcie_freebsd(struct ath_hal *, HAL_BOOL, HAL_BOOL);
9 extern	HAL_STATUS ar9300_eeprom_get_freebsd(struct ath_hal *, int param,
10 	    void *val);
11 extern	HAL_BOOL ar9300_stop_tx_dma_freebsd(struct ath_hal *ah, u_int q);
12 extern	void ar9300_ani_poll_freebsd(struct ath_hal *ah,
13 	    const struct ieee80211_channel *chan);
14 extern	void ar9300_config_defaults_freebsd(struct ath_hal *ah,
15 	    HAL_OPS_CONFIG *ah_config);
16 extern	HAL_BOOL ar9300_stop_dma_receive_freebsd(struct ath_hal *ah);
17 extern	HAL_BOOL ar9300_get_pending_interrupts_freebsd(struct ath_hal *ah,
18 	    HAL_INT *masked);
19 extern	HAL_INT ar9300_set_interrupts_freebsd(struct ath_hal *ah,
20 	    HAL_INT mask);
21 extern	HAL_BOOL ar9300_per_calibration_freebsd(struct ath_hal *ah,
22 	    struct ieee80211_channel *chan, u_int rxchainmask,
23 	    HAL_BOOL longCal, HAL_BOOL *isCalDone);
24 extern	HAL_BOOL ar9300_reset_cal_valid_freebsd(struct ath_hal *ah,
25 	    const struct ieee80211_channel *chan);
26 extern	void ar9300_start_pcu_receive_freebsd(struct ath_hal *ah);
27 extern	HAL_STATUS ar9300_proc_rx_desc_freebsd(struct ath_hal *ah,
28 	    struct ath_desc *ds, uint32_t pa, struct ath_desc *ds_next,
29 	    uint64_t tsf, struct ath_rx_status *rxs);
30 extern	void ar9300_ani_rxmonitor_freebsd(struct ath_hal *ah,
31 	    const HAL_NODE_STATS *stats, const struct ieee80211_channel *chan);
32 extern	void ar9300_freebsd_get_desc_link(struct ath_hal *, void *ds,
33 	    uint32_t *);
34 
35 extern	HAL_BOOL ar9300_freebsd_setup_tx_desc(struct ath_hal *ah,
36 	    struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type,
37 	    u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx,
38 	    u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsCtsDuration,
39 	    u_int compicvLen, u_int compivLen, u_int comp);
40 extern	HAL_BOOL ar9300_freebsd_setup_x_tx_desc(struct ath_hal *ah,
41 	    struct ath_desc *ds, u_int txRate1, u_int txTries1,
42 	    u_int txRate2, u_int txTries2, u_int txRate3, u_int txTries3);
43 extern	HAL_BOOL ar9300_freebsd_fill_tx_desc(struct ath_hal *ah,
44 	    struct ath_desc *ds, HAL_DMA_ADDR *bufAddrList,
45 	    uint32_t *segLenList, u_int descId, u_int qId, HAL_BOOL firstSeg,
46 	    HAL_BOOL lastSeg, const struct ath_desc *ds0);
47 extern	HAL_BOOL ar9300_freebsd_get_tx_completion_rates(struct ath_hal *ah,
48 	    const struct ath_desc *ds0, int *rates, int *tries);
49 extern	void ar9300_freebsd_set_11n_rate_scenario(struct ath_hal *,
50 	    struct ath_desc *, u_int, u_int, HAL_11N_RATE_SERIES series[],
51 	    u_int, u_int);
52 
53 extern	HAL_BOOL ar9300_freebsd_chain_tx_desc(struct ath_hal *ah,
54 	    struct ath_desc *ds,
55 	    HAL_DMA_ADDR *bufAddrList,
56 	    uint32_t *segLenList,
57 	    u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type,
58 	    u_int keyIx, HAL_CIPHER cipher, uint8_t numDelims,
59 	    HAL_BOOL firstSeg, HAL_BOOL lastSeg, HAL_BOOL lastAggr);
60 extern	HAL_BOOL ar9300_freebsd_setup_first_tx_desc(struct ath_hal *ah,
61 	    struct ath_desc *ds, u_int aggrLen, u_int flags, u_int txPower,
62 	    u_int txRate0, u_int txTries0, u_int antMode, u_int rtsctsRate,
63 	    u_int rtsctsDuration);
64 extern	HAL_BOOL ar9300_freebsd_setup_last_tx_desc(struct ath_hal *ah,
65 	    struct ath_desc *ds, const struct ath_desc *ds0);
66 
67 extern	void ar9300_freebsd_setup_11n_desc(struct ath_hal *ah,
68 	    void *ds, u_int pktLen, HAL_PKT_TYPE type, u_int txPower,
69 	    u_int keyIx, u_int flags);
70 
71 extern	HAL_STATUS ar9300_freebsd_proc_tx_desc(struct ath_hal *ah,
72 	    struct ath_desc *ds, struct ath_tx_status *ts);
73 
74 extern	void ar9300_freebsd_beacon_init(struct ath_hal *ah,
75 	    uint32_t next_beacon, uint32_t beacon_period);
76 
77 extern	HAL_BOOL ar9300_freebsd_get_mib_cycle_counts(struct ath_hal *ah,
78 	    HAL_SURVEY_SAMPLE *);
79 
80 extern	HAL_BOOL ar9300_freebsd_get_dfs_default_thresh(struct ath_hal *ah,
81 	    HAL_PHYERR_PARAM *pe);
82 
83 #endif	/* __AR9300_FREEBSD_H__ */
84