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 { 4030816f83SMalcolm Priestley WLAN_CMD_INIT_MAC80211, 4192b96797SForest Bond WLAN_CMD_BSSID_SCAN, 4292b96797SForest Bond WLAN_CMD_SSID, 4392b96797SForest Bond WLAN_CMD_DISASSOCIATE, 4492b96797SForest Bond WLAN_CMD_DEAUTH, 4592b96797SForest Bond WLAN_CMD_RX_PSPOLL, 4692b96797SForest Bond WLAN_CMD_RADIO, 4792b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY, 4892b96797SForest Bond WLAN_CMD_SETPOWER, 4992b96797SForest Bond WLAN_CMD_TBTT_WAKEUP, 5092b96797SForest Bond WLAN_CMD_BECON_SEND, 5192b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA, 5292b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY, 5392b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING, 5492b96797SForest Bond WLAN_CMD_11H_CHSW, 55edd20e96SMalcolm Priestley WLAN_CMD_RUN_AP, 56edd20e96SMalcolm Priestley WLAN_CMD_CONFIGURE_FILTER 57193a823cSJim Lieb } CMD_CODE, *PCMD_CODE; 5892b96797SForest Bond 5992b96797SForest Bond #define CMD_Q_SIZE 32 6092b96797SForest Bond 6192b96797SForest Bond typedef enum tagCMD_STATUS { 6292b96797SForest Bond 6392b96797SForest Bond CMD_STATUS_SUCCESS = 0, 6492b96797SForest Bond CMD_STATUS_FAILURE, 6592b96797SForest Bond CMD_STATUS_RESOURCES, 6692b96797SForest Bond CMD_STATUS_TIMEOUT, 6792b96797SForest Bond CMD_STATUS_PENDING 6892b96797SForest Bond 69193a823cSJim Lieb } CMD_STATUS, *PCMD_STATUS; 7092b96797SForest Bond 7192b96797SForest Bond typedef struct tagCMD_ITEM { 7292b96797SForest Bond CMD_CODE eCmd; 73b902fbfeSAndres More u8 abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; 74dfdcc425SAndres More bool bNeedRadioOFF; 75dfdcc425SAndres More bool bRadioCmd; 76dfdcc425SAndres More bool bForceSCAN; 773eaca0d2SAndres More u16 wDeAuthenReason; 78193a823cSJim Lieb } CMD_ITEM, *PCMD_ITEM; 7992b96797SForest Bond 8092b96797SForest Bond // Command state 8192b96797SForest Bond typedef enum tagCMD_STATE { 8230816f83SMalcolm Priestley WLAN_CMD_INIT_MAC80211_START, 8392b96797SForest Bond WLAN_CMD_SCAN_START, 8492b96797SForest Bond WLAN_CMD_SCAN_END, 8592b96797SForest Bond WLAN_CMD_DISASSOCIATE_START, 8692b96797SForest Bond WLAN_CMD_DEAUTHEN_START, 8792b96797SForest Bond WLAN_CMD_SSID_START, 8892b96797SForest Bond WLAN_AUTHENTICATE_WAIT, 8992b96797SForest Bond WLAN_ASSOCIATE_WAIT, 9092b96797SForest Bond WLAN_DISASSOCIATE_WAIT, 9192b96797SForest Bond WLAN_CMD_TX_PSPACKET_START, 9292b96797SForest Bond WLAN_CMD_RADIO_START, 9392b96797SForest Bond WLAN_CMD_CHANGE_BBSENSITIVITY_START, 9492b96797SForest Bond WLAN_CMD_SETPOWER_START, 9592b96797SForest Bond WLAN_CMD_AP_MODE_START, 9692b96797SForest Bond WLAN_CMD_TBTT_WAKEUP_START, 9792b96797SForest Bond WLAN_CMD_BECON_SEND_START, 9892b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA_START, 9992b96797SForest Bond WLAN_CMD_REMOVE_ALLKEY_START, 10092b96797SForest Bond WLAN_CMD_MAC_DISPOWERSAVING_START, 10192b96797SForest Bond WLAN_CMD_11H_CHSW_START, 102edd20e96SMalcolm Priestley WLAN_CMD_CONFIGURE_FILTER_START, 10392b96797SForest Bond WLAN_CMD_IDLE 104193a823cSJim Lieb } CMD_STATE, *PCMD_STATE; 10592b96797SForest Bond 10698583c09SMalcolm Priestley struct vnt_private; 10792b96797SForest Bond 10898583c09SMalcolm Priestley void vResetCommandTimer(struct vnt_private *); 1090cbd8d98SAndres More 11098583c09SMalcolm Priestley int bScheduleCommand(struct vnt_private *, CMD_CODE eCommand, u8 *pbyItem0); 11192b96797SForest Bond 11294488a7eSMalcolm Priestley void vRunCommand(struct work_struct *work); 11392b96797SForest Bond 114e7b07d1dSAndres More #endif /* __WCMD_H__ */ 115