1
2
3
4#ifndef _RTW_MP_IOCTL_H_
5#define _RTW_MP_IOCTL_H_
6
7#include "drv_types.h"
8#include "mp_custom_oid.h"
9#include "rtw_ioctl.h"
10#include "rtw_ioctl_rtl.h"
11#include "rtw_efuse.h"
12#include "rtw_mp.h"
13
14struct cfg_dbg_msg_struct {
15 u32 DebugLevel;
16 u32 DebugComponent_H32;
17 u32 DebugComponent_L32;
18};
19
20struct mp_rw_reg {
21 u32 offset;
22 u32 width;
23 u32 value;
24};
25
26struct efuse_access_struct {
27 u16 start_addr;
28 u16 cnts;
29 u8 data[0];
30};
31
32struct burst_rw_reg {
33 u32 offset;
34 u32 len;
35 u8 Data[256];
36};
37
38struct usb_vendor_req {
39 u8 bRequest;
40 u16 wValue;
41 u16 wIndex;
42 u16 wLength;
43 u8 u8Dir;
44 u8 u8InData;
45};
46
47struct dr_variable_struct {
48 u8 offset;
49 u32 variable;
50};
51
52#define _irqlevel_changed_(a, b)
53
54int rtl8188eu_oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv);
55int rtl8188eu_oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv);
56int rtl8188eu_oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv);
57int rtl8188eu_oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv);
58int rtl8188eu_oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv);
59int rtl8188eu_oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv);
60
61int rtl8188eu_oid_rt_pro_query_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv);
62int rtl8188eu_oid_rt_pro_query_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv);
63int rtl8188eu_oid_rt_pro_query_rx_packet_crc32_error_hdl(struct oid_par_priv *par_priv);
64int rtl8188eu_oid_rt_pro_reset_tx_packet_sent_hdl(struct oid_par_priv *poid_par_priv);
65int rtl8188eu_oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv *par_priv);
66int rtl8188eu_oid_rt_pro_set_modulation_hdl(struct oid_par_priv *poid_par_priv);
67int rtl8188eu_oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv);
68int rtl8188eu_oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv);
69int rtl8188eu_oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *par_priv);
70int rtl8188eu_oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv);
71
72
73int rtl8188eu_oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv);
74int rtl8188eu_oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv);
75int rtl8188eu_oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv);
76int rtl8188eu_oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv);
77
78int rtl8188eu_oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv);
79
80
81int rtl8188eu_oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv);
82int rtl8188eu_oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv);
83int rtl8188eu_oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv);
84int rtl8188eu_oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv);
85int rtl8188eu_oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv);
86int rtl8188eu_oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv);
87int rtl8188eu_oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv);
88int rtl8188eu_oid_rt_pro_write16_eeprom_hdl(struct oid_par_priv *poid_par_priv);
89int rtl8188eu_oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv);
90int rtl8188eu_oid_rt_pro8711_pkt_loss_hdl(struct oid_par_priv *poid_par_priv);
91int rtl8188eu_oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv);
92int rtl8188eu_oid_rt_wr_attrib_mem_hdl (struct oid_par_priv *poid_par_priv);
93int rtl8188eu_oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv);
94int rtl8188eu_oid_rt_poll_rx_status_hdl(struct oid_par_priv *poid_par_priv);
95
96int rtl8188eu_oid_rt_pro_cfg_debug_message_hdl(struct oid_par_priv *poid_par_priv);
97int rtl8188eu_oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv);
98int rtl8188eu_oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv);
99int rtl8188eu_oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv);
100int rtl8188eu_oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv);
101
102int rtl8188eu_oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv);
103int rtl8188eu_oid_rt_pro_set_pwrstate_hdl(struct oid_par_priv *poid_par_priv);
104
105int rtl8188eu_oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv);
106int rtl8188eu_oid_rt_pro_h2c_get_rate_table_hdl(struct oid_par_priv *poid_par_priv);
107
108
109int rtl8188eu_oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv *poid_par_priv);
110int rtl8188eu_oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv);
111int rtl8188eu_oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv);
112int rtl8188eu_oid_rt_pro_query_dr_variable_hdl(struct oid_par_priv *poid_par_priv);
113int rtl8188eu_oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv);
114int rtl8188eu_oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv);
115int rtl8188eu_oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv);
116int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv);
117int rtl8188eu_oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv);
118int rtl8188eu_oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv);
119int rtl8188eu_oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv);
120int rtl8188eu_oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv);
121int rtl8188eu_oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv);
122int rtl8188eu_oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv);
123int rtl8188eu_oid_rt_get_efuse_max_size_hdl(struct oid_par_priv *poid_par_priv);
124int rtl8188eu_oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv);
125int rtl8188eu_oid_rt_pro_set_pkt_test_mode_hdl(struct oid_par_priv *poid_par_priv);
126int rtl8188eu_oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv);
127int rtl8188eu_oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv);
128int rtl8188eu_oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv);
129int rtl8188eu_oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *par_priv);
130int rtl8188eu_oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv);
131int rtl8188eu_oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv);
132int rtl8188eu_oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv);
133
134struct rwreg_param {
135 u32 offset;
136 u32 width;
137 u32 value;
138};
139
140struct bbreg_param {
141 u32 offset;
142 u32 phymask;
143 u32 value;
144};
145
146struct txpower_param {
147 u32 pwr_index;
148};
149
150struct datarate_param {
151 u32 rate_index;
152};
153
154struct rfintfs_parm {
155 u32 rfintfs;
156};
157
158struct mp_xmit_parm {
159 u8 enable;
160 u32 count;
161 u16 length;
162 u8 payload_type;
163 u8 da[ETH_ALEN];
164};
165
166struct mp_xmit_packet {
167 u32 len;
168 u32 mem[MAX_MP_XMITBUF_SZ >> 2];
169};
170
171struct psmode_param {
172 u32 ps_mode;
173 u32 smart_ps;
174};
175
176
177struct eeprom_rw_param {
178 u32 offset;
179 u16 value;
180};
181
182struct mp_ioctl_handler {
183 u32 paramsize;
184 s32 (*handler)(struct oid_par_priv* poid_par_priv);
185 u32 oid;
186};
187
188struct mp_ioctl_param{
189 u32 subcode;
190 u32 len;
191 u8 data[0];
192};
193
194#define GEN_MP_IOCTL_SUBCODE(code) _MP_IOCTL_ ## code ## _CMD_
195
196enum RTL871X_MP_IOCTL_SUBCODE {
197 GEN_MP_IOCTL_SUBCODE(MP_START),
198 GEN_MP_IOCTL_SUBCODE(MP_STOP),
199 GEN_MP_IOCTL_SUBCODE(READ_REG),
200 GEN_MP_IOCTL_SUBCODE(WRITE_REG),
201 GEN_MP_IOCTL_SUBCODE(READ_BB_REG),
202 GEN_MP_IOCTL_SUBCODE(WRITE_BB_REG),
203 GEN_MP_IOCTL_SUBCODE(READ_RF_REG),
204 GEN_MP_IOCTL_SUBCODE(WRITE_RF_REG),
205 GEN_MP_IOCTL_SUBCODE(SET_CHANNEL),
206 GEN_MP_IOCTL_SUBCODE(SET_TXPOWER),
207 GEN_MP_IOCTL_SUBCODE(SET_DATARATE),
208 GEN_MP_IOCTL_SUBCODE(SET_BANDWIDTH),
209 GEN_MP_IOCTL_SUBCODE(SET_ANTENNA),
210 GEN_MP_IOCTL_SUBCODE(CNTU_TX),
211 GEN_MP_IOCTL_SUBCODE(SC_TX),
212 GEN_MP_IOCTL_SUBCODE(CS_TX),
213 GEN_MP_IOCTL_SUBCODE(ST_TX),
214 GEN_MP_IOCTL_SUBCODE(IOCTL_XMIT_PACKET),
215 GEN_MP_IOCTL_SUBCODE(SET_RX_PKT_TYPE),
216 GEN_MP_IOCTL_SUBCODE(RESET_PHY_RX_PKT_CNT),
217 GEN_MP_IOCTL_SUBCODE(GET_PHY_RX_PKT_RECV),
218 GEN_MP_IOCTL_SUBCODE(GET_PHY_RX_PKT_ERROR),
219 GEN_MP_IOCTL_SUBCODE(READ16_EEPROM),
220 GEN_MP_IOCTL_SUBCODE(WRITE16_EEPROM),
221 GEN_MP_IOCTL_SUBCODE(EFUSE),
222 GEN_MP_IOCTL_SUBCODE(EFUSE_MAP),
223 GEN_MP_IOCTL_SUBCODE(GET_EFUSE_MAX_SIZE),
224 GEN_MP_IOCTL_SUBCODE(GET_EFUSE_CURRENT_SIZE),
225 GEN_MP_IOCTL_SUBCODE(GET_THERMAL_METER),
226 GEN_MP_IOCTL_SUBCODE(SET_PTM),
227 GEN_MP_IOCTL_SUBCODE(SET_POWER_DOWN),
228 GEN_MP_IOCTL_SUBCODE(TRIGGER_GPIO),
229 GEN_MP_IOCTL_SUBCODE(SET_DM_BT),
230 GEN_MP_IOCTL_SUBCODE(DEL_BA),
231 GEN_MP_IOCTL_SUBCODE(GET_WIFI_STATUS),
232 MAX_MP_IOCTL_SUBCODE,
233};
234
235s32 rtl8188eu_mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv);
236
237#define GEN_HANDLER(sz, hdl, oid) {sz, hdl, oid},
238
239#define EXT_MP_IOCTL_HANDLER(sz, subcode, oid) \
240 {sz, rtl8188eu_mp_ioctl_##subcode##_hdl, oid},
241
242#endif
243