GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / staging / rtl8188eu / include / rtw_ioctl.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15 #ifndef _RTW_IOCTL_H_
16 #define _RTW_IOCTL_H_
17
18 #include <osdep_service.h>
19 #include <drv_types.h>
20
21
22 #ifndef OID_802_11_CAPABILITY
23         #define OID_802_11_CAPABILITY   0x0d010122
24 #endif
25
26 #ifndef OID_802_11_PMKID
27         #define OID_802_11_PMKID        0x0d010123
28 #endif
29
30
31 /*  For DDK-defined OIDs */
32 #define OID_NDIS_SEG1   0x00010100
33 #define OID_NDIS_SEG2   0x00010200
34 #define OID_NDIS_SEG3   0x00020100
35 #define OID_NDIS_SEG4   0x01010100
36 #define OID_NDIS_SEG5   0x01020100
37 #define OID_NDIS_SEG6   0x01020200
38 #define OID_NDIS_SEG7   0xFD010100
39 #define OID_NDIS_SEG8   0x0D010100
40 #define OID_NDIS_SEG9   0x0D010200
41 #define OID_NDIS_SEG10  0x0D020200
42
43 #define SZ_OID_NDIS_SEG1        23
44 #define SZ_OID_NDIS_SEG2        3
45 #define SZ_OID_NDIS_SEG3        6
46 #define SZ_OID_NDIS_SEG4        6
47 #define SZ_OID_NDIS_SEG5        4
48 #define SZ_OID_NDIS_SEG6        8
49 #define SZ_OID_NDIS_SEG7        7
50 #define SZ_OID_NDIS_SEG8        36
51 #define SZ_OID_NDIS_SEG9        24
52 #define SZ_OID_NDIS_SEG10       19
53
54 /*  For Realtek-defined OIDs */
55 #define OID_MP_SEG1             0xFF871100
56 #define OID_MP_SEG2             0xFF818000
57
58 #define OID_MP_SEG3             0xFF818700
59 #define OID_MP_SEG4             0xFF011100
60
61 enum oid_type {
62         QUERY_OID,
63         SET_OID
64 };
65
66 struct oid_par_priv {
67         void            *adapter_context;
68         NDIS_OID        oid;
69         void            *information_buf;
70         u32             information_buf_len;
71         u32             *bytes_rw;
72         u32             *bytes_needed;
73         enum oid_type   type_of_oid;
74         u32             dbg;
75 };
76
77 #if defined(_RTW_MP_IOCTL_C_)
78 static int oid_null_function(struct oid_par_priv *poid_par_priv)
79 {
80         return NDIS_STATUS_SUCCESS;
81 }
82 #endif
83
84 extern struct iw_handler_def  rtw_handlers_def;
85
86 int drv_query_info(struct  net_device *miniportadaptercontext, NDIS_OID oid,
87                    void *informationbuffer, u32 informationbufferlength,
88                    u32 *byteswritten, u32 *bytesneeded);
89
90 int drv_set_info(struct  net_device *MiniportAdapterContext,
91                  NDIS_OID oid, void *informationbuffer,
92                  u32 informationbufferlength, u32 *bytesread,
93                  u32 *bytesneeded);
94
95 #endif /*  #ifndef __INC_CEINFO_ */