Commit | Line | Data |
---|---|---|
93dc9cc6 LF |
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 | * | |
93dc9cc6 LF |
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 | #define DEBUG_OID(dbg, str) \ | |
62 | if ((!dbg)) { \ | |
63 | RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_, \ | |
64 | ("%s(%d): %s", __func__, __line__, str)); \ | |
65 | } | |
66 | ||
67 | enum oid_type { | |
68 | QUERY_OID, | |
69 | SET_OID | |
70 | }; | |
71 | ||
93dc9cc6 LF |
72 | struct oid_par_priv { |
73 | void *adapter_context; | |
74 | NDIS_OID oid; | |
75 | void *information_buf; | |
76 | u32 information_buf_len; | |
77 | u32 *bytes_rw; | |
78 | u32 *bytes_needed; | |
79 | enum oid_type type_of_oid; | |
80 | u32 dbg; | |
81 | }; | |
82 | ||
93dc9cc6 LF |
83 | #if defined(_RTW_MP_IOCTL_C_) |
84 | static int oid_null_function(struct oid_par_priv *poid_par_priv) { | |
93dc9cc6 LF |
85 | return NDIS_STATUS_SUCCESS; |
86 | } | |
87 | #endif | |
88 | ||
89 | extern struct iw_handler_def rtw_handlers_def; | |
90 | ||
91 | int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid, | |
92 | void *informationbuffer, u32 informationbufferlength, | |
93 | u32 *byteswritten, u32 *bytesneeded); | |
94 | ||
95 | int drv_set_info(struct net_device *MiniportAdapterContext, | |
96 | NDIS_OID oid, void *informationbuffer, | |
97 | u32 informationbufferlength, u32 *bytesread, | |
98 | u32 *bytesneeded); | |
99 | ||
93dc9cc6 | 100 | #endif /* #ifndef __INC_CEINFO_ */ |