wm_ioctl.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
  3. *
  4. * This software is licensed under the terms of the GNU General Public
  5. * License version 2, as published by the Free Software Foundation, and
  6. * may be copied, distributed, and modified under those terms.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __GDM72XX_WM_IOCTL_H__
  14. #define __GDM72XX_WM_IOCTL_H__
  15. #if !defined(__KERNEL__)
  16. #include <net/if.h>
  17. #endif
  18. #define NETLINK_WIMAX 31
  19. #define SIOCWMIOCTL SIOCDEVPRIVATE
  20. #define SIOCG_DATA 0x8D10
  21. #define SIOCS_DATA 0x8D11
  22. enum {
  23. SIOC_DATA_FSM,
  24. SIOC_DATA_NETLIST,
  25. SIOC_DATA_CONNNSP,
  26. SIOC_DATA_CONNCOMP,
  27. SIOC_DATA_PROFILEID,
  28. SIOC_DATA_END
  29. };
  30. #define SIOC_DATA_MAX 16
  31. /* FSM */
  32. enum {
  33. M_INIT = 0,
  34. M_OPEN_OFF,
  35. M_OPEN_ON,
  36. M_SCAN,
  37. M_CONNECTING,
  38. M_CONNECTED,
  39. M_FSM_END,
  40. C_INIT = 0,
  41. C_CONNSTART,
  42. C_ASSOCSTART,
  43. C_RNG,
  44. C_SBC,
  45. C_AUTH,
  46. C_REG,
  47. C_DSX,
  48. C_ASSOCCOMPLETE,
  49. C_CONNCOMPLETE,
  50. C_FSM_END,
  51. D_INIT = 0,
  52. D_READY,
  53. D_LISTEN,
  54. D_IPACQUISITION,
  55. END_FSM
  56. };
  57. struct fsm_s {
  58. int m_status; /*main status*/
  59. int c_status; /*connection status*/
  60. int d_status; /*oma-dm status*/
  61. };
  62. struct data_s {
  63. int size;
  64. void *buf;
  65. };
  66. struct wm_req_s {
  67. union {
  68. char ifrn_name[IFNAMSIZ];
  69. } ifr_ifrn;
  70. unsigned short cmd;
  71. unsigned short data_id;
  72. struct data_s data;
  73. /* NOTE: sizeof(struct wm_req_s) must be less than sizeof(struct ifreq). */
  74. };
  75. #ifndef ifr_name
  76. #define ifr_name ifr_ifrn.ifrn_name
  77. #endif
  78. #endif /* __GDM72XX_WM_IOCTL_H__ */