1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
20 #ifndef __WLAN_BSSDEF_H__
21 #define __WLAN_BSSDEF_H__
29 #define NDIS_802_11_LENGTH_SSID 32
30 #define NDIS_802_11_LENGTH_RATES 8
31 #define NDIS_802_11_LENGTH_RATES_EX 16
33 typedef unsigned char NDIS_802_11_MAC_ADDRESS[6];
34 typedef long NDIS_802_11_RSSI; // in dBm
35 typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
36 typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
39 typedef ULONG NDIS_802_11_KEY_INDEX;
40 typedef unsigned long long NDIS_802_11_KEY_RSC;
43 typedef struct _NDIS_802_11_SSID
47 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
49 typedef enum _NDIS_802_11_NETWORK_TYPE
55 Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
56 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
58 typedef struct _NDIS_802_11_CONFIGURATION_FH
60 ULONG Length; // Length of structure
61 ULONG HopPattern; // As defined by 802.11, MSB set
62 ULONG HopSet; // to one if non-802.11
63 ULONG DwellTime; // units are Kusec
64 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
68 FW will only save the channel number in DSConfig.
69 ODI Handler will convert the channel number to freq. number.
71 typedef struct _NDIS_802_11_CONFIGURATION
73 ULONG Length; // Length of structure
74 ULONG BeaconPeriod; // units are Kusec
75 ULONG ATIMWindow; // units are Kusec
76 ULONG DSConfig; // Frequency, units are kHz
77 NDIS_802_11_CONFIGURATION_FH FHConfig;
78 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
82 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
85 Ndis802_11Infrastructure,
86 Ndis802_11AutoUnknown,
87 Ndis802_11InfrastructureMax, // Not a real value, defined as upper bound
89 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
95 typedef struct _NDIS_802_11_FIXED_IEs
98 USHORT BeaconInterval;
100 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
104 typedef struct _NDIS_802_11_VARIABLE_IEs
109 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
117 Length is the 4 bytes multiples of the sume of
118 sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
119 + sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
120 + sizeof (NDIS_802_11_RATES_EX) + IELength
122 Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
127 typedef struct _NDIS_WLAN_BSSID_EX
130 NDIS_802_11_MAC_ADDRESS MacAddress;
131 UCHAR Reserved[2];//[0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity;
132 NDIS_802_11_SSID Ssid;
134 NDIS_802_11_RSSI Rssi;
135 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
136 NDIS_802_11_CONFIGURATION Configuration;
137 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
138 NDIS_802_11_RATES_EX SupportedRates;
140 UCHAR IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
141 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
144 typedef struct _NDIS_802_11_BSSID_LIST_EX
147 NDIS_WLAN_BSSID_EX Bssid[1];
148 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
151 typedef enum _NDIS_802_11_AUTHENTICATION_MODE
153 Ndis802_11AuthModeOpen,
154 Ndis802_11AuthModeShared,
155 Ndis802_11AuthModeAutoSwitch,
156 Ndis802_11AuthModeWPA,
157 Ndis802_11AuthModeWPAPSK,
158 Ndis802_11AuthModeWPANone,
159 Ndis802_11AuthModeWAPI,
160 Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
161 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
163 typedef enum _NDIS_802_11_WEP_STATUS
165 Ndis802_11WEPEnabled,
166 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
167 Ndis802_11WEPDisabled,
168 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
169 Ndis802_11WEPKeyAbsent,
170 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
171 Ndis802_11WEPNotSupported,
172 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
173 Ndis802_11Encryption2Enabled,
174 Ndis802_11Encryption2KeyAbsent,
175 Ndis802_11Encryption3Enabled,
176 Ndis802_11Encryption3KeyAbsent,
177 Ndis802_11_EncrypteionWAPI
178 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
179 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
182 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
183 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
184 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
186 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
187 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
188 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
190 typedef struct _NDIS_802_11_AI_REQFI
193 USHORT ListenInterval;
194 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
195 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
197 typedef struct _NDIS_802_11_AI_RESFI
201 USHORT AssociationId;
202 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
204 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
207 USHORT AvailableRequestFixedIEs;
208 NDIS_802_11_AI_REQFI RequestFixedIEs;
209 ULONG RequestIELength;
210 ULONG OffsetRequestIEs;
211 USHORT AvailableResponseFixedIEs;
212 NDIS_802_11_AI_RESFI ResponseFixedIEs;
213 ULONG ResponseIELength;
214 ULONG OffsetResponseIEs;
215 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
217 typedef enum _NDIS_802_11_RELOAD_DEFAULTS
219 Ndis802_11ReloadWEPKeys
220 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
223 // Key mapping keys require a BSSID
224 typedef struct _NDIS_802_11_KEY
226 ULONG Length; // Length of this structure
228 ULONG KeyLength; // length of key in bytes
229 NDIS_802_11_MAC_ADDRESS BSSID;
230 NDIS_802_11_KEY_RSC KeyRSC;
231 UCHAR KeyMaterial[32]; // variable length depending on above field
232 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
234 typedef struct _NDIS_802_11_REMOVE_KEY
236 ULONG Length; // Length of this structure
238 NDIS_802_11_MAC_ADDRESS BSSID;
239 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
241 typedef struct _NDIS_802_11_WEP
243 ULONG Length; // Length of this structure
244 ULONG KeyIndex; // 0 is the per-client key, 1-N are the global keys
245 ULONG KeyLength; // length of key in bytes
246 UCHAR KeyMaterial[16];// variable length depending on above field
247 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
249 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
251 ULONG Length; // Length of structure
252 NDIS_802_11_MAC_ADDRESS Bssid;
254 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
256 typedef enum _NDIS_802_11_STATUS_TYPE
258 Ndis802_11StatusType_Authentication,
259 Ndis802_11StatusType_MediaStreamMode,
260 Ndis802_11StatusType_PMKID_CandidateList,
261 Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
262 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
264 typedef struct _NDIS_802_11_STATUS_INDICATION
266 NDIS_802_11_STATUS_TYPE StatusType;
267 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
269 // mask for authentication/integrity fields
270 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
271 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
272 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
273 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
274 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
276 // MIC check time, 60 seconds.
277 #define MIC_CHECK_TIME 60000000
279 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
281 NDIS_802_11_STATUS_INDICATION Status;
282 NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
283 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
285 typedef struct _NDIS_802_11_TEST
291 NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
292 NDIS_802_11_RSSI RssiTrigger;
294 } NDIS_802_11_TEST, *PNDIS_802_11_TEST;
297 #endif //end of #ifdef PLATFORM_LINUX
299 #ifdef PLATFORM_FREEBSD
301 #define NDIS_802_11_LENGTH_SSID 32
302 #define NDIS_802_11_LENGTH_RATES 8
303 #define NDIS_802_11_LENGTH_RATES_EX 16
305 typedef unsigned char NDIS_802_11_MAC_ADDRESS[6];
306 typedef long NDIS_802_11_RSSI; // in dBm
307 typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
308 typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
311 typedef ULONG NDIS_802_11_KEY_INDEX;
312 typedef unsigned long long NDIS_802_11_KEY_RSC;
315 typedef struct _NDIS_802_11_SSID
319 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
321 typedef enum _NDIS_802_11_NETWORK_TYPE
327 Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
328 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
330 typedef struct _NDIS_802_11_CONFIGURATION_FH
332 ULONG Length; // Length of structure
333 ULONG HopPattern; // As defined by 802.11, MSB set
334 ULONG HopSet; // to one if non-802.11
335 ULONG DwellTime; // units are Kusec
336 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
340 FW will only save the channel number in DSConfig.
341 ODI Handler will convert the channel number to freq. number.
343 typedef struct _NDIS_802_11_CONFIGURATION
345 ULONG Length; // Length of structure
346 ULONG BeaconPeriod; // units are Kusec
347 ULONG ATIMWindow; // units are Kusec
348 ULONG DSConfig; // Frequency, units are kHz
349 NDIS_802_11_CONFIGURATION_FH FHConfig;
350 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
354 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
357 Ndis802_11Infrastructure,
358 Ndis802_11AutoUnknown,
359 Ndis802_11InfrastructureMax, // Not a real value, defined as upper bound
361 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
367 typedef struct _NDIS_802_11_FIXED_IEs
370 USHORT BeaconInterval;
372 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
376 typedef struct _NDIS_802_11_VARIABLE_IEs
381 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
389 Length is the 4 bytes multiples of the sume of
390 sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
391 + sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
392 + sizeof (NDIS_802_11_RATES_EX) + IELength
394 Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
399 typedef struct _NDIS_WLAN_BSSID_EX
402 NDIS_802_11_MAC_ADDRESS MacAddress;
403 UCHAR Reserved[2];//[0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity;
404 NDIS_802_11_SSID Ssid;
406 NDIS_802_11_RSSI Rssi;
407 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
408 NDIS_802_11_CONFIGURATION Configuration;
409 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
410 NDIS_802_11_RATES_EX SupportedRates;
412 UCHAR IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
413 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
416 typedef struct _NDIS_802_11_BSSID_LIST_EX
419 NDIS_WLAN_BSSID_EX Bssid[1];
420 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
423 typedef enum _NDIS_802_11_AUTHENTICATION_MODE
425 Ndis802_11AuthModeOpen,
426 Ndis802_11AuthModeShared,
427 Ndis802_11AuthModeAutoSwitch,
428 Ndis802_11AuthModeWPA,
429 Ndis802_11AuthModeWPAPSK,
430 Ndis802_11AuthModeWPANone,
431 Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
432 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
434 typedef enum _NDIS_802_11_WEP_STATUS
436 Ndis802_11WEPEnabled,
437 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
438 Ndis802_11WEPDisabled,
439 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
440 Ndis802_11WEPKeyAbsent,
441 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
442 Ndis802_11WEPNotSupported,
443 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
444 Ndis802_11Encryption2Enabled,
445 Ndis802_11Encryption2KeyAbsent,
446 Ndis802_11Encryption3Enabled,
447 Ndis802_11Encryption3KeyAbsent
448 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
449 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
452 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
453 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
454 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
456 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
457 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
458 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
460 typedef struct _NDIS_802_11_AI_REQFI
463 USHORT ListenInterval;
464 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
465 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
467 typedef struct _NDIS_802_11_AI_RESFI
471 USHORT AssociationId;
472 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
474 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
477 USHORT AvailableRequestFixedIEs;
478 NDIS_802_11_AI_REQFI RequestFixedIEs;
479 ULONG RequestIELength;
480 ULONG OffsetRequestIEs;
481 USHORT AvailableResponseFixedIEs;
482 NDIS_802_11_AI_RESFI ResponseFixedIEs;
483 ULONG ResponseIELength;
484 ULONG OffsetResponseIEs;
485 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
487 typedef enum _NDIS_802_11_RELOAD_DEFAULTS
489 Ndis802_11ReloadWEPKeys
490 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
493 // Key mapping keys require a BSSID
494 typedef struct _NDIS_802_11_KEY
496 ULONG Length; // Length of this structure
498 ULONG KeyLength; // length of key in bytes
499 NDIS_802_11_MAC_ADDRESS BSSID;
500 NDIS_802_11_KEY_RSC KeyRSC;
501 UCHAR KeyMaterial[32]; // variable length depending on above field
502 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
504 typedef struct _NDIS_802_11_REMOVE_KEY
506 ULONG Length; // Length of this structure
508 NDIS_802_11_MAC_ADDRESS BSSID;
509 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
511 typedef struct _NDIS_802_11_WEP
513 ULONG Length; // Length of this structure
514 ULONG KeyIndex; // 0 is the per-client key, 1-N are the global keys
515 ULONG KeyLength; // length of key in bytes
516 UCHAR KeyMaterial[16];// variable length depending on above field
517 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
519 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
521 ULONG Length; // Length of structure
522 NDIS_802_11_MAC_ADDRESS Bssid;
524 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
526 typedef enum _NDIS_802_11_STATUS_TYPE
528 Ndis802_11StatusType_Authentication,
529 Ndis802_11StatusType_MediaStreamMode,
530 Ndis802_11StatusType_PMKID_CandidateList,
531 Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
532 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
534 typedef struct _NDIS_802_11_STATUS_INDICATION
536 NDIS_802_11_STATUS_TYPE StatusType;
537 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
539 // mask for authentication/integrity fields
540 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
541 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
542 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
543 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
544 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
546 // MIC check time, 60 seconds.
547 #define MIC_CHECK_TIME 60000000
549 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
551 NDIS_802_11_STATUS_INDICATION Status;
552 NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
553 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
555 typedef struct _NDIS_802_11_TEST
561 NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
562 NDIS_802_11_RSSI RssiTrigger;
564 } NDIS_802_11_TEST, *PNDIS_802_11_TEST;
567 #endif //PLATFORM_FREEBSD
568 #ifndef Ndis802_11APMode
569 #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
572 typedef struct _WLAN_PHY_INFO
574 u8 SignalStrength;//(in percentage)
575 u8 SignalQuality;//(in percentage)
576 u8 Optimum_antenna; //for Antenna diversity
578 }WLAN_PHY_INFO,*PWLAN_PHY_INFO;
580 typedef struct _WLAN_BCN_INFO
582 /* these infor get from rtw_get_encrypt_info when
583 * * translate scan to UI */
584 u8 encryp_protocol;//ENCRYP_PROTOCOL_E: OPEN/WEP/WPA/WPA2/WAPI
585 int group_cipher; //WPA/WPA2 group cipher
586 int pairwise_cipher;////WPA/WPA2/WEP pairwise cipher
589 /* bwmode 20/40 and ch_offset UP/LOW */
590 unsigned short ht_cap_info;
591 unsigned char ht_info_infos_0;
592 }WLAN_BCN_INFO,*PWLAN_BCN_INFO;
594 /* temporally add #pragma pack for structure alignment issue of
595 * WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz()
597 #ifdef PLATFORM_WINDOWS
601 typedef struct _WLAN_BSSID_EX
604 NDIS_802_11_MAC_ADDRESS MacAddress;
605 UCHAR Reserved[2];//[0]: IS beacon frame
606 NDIS_802_11_SSID Ssid;
608 NDIS_802_11_RSSI Rssi;//(in dBM,raw data ,get from PHY)
609 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
610 NDIS_802_11_CONFIGURATION Configuration;
611 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
612 NDIS_802_11_RATES_EX SupportedRates;
613 WLAN_PHY_INFO PhyInfo;
615 UCHAR IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
617 #ifndef PLATFORM_WINDOWS
618 __attribute__((packed))
620 WLAN_BSSID_EX, *PWLAN_BSSID_EX;
621 #ifdef PLATFORM_WINDOWS
625 __inline static uint get_WLAN_BSSID_EX_sz(WLAN_BSSID_EX *bss)
630 t_len = sizeof (ULONG)
631 + sizeof (NDIS_802_11_MAC_ADDRESS)
633 + sizeof (NDIS_802_11_SSID)
635 + sizeof (NDIS_802_11_RSSI)
636 + sizeof (NDIS_802_11_NETWORK_TYPE)
637 + sizeof (NDIS_802_11_CONFIGURATION)
638 + sizeof (NDIS_802_11_NETWORK_INFRASTRUCTURE)
639 + sizeof (NDIS_802_11_RATES_EX)
640 //all new member add here
641 + sizeof(WLAN_PHY_INFO)
642 //all new member add here
647 return (sizeof(WLAN_BSSID_EX) -MAX_IE_SZ + bss->IELength);
651 struct wlan_network {
653 int network_type; //refer to ieee80211.h for WIRELESS_11A/B/G
654 int fixed; // set to fixed when not to be removed as site-surveying
655 unsigned long last_scanned; //timestamp for the network
656 int aid; //will only be valid when a BSS is joinned.
658 WLAN_BSSID_EX network; //must be the last item
659 WLAN_BCN_INFO BcnInfo;
660 #ifdef PLATFORM_WINDOWS
661 unsigned char iebuf[MAX_IE_SZ];
666 enum VRTL_CARRIER_SENSE
700 #define NUM_PRE_AUTH_KEY 16
701 #define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
707 #ifndef PLATFORM_OS_CE
708 typedef struct _PMKID_CANDIDATE {
709 NDIS_802_11_MAC_ADDRESS BSSID;
711 } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
713 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
715 ULONG Version; // Version of the structure
716 ULONG NumCandidates; // No. of pmkid candidates
717 PMKID_CANDIDATE CandidateList[1];
718 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
721 typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
723 NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
724 NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
726 } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
728 typedef struct _NDIS_802_11_CAPABILITY
733 ULONG NoOfAuthEncryptPairsSupported;
734 NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
736 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
740 #endif //#ifndef WLAN_BSSDEF_H_