Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __IOCTL_H
0003 #define __IOCTL_H
0004 
0005 #include "osdep_service.h"
0006 #include "drv_types.h"
0007 
0008 #ifndef OID_802_11_CAPABILITY
0009     #define OID_802_11_CAPABILITY                   0x0d010122
0010 #endif
0011 
0012 #ifndef OID_802_11_PMKID
0013     #define OID_802_11_PMKID                        0x0d010123
0014 #endif
0015 
0016 /* For DDK-defined OIDs*/
0017 #define OID_NDIS_SEG1   0x00010100
0018 #define OID_NDIS_SEG2   0x00010200
0019 #define OID_NDIS_SEG3   0x00020100
0020 #define OID_NDIS_SEG4   0x01010100
0021 #define OID_NDIS_SEG5   0x01020100
0022 #define OID_NDIS_SEG6   0x01020200
0023 #define OID_NDIS_SEG7   0xFD010100
0024 #define OID_NDIS_SEG8   0x0D010100
0025 #define OID_NDIS_SEG9   0x0D010200
0026 #define OID_NDIS_SEG10  0x0D020200
0027 #define SZ_OID_NDIS_SEG1    23
0028 #define SZ_OID_NDIS_SEG2    3
0029 #define SZ_OID_NDIS_SEG3    6
0030 #define SZ_OID_NDIS_SEG4    6
0031 #define SZ_OID_NDIS_SEG5    4
0032 #define SZ_OID_NDIS_SEG6    8
0033 #define SZ_OID_NDIS_SEG7    7
0034 #define SZ_OID_NDIS_SEG8    36
0035 #define SZ_OID_NDIS_SEG9    24
0036 #define SZ_OID_NDIS_SEG10   19
0037 
0038 /* For Realtek-defined OIDs*/
0039 #define OID_MP_SEG1 0xFF871100
0040 #define OID_MP_SEG2 0xFF818000
0041 #define OID_MP_SEG3 0xFF818700
0042 #define OID_MP_SEG4 0xFF011100
0043 
0044 enum oid_type {
0045     QUERY_OID,
0046     SET_OID
0047 };
0048 
0049 struct oid_funs_node {
0050     unsigned int oid_start; /*the starting number for OID*/
0051     unsigned int oid_end; /*the ending number for OID*/
0052     struct oid_obj_priv *node_array;
0053     unsigned int array_sz; /*the size of node_array*/
0054     int query_counter; /*count the number of query hits for this segment*/
0055     int set_counter; /*count the number of set hits for this segment*/
0056 };
0057 
0058 struct oid_par_priv {
0059     void    *adapter_context;
0060     uint oid;
0061     void *information_buf;
0062     unsigned long information_buf_len;
0063     unsigned long *bytes_rw;
0064     unsigned long *bytes_needed;
0065     enum oid_type   type_of_oid;
0066     unsigned int dbg;
0067 };
0068 
0069 struct oid_obj_priv {
0070     unsigned char   dbg; /* 0: without OID debug message
0071                   * 1: with OID debug message
0072                   */
0073     uint (*oidfuns)(struct oid_par_priv *poid_par_priv);
0074 };
0075 
0076 uint oid_null_function(struct oid_par_priv *poid_par_priv);
0077 
0078 extern struct iw_handler_def  r871x_handlers_def;
0079 
0080 uint drv_query_info(struct net_device *MiniportAdapterContext,
0081             uint Oid,
0082             void *InformationBuffer,
0083             u32 InformationBufferLength,
0084             u32 *BytesWritten,
0085             u32 *BytesNeeded);
0086 
0087 uint drv_set_info(struct net_device *MiniportAdapterContext,
0088           uint Oid,
0089           void *InformationBuffer,
0090           u32 InformationBufferLength,
0091           u32 *BytesRead,
0092           u32 *BytesNeeded);
0093 
0094 #endif