linux/drivers/staging/rtl8712/rtl871x_ioctl.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#ifndef __IOCTL_H
   3#define __IOCTL_H
   4
   5#include "osdep_service.h"
   6#include "drv_types.h"
   7
   8#ifndef OID_802_11_CAPABILITY
   9        #define OID_802_11_CAPABILITY                   0x0d010122
  10#endif
  11
  12#ifndef OID_802_11_PMKID
  13        #define OID_802_11_PMKID                        0x0d010123
  14#endif
  15
  16
  17/* For DDK-defined OIDs*/
  18#define OID_NDIS_SEG1   0x00010100
  19#define OID_NDIS_SEG2   0x00010200
  20#define OID_NDIS_SEG3   0x00020100
  21#define OID_NDIS_SEG4   0x01010100
  22#define OID_NDIS_SEG5   0x01020100
  23#define OID_NDIS_SEG6   0x01020200
  24#define OID_NDIS_SEG7   0xFD010100
  25#define OID_NDIS_SEG8   0x0D010100
  26#define OID_NDIS_SEG9   0x0D010200
  27#define OID_NDIS_SEG10  0x0D020200
  28#define SZ_OID_NDIS_SEG1        23
  29#define SZ_OID_NDIS_SEG2        3
  30#define SZ_OID_NDIS_SEG3        6
  31#define SZ_OID_NDIS_SEG4        6
  32#define SZ_OID_NDIS_SEG5        4
  33#define SZ_OID_NDIS_SEG6        8
  34#define SZ_OID_NDIS_SEG7        7
  35#define SZ_OID_NDIS_SEG8        36
  36#define SZ_OID_NDIS_SEG9        24
  37#define SZ_OID_NDIS_SEG10       19
  38
  39/* For Realtek-defined OIDs*/
  40#define OID_MP_SEG1     0xFF871100
  41#define OID_MP_SEG2     0xFF818000
  42#define OID_MP_SEG3     0xFF818700
  43#define OID_MP_SEG4     0xFF011100
  44
  45enum oid_type {
  46        QUERY_OID,
  47        SET_OID
  48};
  49
  50struct oid_funs_node {
  51        unsigned int oid_start; /*the starting number for OID*/
  52        unsigned int oid_end; /*the ending number for OID*/
  53        struct oid_obj_priv *node_array;
  54        unsigned int array_sz; /*the size of node_array*/
  55        int query_counter; /*count the number of query hits for this segment*/
  56        int set_counter; /*count the number of set hits for this segment*/
  57};
  58
  59struct oid_par_priv {
  60        void    *adapter_context;
  61        uint oid;
  62        void *information_buf;
  63        unsigned long information_buf_len;
  64        unsigned long *bytes_rw;
  65        unsigned long *bytes_needed;
  66        enum oid_type   type_of_oid;
  67        unsigned int dbg;
  68};
  69
  70struct oid_obj_priv {
  71        unsigned char   dbg; /* 0: without OID debug message
  72                              * 1: with OID debug message
  73                              */
  74        uint (*oidfuns)(struct oid_par_priv *poid_par_priv);
  75};
  76
  77uint oid_null_function(struct oid_par_priv *poid_par_priv);
  78
  79extern struct iw_handler_def  r871x_handlers_def;
  80
  81uint drv_query_info(struct net_device *MiniportAdapterContext,
  82                    uint Oid,
  83                    void *InformationBuffer,
  84                    u32 InformationBufferLength,
  85                    u32 *BytesWritten,
  86                    u32 *BytesNeeded);
  87
  88uint drv_set_info(struct net_device *MiniportAdapterContext,
  89                  uint Oid,
  90                  void *InformationBuffer,
  91                  u32 InformationBufferLength,
  92                  u32 *BytesRead,
  93                  u32 *BytesNeeded);
  94
  95#endif
  96