1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  ******************************************************************************/
7 #ifndef _RTW_IOCTL_H_
8 #define _RTW_IOCTL_H_
9 
10 #include <osdep_service.h>
11 #include <drv_types.h>
12 
13 #ifndef OID_802_11_CAPABILITY
14 	#define OID_802_11_CAPABILITY	0x0d010122
15 #endif
16 
17 #ifndef OID_802_11_PMKID
18 	#define OID_802_11_PMKID	0x0d010123
19 #endif
20 
21 /*  For DDK-defined OIDs */
22 #define OID_NDIS_SEG1	0x00010100
23 #define OID_NDIS_SEG2	0x00010200
24 #define OID_NDIS_SEG3	0x00020100
25 #define OID_NDIS_SEG4	0x01010100
26 #define OID_NDIS_SEG5	0x01020100
27 #define OID_NDIS_SEG6	0x01020200
28 #define OID_NDIS_SEG7	0xFD010100
29 #define OID_NDIS_SEG8	0x0D010100
30 #define OID_NDIS_SEG9	0x0D010200
31 #define OID_NDIS_SEG10	0x0D020200
32 
33 #define SZ_OID_NDIS_SEG1	23
34 #define SZ_OID_NDIS_SEG2	3
35 #define SZ_OID_NDIS_SEG3	6
36 #define SZ_OID_NDIS_SEG4	6
37 #define SZ_OID_NDIS_SEG5	4
38 #define SZ_OID_NDIS_SEG6	8
39 #define SZ_OID_NDIS_SEG7	7
40 #define SZ_OID_NDIS_SEG8	36
41 #define SZ_OID_NDIS_SEG9	24
42 #define SZ_OID_NDIS_SEG10	19
43 
44 /*  For Realtek-defined OIDs */
45 #define OID_MP_SEG1		0xFF871100
46 #define OID_MP_SEG2		0xFF818000
47 
48 #define OID_MP_SEG3		0xFF818700
49 #define OID_MP_SEG4		0xFF011100
50 
51 enum oid_type {
52 	QUERY_OID,
53 	SET_OID
54 };
55 
56 struct oid_par_priv {
57 	void		*adapter_context;
58 	NDIS_OID	oid;
59 	void		*information_buf;
60 	u32		information_buf_len;
61 	u32		*bytes_rw;
62 	u32		*bytes_needed;
63 	enum oid_type	type_of_oid;
64 	u32		dbg;
65 };
66 
67 #if defined(_RTW_MP_IOCTL_C_)
oid_null_function(struct oid_par_priv * poid_par_priv)68 static int oid_null_function(struct oid_par_priv *poid_par_priv)
69 {
70 	return NDIS_STATUS_SUCCESS;
71 }
72 #endif
73 
74 extern struct iw_handler_def  rtw_handlers_def;
75 
76 int drv_query_info(struct  net_device *miniportadaptercontext, NDIS_OID oid,
77 		   void *informationbuffer, u32 informationbufferlength,
78 		   u32 *byteswritten, u32 *bytesneeded);
79 
80 int drv_set_info(struct  net_device *MiniportAdapterContext,
81 		 NDIS_OID oid, void *informationbuffer,
82 		 u32 informationbufferlength, u32 *bytesread,
83 		 u32 *bytesneeded);
84 
85 #endif /*  #ifndef __INC_CEINFO_ */
86