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 #include "ttype.h" 3292b96797SForest Bond #include "80211hdr.h" 3392b96797SForest Bond #include "80211mgr.h" 3492b96797SForest Bond 3592b96797SForest Bond /*--------------------- Export Definitions -------------------------*/ 3692b96797SForest Bond 3792b96797SForest Bond 3892b96797SForest Bond 3992b96797SForest Bond #define AUTHENTICATE_TIMEOUT 1000 //ms 4092b96797SForest Bond #define ASSOCIATE_TIMEOUT 1000 //ms 4192b96797SForest Bond 4292b96797SForest Bond 4392b96797SForest Bond // Command code 4492b96797SForest Bond typedef enum tagCMD_CODE { 4592b96797SForest Bond WLAN_CMD_BSSID_SCAN, 4692b96797SForest Bond WLAN_CMD_SSID, 4792b96797SForest Bond WLAN_CMD_DISASSOCIATE, 4892b96797SForest Bond WLAN_CMD_DEAUTH, 4992b96797SForest Bond WLAN_CMD_RX_PSPOLL, 5092b96797SForest Bond WLAN_CMD_RADIO, 5192b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY, 5292b96797SForest Bond WLAN_CMD_SETPOWER, 5392b96797SForest Bond WLAN_CMD_TBTT_WAKEUP, 5492b96797SForest Bond WLAN_CMD_BECON_SEND, 5592b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA, 5692b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY, 5792b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING, 5892b96797SForest Bond WLAN_CMD_11H_CHSW, 5992b96797SForest Bond WLAN_CMD_RUN_AP 60193a823cSJim Lieb } CMD_CODE, *PCMD_CODE; 6192b96797SForest Bond 6292b96797SForest Bond #define CMD_Q_SIZE 32 6392b96797SForest Bond 6492b96797SForest Bond typedef enum tagCMD_STATUS { 6592b96797SForest Bond 6692b96797SForest Bond CMD_STATUS_SUCCESS = 0, 6792b96797SForest Bond CMD_STATUS_FAILURE, 6892b96797SForest Bond CMD_STATUS_RESOURCES, 6992b96797SForest Bond CMD_STATUS_TIMEOUT, 7092b96797SForest Bond CMD_STATUS_PENDING 7192b96797SForest Bond 72193a823cSJim Lieb } CMD_STATUS, *PCMD_STATUS; 7392b96797SForest Bond 7492b96797SForest Bond typedef struct tagCMD_ITEM { 7592b96797SForest Bond CMD_CODE eCmd; 76b902fbfeSAndres More u8 abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; 77dfdcc425SAndres More bool bNeedRadioOFF; 78dfdcc425SAndres More bool bRadioCmd; 79dfdcc425SAndres More bool bForceSCAN; 803eaca0d2SAndres More u16 wDeAuthenReason; 81193a823cSJim Lieb } CMD_ITEM, *PCMD_ITEM; 8292b96797SForest Bond 8392b96797SForest Bond // Command state 8492b96797SForest Bond typedef enum tagCMD_STATE { 8592b96797SForest Bond WLAN_CMD_SCAN_START, 8692b96797SForest Bond WLAN_CMD_SCAN_END, 8792b96797SForest Bond WLAN_CMD_DISASSOCIATE_START, 8892b96797SForest Bond WLAN_CMD_DEAUTHEN_START, 8992b96797SForest Bond WLAN_CMD_SSID_START, 9092b96797SForest Bond WLAN_AUTHENTICATE_WAIT, 9192b96797SForest Bond WLAN_ASSOCIATE_WAIT, 9292b96797SForest Bond WLAN_DISASSOCIATE_WAIT, 9392b96797SForest Bond WLAN_CMD_TX_PSPACKET_START, 9492b96797SForest Bond WLAN_CMD_RADIO_START, 9592b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY_START, 9692b96797SForest Bond WLAN_CMD_SETPOWER_START, 9792b96797SForest Bond WLAN_CMD_AP_MODE_START, 9892b96797SForest Bond WLAN_CMD_TBTT_WAKEUP_START, 9992b96797SForest Bond WLAN_CMD_BECON_SEND_START, 10092b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA_START, 10192b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY_START, 10292b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING_START, 10392b96797SForest Bond WLAN_CMD_11H_CHSW_START, 10492b96797SForest Bond WLAN_CMD_IDLE 105193a823cSJim Lieb } CMD_STATE, *PCMD_STATE; 10692b96797SForest Bond 10792b96797SForest Bond /*--------------------- Export Classes ----------------------------*/ 10892b96797SForest Bond 10992b96797SForest Bond /*--------------------- Export Variables --------------------------*/ 11092b96797SForest Bond 11192b96797SForest Bond /*--------------------- Export Types ------------------------------*/ 11292b96797SForest Bond 11392b96797SForest Bond /*--------------------- Export Functions --------------------------*/ 11498583c09SMalcolm Priestley struct vnt_private; 11592b96797SForest Bond 11698583c09SMalcolm Priestley void vResetCommandTimer(struct vnt_private *); 1170cbd8d98SAndres More 11898583c09SMalcolm Priestley int bScheduleCommand(struct vnt_private *, CMD_CODE eCommand, u8 *pbyItem0); 11992b96797SForest Bond 12098583c09SMalcolm Priestley void vRunCommand(struct vnt_private *); 1210cbd8d98SAndres More 12292b96797SForest Bond /* 1238611a29aSAndres More void 12492b96797SForest Bond WCMDvCommandThread( 1258611a29aSAndres More void * Context 12692b96797SForest Bond ); 12792b96797SForest Bond */ 12892b96797SForest Bond 12998583c09SMalcolm Priestley void BSSvSecondTxData(struct vnt_private *); 13092b96797SForest Bond 131e7b07d1dSAndres More #endif /* __WCMD_H__ */ 132