This source file includes following definitions.
- get_wlan_bssid_ex_sz
1
2
3
4
5
6
7 #ifndef __WLAN_BSSDEF_H__
8 #define __WLAN_BSSDEF_H__
9
10
11 #define MAX_IE_SZ 768
12
13
14 #define NDIS_802_11_LENGTH_SSID 32
15 #define NDIS_802_11_LENGTH_RATES 8
16 #define NDIS_802_11_LENGTH_RATES_EX 16
17
18 typedef unsigned char NDIS_802_11_MAC_ADDRESS[6];
19 typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES];
20 typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX];
21
22 struct ndis_802_11_ssid {
23 u32 SsidLength;
24 u8 Ssid[32];
25 };
26
27 enum NDIS_802_11_NETWORK_TYPE {
28 Ndis802_11FH,
29 Ndis802_11DS,
30 Ndis802_11OFDM5,
31 Ndis802_11OFDM24,
32 Ndis802_11NetworkTypeMax
33 };
34
35 struct ndis_802_11_conf_fh {
36 u32 Length;
37 u32 HopPattern;
38 u32 HopSet;
39 u32 DwellTime;
40 };
41
42
43
44
45
46 struct ndis_802_11_conf {
47 u32 Length;
48 u32 BeaconPeriod;
49 u32 ATIMWindow;
50 u32 DSConfig;
51 struct ndis_802_11_conf_fh FHConfig;
52 };
53
54 enum NDIS_802_11_NETWORK_INFRASTRUCTURE {
55 Ndis802_11IBSS,
56 Ndis802_11Infrastructure,
57 Ndis802_11AutoUnknown,
58 Ndis802_11InfrastructureMax,
59 Ndis802_11APMode,
60 };
61
62 struct ndis_802_11_fix_ie {
63 u8 Timestamp[8];
64 u16 BeaconInterval;
65 u16 Capabilities;
66 };
67
68 struct ndis_80211_var_ie {
69 u8 ElementID;
70 u8 Length;
71 u8 data[1];
72 };
73
74
75
76
77
78
79
80
81
82
83 enum NDIS_802_11_AUTHENTICATION_MODE {
84 Ndis802_11AuthModeOpen,
85 Ndis802_11AuthModeShared,
86 Ndis802_11AuthModeAutoSwitch,
87 Ndis802_11AuthModeWPA,
88 Ndis802_11AuthModeWPAPSK,
89 Ndis802_11AuthModeWPANone,
90 Ndis802_11AuthModeWAPI,
91 Ndis802_11AuthModeMax
92 };
93
94 enum NDIS_802_11_WEP_STATUS {
95 Ndis802_11WEPEnabled,
96 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
97 Ndis802_11WEPDisabled,
98 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
99 Ndis802_11WEPKeyAbsent,
100 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
101 Ndis802_11WEPNotSupported,
102 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
103 Ndis802_11Encryption2Enabled,
104 Ndis802_11Encryption2KeyAbsent,
105 Ndis802_11Encryption3Enabled,
106 Ndis802_11Encryption3KeyAbsent,
107 Ndis802_11_EncrypteionWAPI
108 };
109
110 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
111 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
112 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
113
114 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
115 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
116 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
117
118 struct ndis_802_11_ai_reqfi {
119 u16 Capabilities;
120 u16 ListenInterval;
121 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
122 };
123
124 struct ndis_801_11_ai_resfi {
125 u16 Capabilities;
126 u16 StatusCode;
127 u16 AssociationId;
128 };
129
130 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
131 {
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_801_11_ai_resfi ResponseFixedIEs;
139 u32 ResponseIELength;
140 u32 OffsetResponseIEs;
141 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
142
143 enum NDIS_802_11_RELOAD_DEFAULTS {
144 Ndis802_11ReloadWEPKeys
145 };
146
147
148
149 typedef struct _NDIS_802_11_KEY
150 {
151 u32 Length;
152 u32 KeyIndex;
153 u32 KeyLength;
154 NDIS_802_11_MAC_ADDRESS BSSID;
155 unsigned long long KeyRSC;
156 u8 KeyMaterial[32];
157 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
158
159 typedef struct _NDIS_802_11_REMOVE_KEY
160 {
161 u32 Length;
162 u32 KeyIndex;
163 NDIS_802_11_MAC_ADDRESS BSSID;
164 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
165
166 struct ndis_802_11_wep {
167 u32 Length;
168 u32 KeyIndex;
169 u32 KeyLength;
170 u8 KeyMaterial[16];
171 };
172
173
174 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
175 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
176 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
177 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
178 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
179
180
181 #define MIC_CHECK_TIME 60000000
182
183 #ifndef Ndis802_11APMode
184 #define Ndis802_11APMode (Ndis802_11InfrastructureMax + 1)
185 #endif
186
187 struct wlan_phy_info {
188 u8 SignalStrength;
189 u8 SignalQuality;
190 u8 Optimum_antenna;
191 u8 Reserved_0;
192 };
193
194 struct wlan_bcn_info {
195
196
197 u8 encryp_protocol;
198 int group_cipher;
199 int pairwise_cipher;
200 int is_8021x;
201
202
203 unsigned short ht_cap_info;
204 unsigned char ht_info_infos_0;
205 };
206
207
208
209
210 struct wlan_bssid_ex {
211 u32 Length;
212 NDIS_802_11_MAC_ADDRESS MacAddress;
213 u8 Reserved[2];
214 struct ndis_802_11_ssid Ssid;
215 u32 Privacy;
216 long Rssi;
217 enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
218 struct ndis_802_11_conf Configuration;
219 enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
220 NDIS_802_11_RATES_EX SupportedRates;
221 struct wlan_phy_info PhyInfo;
222 u32 IELength;
223 u8 IEs[MAX_IE_SZ];
224 } __packed;
225
226 static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
227 {
228 return (sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + bss->IELength);
229 }
230
231 struct wlan_network {
232 struct list_head list;
233 int network_type;
234 int fixed;
235 unsigned long last_scanned;
236 int aid;
237 int join_res;
238 struct wlan_bssid_ex network;
239 struct wlan_bcn_info BcnInfo;
240 };
241
242 enum VRTL_CARRIER_SENSE {
243 DISABLE_VCS,
244 ENABLE_VCS,
245 AUTO_VCS
246 };
247
248 enum VCS_TYPE {
249 NONE_VCS,
250 RTS_CTS,
251 CTS_TO_SELF
252 };
253
254 #define PWR_CAM 0
255 #define PWR_MINPS 1
256 #define PWR_MAXPS 2
257 #define PWR_UAPSD 3
258 #define PWR_VOIP 4
259
260 enum UAPSD_MAX_SP {
261 NO_LIMIT,
262 TWO_MSDU,
263 FOUR_MSDU,
264 SIX_MSDU
265 };
266
267 #define NUM_PRE_AUTH_KEY 16
268 #define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
269
270 #endif