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__ 314fcf9498SAndres More 3292b96797SForest Bond #include "80211hdr.h" 3392b96797SForest Bond #include "80211mgr.h" 3492b96797SForest Bond 3592b96797SForest Bond #define AUTHENTICATE_TIMEOUT 1000 //ms 3692b96797SForest Bond #define ASSOCIATE_TIMEOUT 1000 //ms 3792b96797SForest Bond 3892b96797SForest Bond // Command code 3992b96797SForest Bond typedef enum tagCMD_CODE { 4092b96797SForest Bond WLAN_CMD_BSSID_SCAN, 4192b96797SForest Bond WLAN_CMD_SSID, 4292b96797SForest Bond WLAN_CMD_DISASSOCIATE, 4392b96797SForest Bond WLAN_CMD_DEAUTH, 4492b96797SForest Bond WLAN_CMD_RX_PSPOLL, 4592b96797SForest Bond WLAN_CMD_RADIO, 4692b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY, 4792b96797SForest Bond WLAN_CMD_SETPOWER, 4892b96797SForest Bond WLAN_CMD_TBTT_WAKEUP, 4992b96797SForest Bond WLAN_CMD_BECON_SEND, 5092b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA, 5192b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY, 5292b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING, 5392b96797SForest Bond WLAN_CMD_11H_CHSW, 5492b96797SForest Bond WLAN_CMD_RUN_AP 55193a823cSJim Lieb } CMD_CODE, *PCMD_CODE; 5692b96797SForest Bond 5792b96797SForest Bond #define CMD_Q_SIZE 32 5892b96797SForest Bond 5992b96797SForest Bond typedef enum tagCMD_STATUS { 6092b96797SForest Bond 6192b96797SForest Bond CMD_STATUS_SUCCESS = 0, 6292b96797SForest Bond CMD_STATUS_FAILURE, 6392b96797SForest Bond CMD_STATUS_RESOURCES, 6492b96797SForest Bond CMD_STATUS_TIMEOUT, 6592b96797SForest Bond CMD_STATUS_PENDING 6692b96797SForest Bond 67193a823cSJim Lieb } CMD_STATUS, *PCMD_STATUS; 6892b96797SForest Bond 6992b96797SForest Bond typedef struct tagCMD_ITEM { 7092b96797SForest Bond CMD_CODE eCmd; 71b902fbfeSAndres More u8 abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; 72dfdcc425SAndres More bool bNeedRadioOFF; 73dfdcc425SAndres More bool bRadioCmd; 74dfdcc425SAndres More bool bForceSCAN; 753eaca0d2SAndres More u16 wDeAuthenReason; 76193a823cSJim Lieb } CMD_ITEM, *PCMD_ITEM; 7792b96797SForest Bond 7892b96797SForest Bond // Command state 7992b96797SForest Bond typedef enum tagCMD_STATE { 8092b96797SForest Bond WLAN_CMD_SCAN_START, 8192b96797SForest Bond WLAN_CMD_SCAN_END, 8292b96797SForest Bond WLAN_CMD_DISASSOCIATE_START, 8392b96797SForest Bond WLAN_CMD_DEAUTHEN_START, 8492b96797SForest Bond WLAN_CMD_SSID_START, 8592b96797SForest Bond WLAN_AUTHENTICATE_WAIT, 8692b96797SForest Bond WLAN_ASSOCIATE_WAIT, 8792b96797SForest Bond WLAN_DISASSOCIATE_WAIT, 8892b96797SForest Bond WLAN_CMD_TX_PSPACKET_START, 8992b96797SForest Bond WLAN_CMD_RADIO_START, 9092b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY_START, 9192b96797SForest Bond WLAN_CMD_SETPOWER_START, 9292b96797SForest Bond WLAN_CMD_AP_MODE_START, 9392b96797SForest Bond WLAN_CMD_TBTT_WAKEUP_START, 9492b96797SForest Bond WLAN_CMD_BECON_SEND_START, 9592b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA_START, 9692b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY_START, 9792b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING_START, 9892b96797SForest Bond WLAN_CMD_11H_CHSW_START, 9992b96797SForest Bond WLAN_CMD_IDLE 100193a823cSJim Lieb } CMD_STATE, *PCMD_STATE; 10192b96797SForest Bond 10298583c09SMalcolm Priestley struct vnt_private; 10392b96797SForest Bond 10498583c09SMalcolm Priestley void vResetCommandTimer(struct vnt_private *); 1050cbd8d98SAndres More 10698583c09SMalcolm Priestley int bScheduleCommand(struct vnt_private *, CMD_CODE eCommand, u8 *pbyItem0); 10792b96797SForest Bond 10894488a7eSMalcolm Priestley void vRunCommand(struct work_struct *work); 10992b96797SForest Bond 11098583c09SMalcolm Priestley void BSSvSecondTxData(struct vnt_private *); 11192b96797SForest Bond 112e7b07d1dSAndres More #endif /* __WCMD_H__ */ 113