1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29#ifndef __WCMD_H__
30#define __WCMD_H__
31
32#include "ttype.h"
33#include "80211hdr.h"
34#include "80211mgr.h"
35
36
37
38#define AUTHENTICATE_TIMEOUT 1000
39#define ASSOCIATE_TIMEOUT 1000
40
41
42typedef enum tagCMD_CODE {
43 WLAN_CMD_BSSID_SCAN,
44 WLAN_CMD_SSID,
45 WLAN_CMD_DISASSOCIATE,
46 WLAN_CMD_DEAUTH,
47 WLAN_CMD_RX_PSPOLL,
48 WLAN_CMD_RADIO,
49 WLAN_CMD_CHANGE_BBSENSITIVITY,
50 WLAN_CMD_SETPOWER,
51 WLAN_CMD_TBTT_WAKEUP,
52 WLAN_CMD_BECON_SEND,
53 WLAN_CMD_CHANGE_ANTENNA,
54 WLAN_CMD_REMOVE_ALLKEY,
55 WLAN_CMD_MAC_DISPOWERSAVING,
56 WLAN_CMD_11H_CHSW,
57 WLAN_CMD_RUN_AP
58} CMD_CODE, *PCMD_CODE;
59
60#define CMD_Q_SIZE 32
61
62typedef enum tagCMD_STATUS {
63 CMD_STATUS_SUCCESS = 0,
64 CMD_STATUS_FAILURE,
65 CMD_STATUS_RESOURCES,
66 CMD_STATUS_TIMEOUT,
67 CMD_STATUS_PENDING
68} CMD_STATUS, *PCMD_STATUS;
69
70typedef struct tagCMD_ITEM {
71 CMD_CODE eCmd;
72 unsigned char abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
73 bool bNeedRadioOFF;
74 unsigned short wDeAuthenReason;
75 bool bRadioCmd;
76 bool bForceSCAN;
77} CMD_ITEM, *PCMD_ITEM;
78
79
80typedef enum tagCMD_STATE {
81 WLAN_CMD_SCAN_START,
82 WLAN_CMD_SCAN_END,
83 WLAN_CMD_DISASSOCIATE_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_AP_MODE_START,
90 WLAN_CMD_RADIO_START,
91 WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE,
92 WLAN_CMD_IDLE
93} CMD_STATE, *PCMD_STATE;
94
95
96
97
98
99
100
101
102void
103vResetCommandTimer(
104 void *hDeviceContext
105);
106
107void
108vCommandTimer(
109 void *hDeviceContext
110);
111
112bool bClearBSSID_SCAN(
113 void *hDeviceContext
114);
115
116bool
117bScheduleCommand(
118 void *hDeviceContext,
119 CMD_CODE eCommand,
120 unsigned char *pbyItem0
121);
122
123void
124vCommandTimerWait(
125 void *hDeviceContext,
126 unsigned int MSecond
127);
128#ifdef TxInSleep
129void
130BSSvSecondTxData(
131 void *hDeviceContext
132);
133#endif
134
135#endif
136