1 #ifndef __WLAN_BSSDEF_H__
2 #define __WLAN_BSSDEF_H__
6 #define NDIS_802_11_LENGTH_SSID 32
7 #define NDIS_802_11_LENGTH_RATES 8
8 #define NDIS_802_11_LENGTH_RATES_EX 16
10 /* Set of 8 data rates*/
11 typedef unsigned char NDIS_802_11_RATES
[NDIS_802_11_LENGTH_RATES
];
12 /* Set of 16 data rates */
13 typedef unsigned char NDIS_802_11_RATES_EX
[NDIS_802_11_LENGTH_RATES_EX
];
15 struct ndis_802_11_ssid
{
20 enum NDIS_802_11_NETWORK_TYPE
{
25 Ndis802_11NetworkTypeMax
/* not a real type, defined as an upper bound*/
28 struct NDIS_802_11_CONFIGURATION_FH
{
29 u32 Length
; /* Length of structure */
30 u32 HopPattern
; /* As defined by 802.11, MSB set */
31 u32 HopSet
; /* to one if non-802.11 */
32 u32 DwellTime
; /* units are Kusec */
36 FW will only save the channel number in DSConfig.
37 ODI Handler will convert the channel number to freq. number.
39 struct NDIS_802_11_CONFIGURATION
{
40 u32 Length
; /* Length of structure */
41 u32 BeaconPeriod
; /* units are Kusec */
42 u32 ATIMWindow
; /* units are Kusec */
43 u32 DSConfig
; /* Frequency, units are kHz */
44 struct NDIS_802_11_CONFIGURATION_FH FHConfig
;
47 enum NDIS_802_11_NETWORK_INFRASTRUCTURE
{
49 Ndis802_11Infrastructure
,
50 Ndis802_11AutoUnknown
,
51 Ndis802_11InfrastructureMax
, /*Not a real value,defined as upper bound*/
55 struct NDIS_802_11_FIXED_IEs
{
62 * Length is the 4 bytes multiples of the sume of
63 * 6 * sizeof (unsigned char) + 2 + sizeof (ndis_802_11_ssid) + sizeof (u32)
64 * + sizeof (s32) + sizeof (NDIS_802_11_NETWORK_TYPE)
65 * + sizeof (struct NDIS_802_11_CONFIGURATION)
66 * + sizeof (NDIS_802_11_RATES_EX) + IELength
68 * Except the IELength, all other fields are fixed length. Therefore, we can
69 * define a macro to present the partial sum.
72 struct ndis_wlan_bssid_ex
{
74 unsigned char MacAddress
[6];
76 struct ndis_802_11_ssid Ssid
;
79 enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse
;
80 struct NDIS_802_11_CONFIGURATION Configuration
;
81 enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode
;
82 NDIS_802_11_RATES_EX SupportedRates
;
84 /*(timestamp, beacon interval, and capability information) */
88 enum NDIS_802_11_AUTHENTICATION_MODE
{
89 Ndis802_11AuthModeOpen
,
90 Ndis802_11AuthModeShared
,
91 Ndis802_11AuthModeAutoSwitch
,
92 Ndis802_11AuthModeWPA
,
93 Ndis802_11AuthModeWPAPSK
,
94 Ndis802_11AuthModeWPANone
,
95 Ndis802_11AuthModeMax
/* Not a real mode, defined as upper bound */
100 Ndis802_11Encryption1Enabled
= Ndis802_11WEPEnabled
,
101 Ndis802_11WEPDisabled
,
102 Ndis802_11EncryptionDisabled
= Ndis802_11WEPDisabled
,
103 Ndis802_11WEPKeyAbsent
,
104 Ndis802_11Encryption1KeyAbsent
= Ndis802_11WEPKeyAbsent
,
105 Ndis802_11WEPNotSupported
,
106 Ndis802_11EncryptionNotSupported
= Ndis802_11WEPNotSupported
,
107 Ndis802_11Encryption2Enabled
,
108 Ndis802_11Encryption2KeyAbsent
,
109 Ndis802_11Encryption3Enabled
,
110 Ndis802_11Encryption3KeyAbsent
113 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
114 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
115 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
117 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
118 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
119 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
121 struct NDIS_802_11_AI_REQFI
{
124 unsigned char CurrentAPAddress
[6];
127 struct NDIS_802_11_AI_RESFI
{
133 struct NDIS_802_11_ASSOCIATION_INFORMATION
{
135 u16 AvailableRequestFixedIEs
;
136 struct NDIS_802_11_AI_REQFI RequestFixedIEs
;
138 u32 OffsetRequestIEs
;
139 u16 AvailableResponseFixedIEs
;
140 struct NDIS_802_11_AI_RESFI ResponseFixedIEs
;
141 u32 ResponseIELength
;
142 u32 OffsetResponseIEs
;
145 /* Key mapping keys require a BSSID*/
146 struct NDIS_802_11_KEY
{
147 u32 Length
; /* Length of this structure */
149 u32 KeyLength
; /* length of key in bytes */
150 unsigned char BSSID
[6];
151 unsigned long long KeyRSC
;
152 u8 KeyMaterial
[32]; /* variable length */
155 struct NDIS_802_11_REMOVE_KEY
{
156 u32 Length
; /* Length of this structure */
158 unsigned char BSSID
[6];
161 struct NDIS_802_11_WEP
{
162 u32 Length
; /* Length of this structure */
163 u32 KeyIndex
; /* 0 is the per-client key,
164 * 1-N are the global keys */
165 u32 KeyLength
; /* length of key in bytes */
166 u8 KeyMaterial
[16]; /* variable length depending on above field */
169 /* mask for authentication/integrity fields */
170 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
171 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
172 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
173 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
174 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
176 /* MIC check time, 60 seconds. */
177 #define MIC_CHECK_TIME 60000000
179 #ifndef Ndis802_11APMode
180 #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
183 struct wlan_network
{
184 struct list_head list
;
185 int network_type
; /*refer to ieee80211.h for WIRELESS_11A/B/G */
186 int fixed
; /* set to fixed when not to be removed asi
188 unsigned int last_scanned
; /*timestamp for the network */
189 int aid
; /*will only be valid when a BSS is joined. */
191 struct ndis_wlan_bssid_ex network
; /*must be the last item */
194 enum VRTL_CARRIER_SENSE
{
219 #define NUM_PRE_AUTH_KEY 16
220 #define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
225 struct wlan_bssid_ex
{
227 unsigned char MacAddress
[6];
229 struct ndis_802_11_ssid Ssid
;
232 enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse
;
233 struct NDIS_802_11_CONFIGURATION Configuration
;
234 enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode
;
235 NDIS_802_11_RATES_EX SupportedRates
;
237 u8 IEs
[MAX_IE_SZ
]; /* (timestamp, beacon interval, and capability
241 #endif /* #ifndef WLAN_BSSDEF_H_ */