Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | * File: wcmd.h |
| 20 | * |
| 21 | * Purpose: Handles the management command interface functions |
| 22 | * |
| 23 | * Author: Lyndon Chen |
| 24 | * |
| 25 | * Date: May 8, 2002 |
| 26 | * |
| 27 | */ |
| 28 | |
| 29 | #ifndef __WCMD_H__ |
| 30 | #define __WCMD_H__ |
| 31 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 32 | #include "ttype.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 33 | #include "80211hdr.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 34 | #include "80211mgr.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 35 | |
Igor Bezukh | 4025ef1 | 2014-07-20 12:34:00 +0300 | [diff] [blame] | 36 | #define AUTHENTICATE_TIMEOUT 1000 |
| 37 | #define ASSOCIATE_TIMEOUT 1000 |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 38 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 39 | typedef enum tagCMD_CODE { |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 40 | WLAN_CMD_BSSID_SCAN, |
| 41 | WLAN_CMD_SSID, |
| 42 | WLAN_CMD_DISASSOCIATE, |
| 43 | WLAN_CMD_DEAUTH, |
| 44 | WLAN_CMD_RX_PSPOLL, |
| 45 | WLAN_CMD_RADIO, |
| 46 | WLAN_CMD_CHANGE_BBSENSITIVITY, |
| 47 | WLAN_CMD_SETPOWER, |
| 48 | WLAN_CMD_TBTT_WAKEUP, |
| 49 | WLAN_CMD_BECON_SEND, |
| 50 | WLAN_CMD_CHANGE_ANTENNA, |
| 51 | WLAN_CMD_REMOVE_ALLKEY, |
| 52 | WLAN_CMD_MAC_DISPOWERSAVING, |
| 53 | WLAN_CMD_11H_CHSW, |
| 54 | WLAN_CMD_RUN_AP |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 55 | } CMD_CODE, *PCMD_CODE; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 56 | |
| 57 | #define CMD_Q_SIZE 32 |
| 58 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 59 | typedef enum tagCMD_STATUS { |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 60 | CMD_STATUS_SUCCESS = 0, |
| 61 | CMD_STATUS_FAILURE, |
| 62 | CMD_STATUS_RESOURCES, |
| 63 | CMD_STATUS_TIMEOUT, |
| 64 | CMD_STATUS_PENDING |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 65 | } CMD_STATUS, *PCMD_STATUS; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 66 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 67 | typedef struct tagCMD_ITEM { |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 68 | CMD_CODE eCmd; |
| 69 | unsigned char abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; |
| 70 | bool bNeedRadioOFF; |
| 71 | unsigned short wDeAuthenReason; |
| 72 | bool bRadioCmd; |
| 73 | bool bForceSCAN; |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 74 | } CMD_ITEM, *PCMD_ITEM; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 75 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 76 | typedef enum tagCMD_STATE { |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 77 | WLAN_CMD_SCAN_START, |
| 78 | WLAN_CMD_SCAN_END, |
| 79 | WLAN_CMD_DISASSOCIATE_START, |
| 80 | WLAN_CMD_SSID_START, |
| 81 | WLAN_AUTHENTICATE_WAIT, |
| 82 | WLAN_ASSOCIATE_WAIT, |
| 83 | WLAN_DISASSOCIATE_WAIT, |
| 84 | WLAN_CMD_TX_PSPACKET_START, |
| 85 | WLAN_CMD_AP_MODE_START, |
| 86 | WLAN_CMD_RADIO_START, |
| 87 | WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE, |
| 88 | WLAN_CMD_IDLE |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 89 | } CMD_STATE, *PCMD_STATE; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 90 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 91 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 92 | vResetCommandTimer( |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 93 | void *hDeviceContext |
| 94 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 95 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 96 | void |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 97 | vCommandTimer( |
| 98 | void *hDeviceContext |
| 99 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 100 | |
Charles Clément | 7b6a001 | 2010-08-01 17:15:50 +0200 | [diff] [blame] | 101 | bool bClearBSSID_SCAN( |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 102 | void *hDeviceContext |
| 103 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 104 | |
Charles Clément | 7b6a001 | 2010-08-01 17:15:50 +0200 | [diff] [blame] | 105 | bool |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 106 | bScheduleCommand( |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 107 | void *hDeviceContext, |
| 108 | CMD_CODE eCommand, |
| 109 | unsigned char *pbyItem0 |
| 110 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 111 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 112 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 113 | vCommandTimerWait( |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 114 | void *hDeviceContext, |
| 115 | unsigned int MSecond |
| 116 | ); |
Malcolm Priestley | f2af99e | 2014-08-10 12:21:56 +0100 | [diff] [blame] | 117 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 118 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 119 | BSSvSecondTxData( |
Joe Perches | 3bd1a38 | 2013-03-18 10:45:09 -0700 | [diff] [blame] | 120 | void *hDeviceContext |
| 121 | ); |
Jim Lieb | 612822f | 2009-08-12 14:54:03 -0700 | [diff] [blame] | 122 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 123 | #endif //__WCMD_H__ |