Staging: vt665x: Typedef and macro cleanup Part 1
[pandora-kernel.git] / drivers / staging / vt6656 / wcmd.h
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
32 #if !defined(__TTYPE_H__)
33 #include "ttype.h"
34 #endif
35 #if !defined(__80211HDR_H__)
36 #include "80211hdr.h"
37 #endif
38 #if !defined(__80211MGR_H__)
39 #include "80211mgr.h"
40 #endif
41
42 /*---------------------  Export Definitions -------------------------*/
43
44
45
46 #define AUTHENTICATE_TIMEOUT   1000 //ms
47 #define ASSOCIATE_TIMEOUT      1000 //ms
48
49
50 // Command code
51 typedef enum tagCMD_CODE {
52     WLAN_CMD_BSSID_SCAN,
53     WLAN_CMD_SSID,
54     WLAN_CMD_DISASSOCIATE,
55     WLAN_CMD_DEAUTH,
56     WLAN_CMD_RX_PSPOLL,
57     WLAN_CMD_RADIO,
58     WLAN_CMD_CHANGE_BBSENSITIVITY,
59     WLAN_CMD_SETPOWER,
60     WLAN_CMD_TBTT_WAKEUP,
61     WLAN_CMD_BECON_SEND,
62     WLAN_CMD_CHANGE_ANTENNA,
63     WLAN_CMD_REMOVE_ALLKEY,
64     WLAN_CMD_MAC_DISPOWERSAVING,
65     WLAN_CMD_11H_CHSW,
66     WLAN_CMD_RUN_AP
67 } CMD_CODE, *PCMD_CODE;
68
69 #define CMD_Q_SIZE              32
70
71 typedef enum tagCMD_STATUS {
72
73     CMD_STATUS_SUCCESS = 0,
74     CMD_STATUS_FAILURE,
75     CMD_STATUS_RESOURCES,
76     CMD_STATUS_TIMEOUT,
77     CMD_STATUS_PENDING
78
79 } CMD_STATUS, *PCMD_STATUS;
80
81 typedef struct tagCMD_ITEM {
82     CMD_CODE eCmd;
83     BYTE     abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
84     BOOL     bNeedRadioOFF;
85     BOOL     bRadioCmd;
86     BOOL     bForceSCAN;
87     WORD     wDeAuthenReason;
88 } CMD_ITEM, *PCMD_ITEM;
89
90 // Command state
91 typedef enum tagCMD_STATE {
92     WLAN_CMD_SCAN_START,
93     WLAN_CMD_SCAN_END,
94     WLAN_CMD_DISASSOCIATE_START,
95     WLAN_CMD_DEAUTHEN_START,
96     WLAN_CMD_SSID_START,
97     WLAN_AUTHENTICATE_WAIT,
98     WLAN_ASSOCIATE_WAIT,
99     WLAN_DISASSOCIATE_WAIT,
100     WLAN_CMD_TX_PSPACKET_START,
101     WLAN_CMD_RADIO_START,
102     WLAN_CMD_CHANGE_BBSENSITIVITY_START,
103     WLAN_CMD_SETPOWER_START,
104     WLAN_CMD_AP_MODE_START,
105     WLAN_CMD_TBTT_WAKEUP_START,
106     WLAN_CMD_BECON_SEND_START,
107     WLAN_CMD_CHANGE_ANTENNA_START,
108     WLAN_CMD_REMOVE_ALLKEY_START,
109     WLAN_CMD_MAC_DISPOWERSAVING_START,
110     WLAN_CMD_11H_CHSW_START,
111     WLAN_CMD_IDLE
112 } CMD_STATE, *PCMD_STATE;
113
114
115
116 /*---------------------  Export Classes  ----------------------------*/
117
118 /*---------------------  Export Variables  --------------------------*/
119
120
121 /*---------------------  Export Types  ------------------------------*/
122
123
124 /*---------------------  Export Functions  --------------------------*/
125 VOID
126 vResetCommandTimer(
127     IN HANDLE      hDeviceContext
128     );
129
130 BOOL
131 bScheduleCommand(
132     IN HANDLE      hDeviceContext,
133     IN CMD_CODE    eCommand,
134     IN PBYTE       pbyItem0
135     );
136
137 VOID
138 vRunCommand(
139     IN  HANDLE      hDeviceContext
140     );
141 /*
142 VOID
143 WCMDvCommandThread(
144     PVOID Context
145     );
146 */
147
148 //2007-0115-09<Add>by MikeLiu
149 #ifdef TxInSleep
150 VOID
151 BSSvSecondTxData(
152     IN  HANDLE      hDeviceContext
153     );
154 #endif
155
156 #endif //__WCMD_H__