1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2007 - 2011 Realtek Corporation. */
7 #include "osdep_service.h"
10 #ifndef OID_802_11_CAPABILITY
11 #define OID_802_11_CAPABILITY 0x0d010122
14 #ifndef OID_802_11_PMKID
15 #define OID_802_11_PMKID 0x0d010123
18 /* For DDK-defined OIDs */
19 #define OID_NDIS_SEG1 0x00010100
20 #define OID_NDIS_SEG2 0x00010200
21 #define OID_NDIS_SEG3 0x00020100
22 #define OID_NDIS_SEG4 0x01010100
23 #define OID_NDIS_SEG5 0x01020100
24 #define OID_NDIS_SEG6 0x01020200
25 #define OID_NDIS_SEG7 0xFD010100
26 #define OID_NDIS_SEG8 0x0D010100
27 #define OID_NDIS_SEG9 0x0D010200
28 #define OID_NDIS_SEG10 0x0D020200
30 #define SZ_OID_NDIS_SEG1 23
31 #define SZ_OID_NDIS_SEG2 3
32 #define SZ_OID_NDIS_SEG3 6
33 #define SZ_OID_NDIS_SEG4 6
34 #define SZ_OID_NDIS_SEG5 4
35 #define SZ_OID_NDIS_SEG6 8
36 #define SZ_OID_NDIS_SEG7 7
37 #define SZ_OID_NDIS_SEG8 36
38 #define SZ_OID_NDIS_SEG9 24
39 #define SZ_OID_NDIS_SEG10 19
41 /* For Realtek-defined OIDs */
42 #define OID_MP_SEG1 0xFF871100
43 #define OID_MP_SEG2 0xFF818000
45 #define OID_MP_SEG3 0xFF818700
46 #define OID_MP_SEG4 0xFF011100
53 struct oid_funs_node {
54 unsigned int oid_start; /* the starting number for OID */
55 unsigned int oid_end; /* the ending number for OID */
56 struct oid_obj_priv *node_array;
57 unsigned int array_sz; /* the size of node_array */
58 int query_counter; /* count the number of query hits for this segment */
59 int set_counter; /* count the number of set hits for this segment */
63 void *adapter_context;
65 void *information_buf;
66 u32 information_buf_len;
69 enum oid_type type_of_oid;
74 unsigned char dbg; /* 0: without OID debug message
75 * 1: with OID debug message */
76 int (*oidfuns)(struct oid_par_priv *poid_par_priv);
79 #if defined(_RTW_MP_IOCTL_C_)
80 static int oid_null_function(struct oid_par_priv *poid_par_priv) {
81 return NDIS_STATUS_SUCCESS;
85 extern struct iw_handler_def rtw_handlers_def;
87 int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
88 void *informationbuffer, u32 informationbufferlength,
89 u32 *byteswritten, u32 *bytesneeded);
91 int drv_set_info(struct net_device *MiniportAdapterContext,
92 NDIS_OID oid, void *informationbuffer,
93 u32 informationbufferlength, u32 *bytesread,
98 #endif /* #ifndef __INC_CEINFO_ */