rtl871x_ioctl.h 2.3 KB

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