1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30#ifndef __RTL92C_MAC_H__
31#define __RTL92C_MAC_H__
32
33#define LLT_LAST_ENTRY_OF_TX_PKT_BUFFER 255
34#define DRIVER_EARLY_INT_TIME 0x05
35#define BCN_DMA_ATIME_INT_TIME 0x02
36
37void rtl92c_read_chip_version(struct ieee80211_hw *hw);
38bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data);
39bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary);
40void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
41 u8 *p_macaddr, bool is_group, u8 enc_algo,
42 bool is_wepkey, bool clear_all);
43void rtl92c_enable_interrupt(struct ieee80211_hw *hw);
44void rtl92c_disable_interrupt(struct ieee80211_hw *hw);
45void rtl92c_set_qos(struct ieee80211_hw *hw, int aci);
46
47
48
49
50
51void rtl92c_init_interrupt(struct ieee80211_hw *hw);
52void rtl92c_init_driver_info_size(struct ieee80211_hw *hw, u8 size);
53
54int rtl92c_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type);
55void rtl92c_init_network_type(struct ieee80211_hw *hw);
56void rtl92c_init_adaptive_ctrl(struct ieee80211_hw *hw);
57void rtl92c_init_rate_fallback(struct ieee80211_hw *hw);
58
59void rtl92c_init_edca_param(struct ieee80211_hw *hw,
60 u16 queue,
61 u16 txop,
62 u8 ecwmax,
63 u8 ecwmin,
64 u8 aifs);
65
66void rtl92c_init_edca(struct ieee80211_hw *hw);
67void rtl92c_init_ampdu_aggregation(struct ieee80211_hw *hw);
68void rtl92c_init_beacon_max_error(struct ieee80211_hw *hw);
69void rtl92c_init_rdg_setting(struct ieee80211_hw *hw);
70void rtl92c_init_retry_function(struct ieee80211_hw *hw);
71
72void rtl92c_disable_fast_edca(struct ieee80211_hw *hw);
73void rtl92c_set_min_space(struct ieee80211_hw *hw, bool is2T);
74
75u32 rtl92c_get_txdma_status(struct ieee80211_hw *hw);
76
77struct rx_fwinfo_92c {
78 u8 gain_trsw[4];
79 u8 pwdb_all;
80 u8 cfosho[4];
81 u8 cfotail[4];
82 char rxevm[2];
83 char rxsnr[4];
84 u8 pdsnr[2];
85 u8 csi_current[2];
86 u8 csi_target[2];
87 u8 sigevm;
88 u8 max_ex_pwr;
89 u8 ex_intf_flag:1;
90 u8 sgi_en:1;
91 u8 rxsc:2;
92 u8 reserve:4;
93} __packed;
94
95struct rx_desc_92c {
96 u32 length:14;
97 u32 crc32:1;
98 u32 icverror:1;
99 u32 drv_infosize:4;
100 u32 security:3;
101 u32 qos:1;
102 u32 shift:2;
103 u32 phystatus:1;
104 u32 swdec:1;
105 u32 lastseg:1;
106 u32 firstseg:1;
107 u32 eor:1;
108 u32 own:1;
109 u32 macid:5;
110 u32 tid:4;
111 u32 hwrsvd:5;
112 u32 paggr:1;
113 u32 faggr:1;
114 u32 a1_fit:4;
115 u32 a2_fit:4;
116 u32 pam:1;
117 u32 pwr:1;
118 u32 moredata:1;
119 u32 morefrag:1;
120 u32 type:2;
121 u32 mc:1;
122 u32 bc:1;
123 u32 seq:12;
124 u32 frag:4;
125 u32 nextpktlen:14;
126 u32 nextind:1;
127 u32 rsvd:1;
128 u32 rxmcs:6;
129 u32 rxht:1;
130 u32 amsdu:1;
131 u32 splcp:1;
132 u32 bandwidth:1;
133 u32 htc:1;
134 u32 tcpchk_rpt:1;
135 u32 ipcchk_rpt:1;
136 u32 tcpchk_valid:1;
137 u32 hwpcerr:1;
138 u32 hwpcind:1;
139 u32 iv0:16;
140 u32 iv1;
141 u32 tsfl;
142 u32 bufferaddress;
143 u32 bufferaddress64;
144} __packed;
145
146enum rtl_desc_qsel rtl92c_map_hwqueue_to_fwqueue(u16 fc,
147 unsigned int
148 skb_queue);
149void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw,
150 struct sk_buff *skb,
151 struct rtl_stats *pstats,
152 struct rx_desc_92c *pdesc,
153 struct rx_fwinfo_92c *p_drvinfo);
154
155
156
157
158
159
160
161#endif
162