1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2009-2012 Realtek Corporation.*/
4 #ifndef __RTL92C_MAC_H__
5 #define __RTL92C_MAC_H__
7 #define LLT_LAST_ENTRY_OF_TX_PKT_BUFFER 255
8 #define DRIVER_EARLY_INT_TIME 0x05
9 #define BCN_DMA_ATIME_INT_TIME 0x02
11 void rtl92c_read_chip_version(struct ieee80211_hw *hw);
12 bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data);
13 bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary);
14 void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
15 u8 *p_macaddr, bool is_group, u8 enc_algo,
16 bool is_wepkey, bool clear_all);
17 void rtl92c_enable_interrupt(struct ieee80211_hw *hw);
18 void rtl92c_disable_interrupt(struct ieee80211_hw *hw);
19 void rtl92c_set_qos(struct ieee80211_hw *hw, int aci);
21 /*---------------------------------------------------------------
22 * Hardware init functions
23 *---------------------------------------------------------------*/
24 void rtl92c_init_interrupt(struct ieee80211_hw *hw);
25 void rtl92c_init_driver_info_size(struct ieee80211_hw *hw, u8 size);
27 int rtl92c_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type);
28 void rtl92c_init_network_type(struct ieee80211_hw *hw);
29 void rtl92c_init_adaptive_ctrl(struct ieee80211_hw *hw);
30 void rtl92c_init_rate_fallback(struct ieee80211_hw *hw);
32 void rtl92c_init_edca_param(struct ieee80211_hw *hw,
39 void rtl92c_init_edca(struct ieee80211_hw *hw);
40 void rtl92c_init_ampdu_aggregation(struct ieee80211_hw *hw);
41 void rtl92c_init_beacon_max_error(struct ieee80211_hw *hw);
42 void rtl92c_init_rdg_setting(struct ieee80211_hw *hw);
43 void rtl92c_init_retry_function(struct ieee80211_hw *hw);
45 void rtl92c_disable_fast_edca(struct ieee80211_hw *hw);
46 void rtl92c_set_min_space(struct ieee80211_hw *hw, bool is2T);
48 u32 rtl92c_get_txdma_status(struct ieee80211_hw *hw);
50 struct rx_fwinfo_92c {
82 u32 macid:5; /* word 1 */
96 u32 seq:12; /* word 2 */
101 u32 rxmcs:6; /* word 3 */
113 u32 iv1; /* word 4 */
114 u32 tsfl; /* word 5 */
115 u32 bufferaddress; /* word 6 */
116 u32 bufferaddress64; /* word 7 */
119 enum rtl_desc_qsel rtl92c_map_hwqueue_to_fwqueue(u16 fc,
122 void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw,
124 struct rtl_stats *pstats,
125 struct rx_desc_92c *pdesc,
126 struct rx_fwinfo_92c *p_drvinfo);
128 /*---------------------------------------------------------------
129 * Card disable functions
130 *---------------------------------------------------------------*/