Merge tag 'usb-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / vt6656 / wcmd.h
CommitLineData
92b96797
FB
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__
4fcf9498 31
92b96797 32#include "80211hdr.h"
92b96797 33#include "80211mgr.h"
92b96797 34
92b96797
FB
35#define AUTHENTICATE_TIMEOUT 1000 //ms
36#define ASSOCIATE_TIMEOUT 1000 //ms
37
92b96797
FB
38// Command code
39typedef enum tagCMD_CODE {
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
193a823c 55} CMD_CODE, *PCMD_CODE;
92b96797
FB
56
57#define CMD_Q_SIZE 32
58
59typedef enum tagCMD_STATUS {
60
61 CMD_STATUS_SUCCESS = 0,
62 CMD_STATUS_FAILURE,
63 CMD_STATUS_RESOURCES,
64 CMD_STATUS_TIMEOUT,
65 CMD_STATUS_PENDING
66
193a823c 67} CMD_STATUS, *PCMD_STATUS;
92b96797
FB
68
69typedef struct tagCMD_ITEM {
70 CMD_CODE eCmd;
b902fbfe 71 u8 abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
dfdcc425
AM
72 bool bNeedRadioOFF;
73 bool bRadioCmd;
74 bool bForceSCAN;
3eaca0d2 75 u16 wDeAuthenReason;
193a823c 76} CMD_ITEM, *PCMD_ITEM;
92b96797
FB
77
78// Command state
79typedef enum tagCMD_STATE {
80 WLAN_CMD_SCAN_START,
81 WLAN_CMD_SCAN_END,
82 WLAN_CMD_DISASSOCIATE_START,
83 WLAN_CMD_DEAUTHEN_START,
84 WLAN_CMD_SSID_START,
85 WLAN_AUTHENTICATE_WAIT,
86 WLAN_ASSOCIATE_WAIT,
87 WLAN_DISASSOCIATE_WAIT,
88 WLAN_CMD_TX_PSPACKET_START,
89 WLAN_CMD_RADIO_START,
90 WLAN_CMD_CHANGE_BBSENSITIVITY_START,
91 WLAN_CMD_SETPOWER_START,
92 WLAN_CMD_AP_MODE_START,
93 WLAN_CMD_TBTT_WAKEUP_START,
94 WLAN_CMD_BECON_SEND_START,
95 WLAN_CMD_CHANGE_ANTENNA_START,
96 WLAN_CMD_REMOVE_ALLKEY_START,
97 WLAN_CMD_MAC_DISPOWERSAVING_START,
98 WLAN_CMD_11H_CHSW_START,
99 WLAN_CMD_IDLE
193a823c 100} CMD_STATE, *PCMD_STATE;
92b96797 101
98583c09 102struct vnt_private;
92b96797 103
98583c09 104void vResetCommandTimer(struct vnt_private *);
0cbd8d98 105
98583c09 106int bScheduleCommand(struct vnt_private *, CMD_CODE eCommand, u8 *pbyItem0);
0cbd8d98 107
98583c09 108void vRunCommand(struct vnt_private *);
92b96797 109
92b96797 110/*
8611a29a 111void
92b96797 112WCMDvCommandThread(
8611a29a 113 void * Context
92b96797
FB
114 );
115*/
116
98583c09 117void BSSvSecondTxData(struct vnt_private *);
92b96797 118
e7b07d1d 119#endif /* __WCMD_H__ */