wcmd.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. * File: wcmd.h
  20. *
  21. * Purpose: Handles the management command interface functions
  22. *
  23. * Author: Lyndon Chen
  24. *
  25. * Date: May 8, 2002
  26. *
  27. */
  28. #ifndef __WCMD_H__
  29. #define __WCMD_H__
  30. #include "ttype.h"
  31. #include "80211hdr.h"
  32. #include "80211mgr.h"
  33. /*--------------------- Export Definitions -------------------------*/
  34. #define AUTHENTICATE_TIMEOUT 1000 //ms
  35. #define ASSOCIATE_TIMEOUT 1000 //ms
  36. // Command code
  37. typedef enum tagCMD_CODE {
  38. WLAN_CMD_BSSID_SCAN,
  39. WLAN_CMD_SSID,
  40. WLAN_CMD_DISASSOCIATE,
  41. WLAN_CMD_DEAUTH,
  42. WLAN_CMD_RX_PSPOLL,
  43. WLAN_CMD_RADIO,
  44. WLAN_CMD_CHANGE_BBSENSITIVITY,
  45. WLAN_CMD_SETPOWER,
  46. WLAN_CMD_TBTT_WAKEUP,
  47. WLAN_CMD_BECON_SEND,
  48. WLAN_CMD_CHANGE_ANTENNA,
  49. WLAN_CMD_REMOVE_ALLKEY,
  50. WLAN_CMD_MAC_DISPOWERSAVING,
  51. WLAN_CMD_11H_CHSW,
  52. WLAN_CMD_RUN_AP
  53. } CMD_CODE, *PCMD_CODE;
  54. #define CMD_Q_SIZE 32
  55. typedef enum tagCMD_STATUS {
  56. CMD_STATUS_SUCCESS = 0,
  57. CMD_STATUS_FAILURE,
  58. CMD_STATUS_RESOURCES,
  59. CMD_STATUS_TIMEOUT,
  60. CMD_STATUS_PENDING
  61. } CMD_STATUS, *PCMD_STATUS;
  62. typedef struct tagCMD_ITEM {
  63. CMD_CODE eCmd;
  64. BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
  65. BOOL bNeedRadioOFF;
  66. BOOL bRadioCmd;
  67. BOOL bForceSCAN;
  68. WORD wDeAuthenReason;
  69. } CMD_ITEM, *PCMD_ITEM;
  70. // Command state
  71. typedef enum tagCMD_STATE {
  72. WLAN_CMD_SCAN_START,
  73. WLAN_CMD_SCAN_END,
  74. WLAN_CMD_DISASSOCIATE_START,
  75. WLAN_CMD_DEAUTHEN_START,
  76. WLAN_CMD_SSID_START,
  77. WLAN_AUTHENTICATE_WAIT,
  78. WLAN_ASSOCIATE_WAIT,
  79. WLAN_DISASSOCIATE_WAIT,
  80. WLAN_CMD_TX_PSPACKET_START,
  81. WLAN_CMD_RADIO_START,
  82. WLAN_CMD_CHANGE_BBSENSITIVITY_START,
  83. WLAN_CMD_SETPOWER_START,
  84. WLAN_CMD_AP_MODE_START,
  85. WLAN_CMD_TBTT_WAKEUP_START,
  86. WLAN_CMD_BECON_SEND_START,
  87. WLAN_CMD_CHANGE_ANTENNA_START,
  88. WLAN_CMD_REMOVE_ALLKEY_START,
  89. WLAN_CMD_MAC_DISPOWERSAVING_START,
  90. WLAN_CMD_11H_CHSW_START,
  91. WLAN_CMD_IDLE
  92. } CMD_STATE, *PCMD_STATE;
  93. /*--------------------- Export Classes ----------------------------*/
  94. /*--------------------- Export Variables --------------------------*/
  95. /*--------------------- Export Types ------------------------------*/
  96. /*--------------------- Export Functions --------------------------*/
  97. void vResetCommandTimer(void *hDeviceContext);
  98. BOOL bScheduleCommand(void *hDeviceContext,
  99. CMD_CODE eCommand,
  100. PBYTE pbyItem0);
  101. void vRunCommand(void *hDeviceContext);
  102. /*
  103. void
  104. WCMDvCommandThread(
  105. void * Context
  106. );
  107. */
  108. void BSSvSecondTxData(void *hDeviceContext);
  109. #endif /* __WCMD_H__ */