1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
23 #include <osdep_service.h>
24 #include <drv_types.h>
27 #ifndef OID_802_11_CAPABILITY
28 #define OID_802_11_CAPABILITY 0x0d010122
31 #ifndef OID_802_11_PMKID
32 #define OID_802_11_PMKID 0x0d010123
36 /* For DDK-defined OIDs */
37 #define OID_NDIS_SEG1 0x00010100
38 #define OID_NDIS_SEG2 0x00010200
39 #define OID_NDIS_SEG3 0x00020100
40 #define OID_NDIS_SEG4 0x01010100
41 #define OID_NDIS_SEG5 0x01020100
42 #define OID_NDIS_SEG6 0x01020200
43 #define OID_NDIS_SEG7 0xFD010100
44 #define OID_NDIS_SEG8 0x0D010100
45 #define OID_NDIS_SEG9 0x0D010200
46 #define OID_NDIS_SEG10 0x0D020200
48 #define SZ_OID_NDIS_SEG1 23
49 #define SZ_OID_NDIS_SEG2 3
50 #define SZ_OID_NDIS_SEG3 6
51 #define SZ_OID_NDIS_SEG4 6
52 #define SZ_OID_NDIS_SEG5 4
53 #define SZ_OID_NDIS_SEG6 8
54 #define SZ_OID_NDIS_SEG7 7
55 #define SZ_OID_NDIS_SEG8 36
56 #define SZ_OID_NDIS_SEG9 24
57 #define SZ_OID_NDIS_SEG10 19
59 /* For Realtek-defined OIDs */
60 #define OID_MP_SEG1 0xFF871100
61 #define OID_MP_SEG2 0xFF818000
63 #define OID_MP_SEG3 0xFF818700
64 #define OID_MP_SEG4 0xFF011100
66 #define DEBUG_OID(dbg, str) \
68 RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_, \
69 ("%s(%d): %s", __func__, __line__, str)); \
77 struct oid_funs_node {
78 unsigned int oid_start; /* the starting number for OID */
79 unsigned int oid_end; /* the ending number for OID */
80 struct oid_obj_priv *node_array;
81 unsigned int array_sz; /* the size of node_array */
82 int query_counter; /* count the number of query hits for this segment */
83 int set_counter; /* count the number of set hits for this segment */
87 void *adapter_context;
89 void *information_buf;
90 u32 information_buf_len;
93 enum oid_type type_of_oid;
98 unsigned char dbg; /* 0: without OID debug message
99 * 1: with OID debug message */
100 int (*oidfuns)(struct oid_par_priv *poid_par_priv);
103 #if defined(_RTW_MP_IOCTL_C_)
104 static int oid_null_function(struct oid_par_priv *poid_par_priv) {
107 return NDIS_STATUS_SUCCESS;
111 extern struct iw_handler_def rtw_handlers_def;
113 int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
114 void *informationbuffer, u32 informationbufferlength,
115 u32 *byteswritten, u32 *bytesneeded);
117 int drv_set_info(struct net_device *MiniportAdapterContext,
118 NDIS_OID oid, void *informationbuffer,
119 u32 informationbufferlength, u32 *bytesread,
122 extern int ui_pid[3];
124 #endif /* #ifndef __INC_CEINFO_ */