1250008Sadrian#ifndef	__AR9300_FREEBSD_H__
2250008Sadrian#define	__AR9300_FREEBSD_H__
3250008Sadrian
4250008Sadrianextern	void ar9300_attach_freebsd_ops(struct ath_hal *ah);
5250008Sadrianextern	HAL_BOOL ar9300_reset_freebsd(struct ath_hal *ah, HAL_OPMODE opmode,
6250008Sadrian	    struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
7290612Sadrian	    HAL_RESET_TYPE resetType, HAL_STATUS *status);
8250008Sadrianextern	void ar9300_config_pcie_freebsd(struct ath_hal *, HAL_BOOL, HAL_BOOL);
9250008Sadrianextern	HAL_STATUS ar9300_eeprom_get_freebsd(struct ath_hal *, int param,
10250008Sadrian	    void *val);
11250008Sadrianextern	HAL_BOOL ar9300_stop_tx_dma_freebsd(struct ath_hal *ah, u_int q);
12250008Sadrianextern	void ar9300_ani_poll_freebsd(struct ath_hal *ah,
13250008Sadrian	    const struct ieee80211_channel *chan);
14272292Sadrianextern	void ar9300_config_defaults_freebsd(struct ath_hal *ah,
15272292Sadrian	    HAL_OPS_CONFIG *ah_config);
16250008Sadrianextern	HAL_BOOL ar9300_stop_dma_receive_freebsd(struct ath_hal *ah);
17250008Sadrianextern	HAL_BOOL ar9300_get_pending_interrupts_freebsd(struct ath_hal *ah,
18250008Sadrian	    HAL_INT *masked);
19250008Sadrianextern	HAL_INT ar9300_set_interrupts_freebsd(struct ath_hal *ah,
20250008Sadrian	    HAL_INT mask);
21250008Sadrianextern	HAL_BOOL ar9300_per_calibration_freebsd(struct ath_hal *ah,
22250008Sadrian	    struct ieee80211_channel *chan, u_int rxchainmask,
23250008Sadrian	    HAL_BOOL longCal, HAL_BOOL *isCalDone);
24250008Sadrianextern	HAL_BOOL ar9300_reset_cal_valid_freebsd(struct ath_hal *ah,
25250008Sadrian	    const struct ieee80211_channel *chan);
26250008Sadrianextern	void ar9300_start_pcu_receive_freebsd(struct ath_hal *ah);
27250008Sadrianextern	HAL_STATUS ar9300_proc_rx_desc_freebsd(struct ath_hal *ah,
28250008Sadrian	    struct ath_desc *ds, uint32_t pa, struct ath_desc *ds_next,
29250008Sadrian	    uint64_t tsf, struct ath_rx_status *rxs);
30250008Sadrianextern	void ar9300_ani_rxmonitor_freebsd(struct ath_hal *ah,
31250008Sadrian	    const HAL_NODE_STATS *stats, const struct ieee80211_channel *chan);
32250008Sadrianextern	void ar9300_freebsd_get_desc_link(struct ath_hal *, void *ds,
33250008Sadrian	    uint32_t *);
34250008Sadrian
35250008Sadrianextern	HAL_BOOL ar9300_freebsd_setup_tx_desc(struct ath_hal *ah,
36250008Sadrian	    struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type,
37250008Sadrian	    u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx,
38250008Sadrian	    u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsCtsDuration,
39250008Sadrian	    u_int compicvLen, u_int compivLen, u_int comp);
40250008Sadrianextern	HAL_BOOL ar9300_freebsd_setup_x_tx_desc(struct ath_hal *ah,
41250008Sadrian	    struct ath_desc *ds, u_int txRate1, u_int txTries1,
42250008Sadrian	    u_int txRate2, u_int txTries2, u_int txRate3, u_int txTries3);
43250008Sadrianextern	HAL_BOOL ar9300_freebsd_fill_tx_desc(struct ath_hal *ah,
44250008Sadrian	    struct ath_desc *ds, HAL_DMA_ADDR *bufAddrList,
45250008Sadrian	    uint32_t *segLenList, u_int descId, u_int qId, HAL_BOOL firstSeg,
46250008Sadrian	    HAL_BOOL lastSeg, const struct ath_desc *ds0);
47250008Sadrianextern	HAL_BOOL ar9300_freebsd_get_tx_completion_rates(struct ath_hal *ah,
48250008Sadrian	    const struct ath_desc *ds0, int *rates, int *tries);
49250008Sadrianextern	void ar9300_freebsd_set_11n_rate_scenario(struct ath_hal *,
50250008Sadrian	    struct ath_desc *, u_int, u_int, HAL_11N_RATE_SERIES series[],
51250008Sadrian	    u_int, u_int);
52250008Sadrian
53250008Sadrianextern	HAL_BOOL ar9300_freebsd_chain_tx_desc(struct ath_hal *ah,
54250008Sadrian	    struct ath_desc *ds,
55250008Sadrian	    HAL_DMA_ADDR *bufAddrList,
56250008Sadrian	    uint32_t *segLenList,
57250008Sadrian	    u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type,
58250008Sadrian	    u_int keyIx, HAL_CIPHER cipher, uint8_t numDelims,
59250008Sadrian	    HAL_BOOL firstSeg, HAL_BOOL lastSeg, HAL_BOOL lastAggr);
60250008Sadrianextern	HAL_BOOL ar9300_freebsd_setup_first_tx_desc(struct ath_hal *ah,
61250008Sadrian	    struct ath_desc *ds, u_int aggrLen, u_int flags, u_int txPower,
62250008Sadrian	    u_int txRate0, u_int txTries0, u_int antMode, u_int rtsctsRate,
63250008Sadrian	    u_int rtsctsDuration);
64250008Sadrianextern	HAL_BOOL ar9300_freebsd_setup_last_tx_desc(struct ath_hal *ah,
65250008Sadrian	    struct ath_desc *ds, const struct ath_desc *ds0);
66250008Sadrian
67250008Sadrianextern	void ar9300_freebsd_setup_11n_desc(struct ath_hal *ah,
68250008Sadrian	    void *ds, u_int pktLen, HAL_PKT_TYPE type, u_int txPower,
69250008Sadrian	    u_int keyIx, u_int flags);
70250008Sadrian
71250008Sadrianextern	HAL_STATUS ar9300_freebsd_proc_tx_desc(struct ath_hal *ah,
72250008Sadrian	    struct ath_desc *ds, struct ath_tx_status *ts);
73250008Sadrian
74250008Sadrianextern	void ar9300_freebsd_beacon_init(struct ath_hal *ah,
75250008Sadrian	    uint32_t next_beacon, uint32_t beacon_period);
76250008Sadrian
77250008Sadrianextern	HAL_BOOL ar9300_freebsd_get_mib_cycle_counts(struct ath_hal *ah,
78250008Sadrian	    HAL_SURVEY_SAMPLE *);
79250008Sadrian
80250008Sadrianextern	HAL_BOOL ar9300_freebsd_get_dfs_default_thresh(struct ath_hal *ah,
81250008Sadrian	    HAL_PHYERR_PARAM *pe);
82250008Sadrian
83250008Sadrian#endif	/* __AR9300_FREEBSD_H__ */
84