1 #ifndef __WINBOND_BSSDSCPT_H
2 #define __WINBOND_BSSDSCPT_H
4 #include <linux/types.h>
9 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11 // BSS descriptor data base
15 // BSS descriptor data base will store the information of the stations at the
16 // surrounding environment. The first entry( psBSS(0) ) will not be used and the
17 // second one( psBSS(1) ) will be used for the broadcast address.
18 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
20 //#define MAX_ACC_RSSI_COUNT 10
21 #define MAX_ACC_RSSI_COUNT 6
23 ///////////////////////////////////////////////////////////////////////////
25 // BSS Description set Element , to store scan received Beacon information
27 // Our's differs slightly from the specs. The specify a PHY_Parameter_Set.
28 // Since we're only doing a DS design right now, we just have a DS structure.
29 //////////////////////////////////////////////////////////////////////////////
30 typedef struct BSSDescriptionElement
36 u8 abPeerAddress
[ MAC_ADDR_LENGTH
+ 2 ]; // peer MAC Address associated with this session. 6-OCTET value
37 u32 dwBgScanStamp
; // BgScan Sequence Counter stamp, record psROAM->dwScanCounter.
42 u8 abBssID
[ MAC_ADDR_LENGTH
+ 2 ]; // 6B
45 u8 DTIM_Period
; // 1 octet usually from TIM element, if present
47 u8 boERP
; // analysis ERP or (extended) supported rate element
51 u8 OperationalRate
[32];
52 u32 dwBasicRateBitmap
; //bit map, retrieve from SupportedRateSet
53 u32 dwOperationalRateBitmap
; //bit map, retrieve from SupportedRateSet and
54 // ExtendedSupportedRateSet
55 // For RSSI calculating
56 u32 HalRssi
[MAX_ACC_RSSI_COUNT
]; // Encode. It must use MACRO of HAL to get the LNA and AGC data
59 ////From beacon/probe response
60 struct SSID_Element SSID
; // 34B
63 struct Capability_Information_Element CapabilityInformation
; // 2B
66 struct CF_Parameter_Set_Element CF_Parameter_Set
; // 8B
67 struct IBSS_Parameter_Set_Element IBSS_Parameter_Set
; // 4B
68 struct TIM_Element TIM_Element_Set
; // 256B
70 struct DS_Parameter_Set_Element DS_Parameter_Set
; // 3B
73 struct ERP_Information_Element ERP_Information_Set
; // 3B
76 struct Supported_Rates_Element SupportedRateSet
; // 10B
79 struct Extended_Supported_Rates_Element ExtendedSupportedRateSet
; // 257B
86 u16 wState
; // the current state of the system
87 u16 wIndex
; // THIS BSS element entry index
89 void* psadapter
; // pointer to THIS adapter
90 struct timer_list timer
; // MLME timer
93 u16 wAuthAlgo
; // peer MAC MLME use Auth algorithm, default OPEN_AUTH
94 u16 wAuthSeqNum
; // current local MAC sendout AuthReq sequence number
96 u8 auth_challengeText
[128];
99 u32 ies_len
; // information element length
100 u8 ies
[256]; // information element
103 u8 RsnIe_Type
[2]; //added by ws for distinguish WPA and WPA2 05/14/04
107 // to record the rsn cipher suites,addded by ws 09/05/04
108 SUITE_SELECTOR group_cipher
; // 4B
109 SUITE_SELECTOR pairwise_key_cipher_suites
[WLAN_MAX_PAIRWISE_CIPHER_SUITE_COUNT
];
110 SUITE_SELECTOR auth_key_mgt_suites
[WLAN_MAX_AUTH_KEY_MGT_SUITE_LIST_COUNT
];
112 u16 pairwise_key_cipher_suite_count
;
113 u16 auth_key_mgt_suite_count
;
115 u8 pairwise_key_cipher_suite_selected
;
116 u8 auth_key_mgt_suite_selected
;
119 struct RSN_Capability_Element rsn_capabilities
; // 2B
122 //to record the rsn cipher suites for WPA2
124 u32 pre_auth
; //added by WS for distinguish for 05/04/04
125 SUITE_SELECTOR wpa2_group_cipher
; // 4B
126 SUITE_SELECTOR wpa2_pairwise_key_cipher_suites
[WLAN_MAX_PAIRWISE_CIPHER_SUITE_COUNT
];
127 SUITE_SELECTOR wpa2_auth_key_mgt_suites
[WLAN_MAX_AUTH_KEY_MGT_SUITE_LIST_COUNT
];
129 u16 wpa2_pairwise_key_cipher_suite_count
;
130 u16 wpa2_auth_key_mgt_suite_count
;
132 u8 wpa2_pairwise_key_cipher_suite_selected
;
133 u8 wpa2_auth_key_mgt_suite_selected
;
136 struct RSN_Capability_Element wpa2_rsn_capabilities
; // 2B
138 #endif //endif _WPA2_
140 //For Replay protection
141 // u8 PairwiseTSC[6];
145 u32 ScanTimeStamp
; //for the decision whether the station/AP(may exist at
146 //different channels) has left. It must be detected by
147 //scanning. Local device may connected or disconnected.
148 u32 BssTimeStamp
; //Only for the decision whether the station/AP(exist in
149 //the same channel, and no scanning) if local device has
150 //connected successfully.
152 // 20061108 Add for storing WPS_IE. [E id][Length][OUI][Data]
153 u8 WPS_IE_Data
[MAX_IE_APPEND_SIZE
];
155 u16 WPS_IE_length_tmp
; // For verify there is an WPS_IE in Beacon or probe response
157 } WB_BSSDESCRIPTION
, *PWB_BSSDESCRIPTION
;
159 #define wBSSConnectedSTA(adapter) \
160 ((u16)(adapter)->sLocalPara.wConnectedSTAindex)
162 #define psBSS(i) (&(adapter->asBSSDescriptElement[(i)]))