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 324adc5a94SMalcolm Priestley #include "device.h" 3392b96797SForest Bond 3492b96797SForest Bond #define AUTHENTICATE_TIMEOUT 1000 //ms 3592b96797SForest Bond #define ASSOCIATE_TIMEOUT 1000 //ms 3692b96797SForest Bond 3780f0d092SMalcolm Priestley /* Command code */ 3880f0d092SMalcolm Priestley enum vnt_cmd { 3930816f83SMalcolm Priestley WLAN_CMD_INIT_MAC80211, 4092b96797SForest Bond WLAN_CMD_SETPOWER, 4192b96797SForest Bond WLAN_CMD_TBTT_WAKEUP, 4292b96797SForest Bond WLAN_CMD_BECON_SEND, 4392b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA, 4492b96797SForest Bond WLAN_CMD_11H_CHSW, 4580f0d092SMalcolm Priestley }; 4692b96797SForest Bond 4792b96797SForest Bond #define CMD_Q_SIZE 32 4892b96797SForest Bond 4992b96797SForest Bond typedef enum tagCMD_STATUS { 5092b96797SForest Bond 5192b96797SForest Bond CMD_STATUS_SUCCESS = 0, 5292b96797SForest Bond CMD_STATUS_FAILURE, 5392b96797SForest Bond CMD_STATUS_RESOURCES, 5492b96797SForest Bond CMD_STATUS_TIMEOUT, 5592b96797SForest Bond CMD_STATUS_PENDING 5692b96797SForest Bond 57193a823cSJim Lieb } CMD_STATUS, *PCMD_STATUS; 5892b96797SForest Bond 5992b96797SForest Bond typedef struct tagCMD_ITEM { 6080f0d092SMalcolm Priestley enum vnt_cmd cmd; 61193a823cSJim Lieb } CMD_ITEM, *PCMD_ITEM; 6292b96797SForest Bond 6392b96797SForest Bond // Command state 6492b96797SForest Bond typedef enum tagCMD_STATE { 6530816f83SMalcolm Priestley WLAN_CMD_INIT_MAC80211_START, 6692b96797SForest Bond WLAN_CMD_SETPOWER_START, 6792b96797SForest Bond WLAN_CMD_TBTT_WAKEUP_START, 6892b96797SForest Bond WLAN_CMD_BECON_SEND_START, 6992b96797SForest Bond WLAN_CMD_CHANGE_ANTENNA_START, 7092b96797SForest Bond WLAN_CMD_11H_CHSW_START, 7192b96797SForest Bond WLAN_CMD_IDLE 72193a823cSJim Lieb } CMD_STATE, *PCMD_STATE; 7392b96797SForest Bond 7498583c09SMalcolm Priestley struct vnt_private; 7592b96797SForest Bond 7698583c09SMalcolm Priestley void vResetCommandTimer(struct vnt_private *); 770cbd8d98SAndres More 7880f0d092SMalcolm Priestley int bScheduleCommand(struct vnt_private *, enum vnt_cmd, u8 *); 7992b96797SForest Bond 8094488a7eSMalcolm Priestley void vRunCommand(struct work_struct *work); 8192b96797SForest Bond 82e7b07d1dSAndres More #endif /* __WCMD_H__ */ 83