1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef __WLAN_BSSDEF_H__
15 #define __WLAN_BSSDEF_H__
16
17 #define MAX_IE_SZ 768
18
19 #define NDIS_802_11_LENGTH_SSID 32
20 #define NDIS_802_11_LENGTH_RATES 8
21 #define NDIS_802_11_LENGTH_RATES_EX 16
22
23 struct ndis_802_11_ssid {
24 u32 SsidLength;
25 u8 Ssid[32];
26 };
27
28 enum NDIS_802_11_NETWORK_TYPE {
29 Ndis802_11FH,
30 Ndis802_11DS,
31 Ndis802_11OFDM5,
32 Ndis802_11OFDM24,
33 Ndis802_11NetworkTypeMax
34 };
35
36 struct NDIS_802_11_CONFIGURATION_FH {
37 u32 Length;
38 u32 HopPattern;
39 u32 HopSet;
40 u32 DwellTime;
41 };
42
43
44
45
46
47 struct NDIS_802_11_CONFIGURATION {
48 u32 Length;
49 u32 BeaconPeriod;
50 u32 ATIMWindow;
51 u32 DSConfig;
52 struct NDIS_802_11_CONFIGURATION_FH FHConfig;
53 };
54
55 enum NDIS_802_11_NETWORK_INFRASTRUCTURE {
56 Ndis802_11IBSS,
57 Ndis802_11Infrastructure,
58 Ndis802_11AutoUnknown,
59 Ndis802_11InfrastructureMax,
60 Ndis802_11APMode
61 };
62
63 struct NDIS_802_11_FIXED_IEs {
64 u8 Timestamp[8];
65 u16 BeaconInterval;
66 u16 Capabilities;
67 };
68
69 struct wlan_bssid_ex {
70 u32 Length;
71 unsigned char MacAddress[6];
72 u8 Reserved[2];
73 struct ndis_802_11_ssid Ssid;
74 __le32 Privacy;
75 s32 Rssi;
76 enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
77 struct NDIS_802_11_CONFIGURATION Configuration;
78 enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
79 u8 rates[NDIS_802_11_LENGTH_RATES_EX];
80
81 u32 IELength;
82
83 u8 IEs[MAX_IE_SZ];
84 };
85
86 enum NDIS_802_11_AUTHENTICATION_MODE {
87 Ndis802_11AuthModeOpen,
88 Ndis802_11AuthModeShared,
89 Ndis802_11AuthModeAutoSwitch,
90 Ndis802_11AuthModeWPA,
91 Ndis802_11AuthModeWPAPSK,
92 Ndis802_11AuthModeWPANone,
93 Ndis802_11AuthModeMax
94 };
95
96 enum {
97 Ndis802_11WEPEnabled,
98 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
99 Ndis802_11WEPDisabled,
100 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
101 Ndis802_11WEPKeyAbsent,
102 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
103 Ndis802_11WEPNotSupported,
104 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
105 Ndis802_11Encryption2Enabled,
106 Ndis802_11Encryption2KeyAbsent,
107 Ndis802_11Encryption3Enabled,
108 Ndis802_11Encryption3KeyAbsent
109 };
110
111 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
112 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
113 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
114
115 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
116 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
117 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
118
119 struct NDIS_802_11_AI_REQFI {
120 u16 Capabilities;
121 u16 ListenInterval;
122 unsigned char CurrentAPAddress[6];
123 };
124
125 struct NDIS_802_11_AI_RESFI {
126 u16 Capabilities;
127 u16 StatusCode;
128 u16 AssociationId;
129 };
130
131 struct NDIS_802_11_ASSOCIATION_INFORMATION {
132 u32 Length;
133 u16 AvailableRequestFixedIEs;
134 struct NDIS_802_11_AI_REQFI RequestFixedIEs;
135 u32 RequestIELength;
136 u32 OffsetRequestIEs;
137 u16 AvailableResponseFixedIEs;
138 struct NDIS_802_11_AI_RESFI ResponseFixedIEs;
139 u32 ResponseIELength;
140 u32 OffsetResponseIEs;
141 };
142
143
144 struct NDIS_802_11_KEY {
145 u32 Length;
146 u32 KeyIndex;
147 u32 KeyLength;
148 unsigned char BSSID[6];
149 unsigned long long KeyRSC;
150 u8 KeyMaterial[32];
151 };
152
153 struct NDIS_802_11_REMOVE_KEY {
154 u32 Length;
155 u32 KeyIndex;
156 unsigned char BSSID[6];
157 };
158
159 struct NDIS_802_11_WEP {
160 u32 Length;
161 u32 KeyIndex;
162
163
164 u32 KeyLength;
165 u8 KeyMaterial[16];
166 };
167
168
169 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
170 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
171 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
172 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
173 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
174
175
176 #define MIC_CHECK_TIME 60000000
177
178 #ifndef Ndis802_11APMode
179 #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
180 #endif
181
182 struct wlan_network {
183 struct list_head list;
184 int network_type;
185 int fixed;
186
187
188 unsigned int last_scanned;
189 int aid;
190 int join_res;
191 struct wlan_bssid_ex network;
192 };
193
194 enum VRTL_CARRIER_SENSE {
195 DISABLE_VCS,
196 ENABLE_VCS,
197 AUTO_VCS
198 };
199
200 enum VCS_TYPE {
201 NONE_VCS,
202 RTS_CTS,
203 CTS_TO_SELF
204 };
205
206 #define PWR_CAM 0
207 #define PWR_MINPS 1
208 #define PWR_MAXPS 2
209 #define PWR_UAPSD 3
210 #define PWR_VOIP 4
211
212 enum UAPSD_MAX_SP {
213 NO_LIMIT,
214 TWO_MSDU,
215 FOUR_MSDU,
216 SIX_MSDU
217 };
218
219 #define NUM_PRE_AUTH_KEY 16
220 #define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
221
222 #endif
223