192b96797SForest Bond /* 292b96797SForest Bond * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. 392b96797SForest Bond * All rights reserved. 492b96797SForest Bond * 592b96797SForest Bond * This program is free software; you can redistribute it and/or modify 692b96797SForest Bond * it under the terms of the GNU General Public License as published by 792b96797SForest Bond * the Free Software Foundation; either version 2 of the License, or 892b96797SForest Bond * (at your option) any later version. 992b96797SForest Bond * 1092b96797SForest Bond * This program is distributed in the hope that it will be useful, 1192b96797SForest Bond * but WITHOUT ANY WARRANTY; without even the implied warranty of 1292b96797SForest Bond * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1392b96797SForest Bond * GNU General Public License for more details. 1492b96797SForest Bond * 1592b96797SForest Bond * You should have received a copy of the GNU General Public License along 1692b96797SForest Bond * with this program; if not, write to the Free Software Foundation, Inc., 1792b96797SForest Bond * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 1892b96797SForest Bond * 1992b96797SForest Bond * File: wcmd.h 2092b96797SForest Bond * 2192b96797SForest Bond * Purpose: Handles the management command interface functions 2292b96797SForest Bond * 2392b96797SForest Bond * Author: Lyndon Chen 2492b96797SForest Bond * 2592b96797SForest Bond * Date: May 8, 2002 2692b96797SForest Bond * 2792b96797SForest Bond */ 2892b96797SForest Bond 2992b96797SForest Bond #ifndef __WCMD_H__ 3092b96797SForest Bond #define __WCMD_H__ 3192b96797SForest Bond 3292b96797SForest Bond #if !defined(__TTYPE_H__) 3392b96797SForest Bond #include "ttype.h" 3492b96797SForest Bond #endif 3592b96797SForest Bond #if !defined(__80211HDR_H__) 3692b96797SForest Bond #include "80211hdr.h" 3792b96797SForest Bond #endif 3892b96797SForest Bond #if !defined(__80211MGR_H__) 3992b96797SForest Bond #include "80211mgr.h" 4092b96797SForest Bond #endif 4192b96797SForest Bond 4292b96797SForest Bond /*--------------------- Export Definitions -------------------------*/ 4392b96797SForest Bond 4492b96797SForest Bond 4592b96797SForest Bond 4692b96797SForest Bond #define AUTHENTICATE_TIMEOUT 1000 //ms 4792b96797SForest Bond #define ASSOCIATE_TIMEOUT 1000 //ms 4892b96797SForest Bond 4992b96797SForest Bond 5092b96797SForest Bond // Command code 5192b96797SForest Bond typedef enum tagCMD_CODE { 5292b96797SForest Bond WLAN_CMD_BSSID_SCAN, 5392b96797SForest Bond WLAN_CMD_SSID, 5492b96797SForest Bond WLAN_CMD_DISASSOCIATE, 5592b96797SForest Bond WLAN_CMD_DEAUTH, 5692b96797SForest Bond WLAN_CMD_RX_PSPOLL, 5792b96797SForest Bond WLAN_CMD_RADIO, 5892b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY, 5992b96797SForest Bond WLAN_CMD_SETPOWER, 6092b96797SForest Bond WLAN_CMD_TBTT_WAKEUP, 6192b96797SForest Bond WLAN_CMD_BECON_SEND, 6292b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA, 6392b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY, 6492b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING, 6592b96797SForest Bond WLAN_CMD_11H_CHSW, 6692b96797SForest Bond WLAN_CMD_RUN_AP 6792b96797SForest Bond } CMD_CODE, DEF* PCMD_CODE; 6892b96797SForest Bond 6992b96797SForest Bond #define CMD_Q_SIZE 32 7092b96797SForest Bond 7192b96797SForest Bond typedef enum tagCMD_STATUS { 7292b96797SForest Bond 7392b96797SForest Bond CMD_STATUS_SUCCESS = 0, 7492b96797SForest Bond CMD_STATUS_FAILURE, 7592b96797SForest Bond CMD_STATUS_RESOURCES, 7692b96797SForest Bond CMD_STATUS_TIMEOUT, 7792b96797SForest Bond CMD_STATUS_PENDING 7892b96797SForest Bond 7992b96797SForest Bond } CMD_STATUS, DEF* PCMD_STATUS; 8092b96797SForest Bond 8192b96797SForest Bond typedef struct tagCMD_ITEM { 8292b96797SForest Bond CMD_CODE eCmd; 8392b96797SForest Bond BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; 8492b96797SForest Bond BOOL bNeedRadioOFF; 8592b96797SForest Bond BOOL bRadioCmd; 8692b96797SForest Bond BOOL bForceSCAN; 8792b96797SForest Bond WORD wDeAuthenReason; 8892b96797SForest Bond } CMD_ITEM, DEF* PCMD_ITEM; 8992b96797SForest Bond 9092b96797SForest Bond // Command state 9192b96797SForest Bond typedef enum tagCMD_STATE { 9292b96797SForest Bond WLAN_CMD_SCAN_START, 9392b96797SForest Bond WLAN_CMD_SCAN_END, 9492b96797SForest Bond WLAN_CMD_DISASSOCIATE_START, 9592b96797SForest Bond WLAN_CMD_DEAUTHEN_START, 9692b96797SForest Bond WLAN_CMD_SSID_START, 9792b96797SForest Bond WLAN_AUTHENTICATE_WAIT, 9892b96797SForest Bond WLAN_ASSOCIATE_WAIT, 9992b96797SForest Bond WLAN_DISASSOCIATE_WAIT, 10092b96797SForest Bond WLAN_CMD_TX_PSPACKET_START, 10192b96797SForest Bond WLAN_CMD_RADIO_START, 10292b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY_START, 10392b96797SForest Bond WLAN_CMD_SETPOWER_START, 10492b96797SForest Bond WLAN_CMD_AP_MODE_START, 10592b96797SForest Bond WLAN_CMD_TBTT_WAKEUP_START, 10692b96797SForest Bond WLAN_CMD_BECON_SEND_START, 10792b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA_START, 10892b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY_START, 10992b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING_START, 11092b96797SForest Bond WLAN_CMD_11H_CHSW_START, 11192b96797SForest Bond WLAN_CMD_IDLE 11292b96797SForest Bond } CMD_STATE, DEF* PCMD_STATE; 11392b96797SForest Bond 11492b96797SForest Bond 11592b96797SForest Bond 11692b96797SForest Bond /*--------------------- Export Classes ----------------------------*/ 11792b96797SForest Bond 11892b96797SForest Bond /*--------------------- Export Variables --------------------------*/ 11992b96797SForest Bond 12092b96797SForest Bond 12192b96797SForest Bond /*--------------------- Export Types ------------------------------*/ 12292b96797SForest Bond 12392b96797SForest Bond 12492b96797SForest Bond /*--------------------- Export Functions --------------------------*/ 12592b96797SForest Bond VOID 12692b96797SForest Bond vResetCommandTimer( 12792b96797SForest Bond IN HANDLE hDeviceContext 12892b96797SForest Bond ); 12992b96797SForest Bond 13092b96797SForest Bond BOOL 13192b96797SForest Bond bScheduleCommand( 13292b96797SForest Bond IN HANDLE hDeviceContext, 13392b96797SForest Bond IN CMD_CODE eCommand, 13492b96797SForest Bond IN PBYTE pbyItem0 13592b96797SForest Bond ); 13692b96797SForest Bond 13792b96797SForest Bond VOID 13892b96797SForest Bond vRunCommand( 13992b96797SForest Bond IN HANDLE hDeviceContext 14092b96797SForest Bond ); 14192b96797SForest Bond /* 14292b96797SForest Bond VOID 14392b96797SForest Bond WCMDvCommandThread( 14492b96797SForest Bond PVOID Context 14592b96797SForest Bond ); 14692b96797SForest Bond */ 14792b96797SForest Bond 14892b96797SForest Bond //2007-0115-09<Add>by MikeLiu 14992b96797SForest Bond #ifdef TxInSleep 15092b96797SForest Bond VOID 15192b96797SForest Bond BSSvSecondTxData( 15292b96797SForest Bond IN HANDLE hDeviceContext 15392b96797SForest Bond ); 15492b96797SForest Bond #endif 15592b96797SForest Bond 15692b96797SForest Bond #endif //__WCMD_H__ 157