wcmd.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. #define AUTHENTICATE_TIMEOUT 1000
  34. #define ASSOCIATE_TIMEOUT 1000
  35. typedef enum tagCMD_CODE {
  36. WLAN_CMD_BSSID_SCAN,
  37. WLAN_CMD_SSID,
  38. WLAN_CMD_DISASSOCIATE,
  39. WLAN_CMD_DEAUTH,
  40. WLAN_CMD_RX_PSPOLL,
  41. WLAN_CMD_RADIO,
  42. WLAN_CMD_CHANGE_BBSENSITIVITY,
  43. WLAN_CMD_SETPOWER,
  44. WLAN_CMD_TBTT_WAKEUP,
  45. WLAN_CMD_BECON_SEND,
  46. WLAN_CMD_CHANGE_ANTENNA,
  47. WLAN_CMD_REMOVE_ALLKEY,
  48. WLAN_CMD_MAC_DISPOWERSAVING,
  49. WLAN_CMD_11H_CHSW,
  50. WLAN_CMD_RUN_AP
  51. } CMD_CODE, *PCMD_CODE;
  52. #define CMD_Q_SIZE 32
  53. typedef enum tagCMD_STATUS {
  54. CMD_STATUS_SUCCESS = 0,
  55. CMD_STATUS_FAILURE,
  56. CMD_STATUS_RESOURCES,
  57. CMD_STATUS_TIMEOUT,
  58. CMD_STATUS_PENDING
  59. } CMD_STATUS, *PCMD_STATUS;
  60. typedef struct tagCMD_ITEM {
  61. CMD_CODE eCmd;
  62. unsigned char abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
  63. bool bNeedRadioOFF;
  64. unsigned short wDeAuthenReason;
  65. bool bRadioCmd;
  66. bool bForceSCAN;
  67. } CMD_ITEM, *PCMD_ITEM;
  68. typedef enum tagCMD_STATE {
  69. WLAN_CMD_SCAN_START,
  70. WLAN_CMD_SCAN_END,
  71. WLAN_CMD_DISASSOCIATE_START,
  72. WLAN_CMD_SSID_START,
  73. WLAN_AUTHENTICATE_WAIT,
  74. WLAN_ASSOCIATE_WAIT,
  75. WLAN_DISASSOCIATE_WAIT,
  76. WLAN_CMD_TX_PSPACKET_START,
  77. WLAN_CMD_AP_MODE_START,
  78. WLAN_CMD_RADIO_START,
  79. WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE,
  80. WLAN_CMD_IDLE
  81. } CMD_STATE, *PCMD_STATE;
  82. void
  83. vResetCommandTimer(
  84. void *hDeviceContext
  85. );
  86. void
  87. vCommandTimer(
  88. void *hDeviceContext
  89. );
  90. bool bClearBSSID_SCAN(
  91. void *hDeviceContext
  92. );
  93. bool
  94. bScheduleCommand(
  95. void *hDeviceContext,
  96. CMD_CODE eCommand,
  97. unsigned char *pbyItem0
  98. );
  99. void
  100. vCommandTimerWait(
  101. void *hDeviceContext,
  102. unsigned int MSecond
  103. );
  104. void
  105. BSSvSecondTxData(
  106. void *hDeviceContext
  107. );
  108. #endif //__WCMD_H__