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 #include "ttype.h" 3392b96797SForest Bond #include "80211hdr.h" 3492b96797SForest Bond #include "80211mgr.h" 3592b96797SForest Bond 3692b96797SForest Bond /*--------------------- Export Definitions -------------------------*/ 3792b96797SForest Bond 3892b96797SForest Bond 3992b96797SForest Bond 4092b96797SForest Bond #define AUTHENTICATE_TIMEOUT 1000 //ms 4192b96797SForest Bond #define ASSOCIATE_TIMEOUT 1000 //ms 4292b96797SForest Bond 4392b96797SForest Bond 4492b96797SForest Bond // Command code 4592b96797SForest Bond typedef enum tagCMD_CODE { 4692b96797SForest Bond WLAN_CMD_BSSID_SCAN, 4792b96797SForest Bond WLAN_CMD_SSID, 4892b96797SForest Bond WLAN_CMD_DISASSOCIATE, 4992b96797SForest Bond WLAN_CMD_DEAUTH, 5092b96797SForest Bond WLAN_CMD_RX_PSPOLL, 5192b96797SForest Bond WLAN_CMD_RADIO, 5292b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY, 5392b96797SForest Bond WLAN_CMD_SETPOWER, 5492b96797SForest Bond WLAN_CMD_TBTT_WAKEUP, 5592b96797SForest Bond WLAN_CMD_BECON_SEND, 5692b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA, 5792b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY, 5892b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING, 5992b96797SForest Bond WLAN_CMD_11H_CHSW, 6092b96797SForest Bond WLAN_CMD_RUN_AP 61193a823cSJim Lieb } CMD_CODE, *PCMD_CODE; 6292b96797SForest Bond 6392b96797SForest Bond #define CMD_Q_SIZE 32 6492b96797SForest Bond 6592b96797SForest Bond typedef enum tagCMD_STATUS { 6692b96797SForest Bond 6792b96797SForest Bond CMD_STATUS_SUCCESS = 0, 6892b96797SForest Bond CMD_STATUS_FAILURE, 6992b96797SForest Bond CMD_STATUS_RESOURCES, 7092b96797SForest Bond CMD_STATUS_TIMEOUT, 7192b96797SForest Bond CMD_STATUS_PENDING 7292b96797SForest Bond 73193a823cSJim Lieb } CMD_STATUS, *PCMD_STATUS; 7492b96797SForest Bond 7592b96797SForest Bond typedef struct tagCMD_ITEM { 7692b96797SForest Bond CMD_CODE eCmd; 7792b96797SForest Bond BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; 7892b96797SForest Bond BOOL bNeedRadioOFF; 7992b96797SForest Bond BOOL bRadioCmd; 8092b96797SForest Bond BOOL bForceSCAN; 8192b96797SForest Bond WORD wDeAuthenReason; 82193a823cSJim Lieb } CMD_ITEM, *PCMD_ITEM; 8392b96797SForest Bond 8492b96797SForest Bond // Command state 8592b96797SForest Bond typedef enum tagCMD_STATE { 8692b96797SForest Bond WLAN_CMD_SCAN_START, 8792b96797SForest Bond WLAN_CMD_SCAN_END, 8892b96797SForest Bond WLAN_CMD_DISASSOCIATE_START, 8992b96797SForest Bond WLAN_CMD_DEAUTHEN_START, 9092b96797SForest Bond WLAN_CMD_SSID_START, 9192b96797SForest Bond WLAN_AUTHENTICATE_WAIT, 9292b96797SForest Bond WLAN_ASSOCIATE_WAIT, 9392b96797SForest Bond WLAN_DISASSOCIATE_WAIT, 9492b96797SForest Bond WLAN_CMD_TX_PSPACKET_START, 9592b96797SForest Bond WLAN_CMD_RADIO_START, 9692b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY_START, 9792b96797SForest Bond WLAN_CMD_SETPOWER_START, 9892b96797SForest Bond WLAN_CMD_AP_MODE_START, 9992b96797SForest Bond WLAN_CMD_TBTT_WAKEUP_START, 10092b96797SForest Bond WLAN_CMD_BECON_SEND_START, 10192b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA_START, 10292b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY_START, 10392b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING_START, 10492b96797SForest Bond WLAN_CMD_11H_CHSW_START, 10592b96797SForest Bond WLAN_CMD_IDLE 106193a823cSJim Lieb } CMD_STATE, *PCMD_STATE; 10792b96797SForest Bond 10892b96797SForest Bond 10992b96797SForest Bond 11092b96797SForest Bond /*--------------------- Export Classes ----------------------------*/ 11192b96797SForest Bond 11292b96797SForest Bond /*--------------------- Export Variables --------------------------*/ 11392b96797SForest Bond 11492b96797SForest Bond 11592b96797SForest Bond /*--------------------- Export Types ------------------------------*/ 11692b96797SForest Bond 11792b96797SForest Bond 11892b96797SForest Bond /*--------------------- Export Functions --------------------------*/ 1198611a29aSAndres More void 12092b96797SForest Bond vResetCommandTimer( 121592ccfebSAndres More HANDLE hDeviceContext 12292b96797SForest Bond ); 12392b96797SForest Bond 12492b96797SForest Bond BOOL 12592b96797SForest Bond bScheduleCommand( 126592ccfebSAndres More HANDLE hDeviceContext, 127592ccfebSAndres More CMD_CODE eCommand, 128592ccfebSAndres More PBYTE pbyItem0 12992b96797SForest Bond ); 13092b96797SForest Bond 1318611a29aSAndres More void 13292b96797SForest Bond vRunCommand( 133592ccfebSAndres More HANDLE hDeviceContext 13492b96797SForest Bond ); 13592b96797SForest Bond /* 1368611a29aSAndres More void 13792b96797SForest Bond WCMDvCommandThread( 1388611a29aSAndres More void * Context 13992b96797SForest Bond ); 14092b96797SForest Bond */ 14192b96797SForest Bond 14292b96797SForest Bond //2007-0115-09<Add>by MikeLiu 14392b96797SForest Bond #ifdef TxInSleep 1448611a29aSAndres More void 14592b96797SForest Bond BSSvSecondTxData( 146592ccfebSAndres More HANDLE hDeviceContext 14792b96797SForest Bond ); 14892b96797SForest Bond #endif 14992b96797SForest Bond 150e7b07d1dSAndres More #endif /* __WCMD_H__ */ 151