1 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // BSS descriptor data base
7 // BSS descriptor data base will store the information of the stations at the
8 // surrounding environment. The first entry( psBSS(0) ) will not be used and the
9 // second one( psBSS(1) ) will be used for the broadcast address.
10 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12 //#define MAX_ACC_RSSI_COUNT 10
13 #define MAX_ACC_RSSI_COUNT 6
15 ///////////////////////////////////////////////////////////////////////////
17 // BSS Description set Element , to store scan received Beacon information
19 // Our's differs slightly from the specs. The specify a PHY_Parameter_Set.
20 // Since we're only doing a DS design right now, we just have a DS structure.
21 //////////////////////////////////////////////////////////////////////////////
22 typedef struct BSSDescriptionElement
28 u8 abPeerAddress[ MAC_ADDR_LENGTH + 2 ]; // peer MAC Address associated with this session. 6-OCTET value
29 u32 dwBgScanStamp; // BgScan Sequence Counter stamp, record psROAM->dwScanCounter.
34 u8 abBssID[ MAC_ADDR_LENGTH + 2 ]; // 6B
37 u8 DTIM_Period; // 1 octet usually from TIM element, if present
39 u8 boERP; // analysis ERP or (extended) supported rate element
43 u8 OperationalRate[32];
44 u32 dwBasicRateBitmap; //bit map, retrieve from SupportedRateSet
45 u32 dwOperationalRateBitmap; //bit map, retrieve from SupportedRateSet and
46 // ExtendedSupportedRateSet
47 // For RSSI calculating
48 u32 HalRssi[MAX_ACC_RSSI_COUNT]; // Encode. It must use MACRO of HAL to get the LNA and AGC data
51 ////From beacon/probe response
52 struct SSID_Element SSID; // 34B
55 struct Capability_Information_Element CapabilityInformation; // 2B
58 struct CF_Parameter_Set_Element CF_Parameter_Set; // 8B
59 struct IBSS_Parameter_Set_Element IBSS_Parameter_Set; // 4B
60 struct TIM_Element TIM_Element_Set; // 256B
62 struct DS_Parameter_Set_Element DS_Parameter_Set; // 3B
65 struct ERP_Information_Element ERP_Information_Set; // 3B
68 struct Supported_Rates_Element SupportedRateSet; // 10B
71 struct Extended_Supported_Rates_Element ExtendedSupportedRateSet; // 257B
78 u16 wState; // the current state of the system
79 u16 wIndex; // THIS BSS element entry index
81 void* psAdapter; // pointer to THIS Adapter
82 OS_TIMER nTimer; // MLME timer
85 u16 wAuthAlgo; // peer MAC MLME use Auth algorithm, default OPEN_AUTH
86 u16 wAuthSeqNum; // current local MAC sendout AuthReq sequence number
88 u8 auth_challengeText[128];
91 u32 ies_len; // information element length
92 u8 ies[256]; // information element
95 u8 RsnIe_Type[2]; //added by ws for distinguish WPA and WPA2 05/14/04
99 // to record the rsn cipher suites,addded by ws 09/05/04
100 SUITE_SELECTOR group_cipher; // 4B
101 SUITE_SELECTOR pairwise_key_cipher_suites[WLAN_MAX_PAIRWISE_CIPHER_SUITE_COUNT];
102 SUITE_SELECTOR auth_key_mgt_suites[WLAN_MAX_AUTH_KEY_MGT_SUITE_LIST_COUNT];
104 u16 pairwise_key_cipher_suite_count;
105 u16 auth_key_mgt_suite_count;
107 u8 pairwise_key_cipher_suite_selected;
108 u8 auth_key_mgt_suite_selected;
111 struct RSN_Capability_Element rsn_capabilities; // 2B
114 //to record the rsn cipher suites for WPA2
116 u32 pre_auth; //added by WS for distinguish for 05/04/04
117 SUITE_SELECTOR wpa2_group_cipher; // 4B
118 SUITE_SELECTOR wpa2_pairwise_key_cipher_suites[WLAN_MAX_PAIRWISE_CIPHER_SUITE_COUNT];
119 SUITE_SELECTOR wpa2_auth_key_mgt_suites[WLAN_MAX_AUTH_KEY_MGT_SUITE_LIST_COUNT];
121 u16 wpa2_pairwise_key_cipher_suite_count;
122 u16 wpa2_auth_key_mgt_suite_count;
124 u8 wpa2_pairwise_key_cipher_suite_selected;
125 u8 wpa2_auth_key_mgt_suite_selected;
128 struct RSN_Capability_Element wpa2_rsn_capabilities; // 2B
130 #endif //endif _WPA2_
132 //For Replay protection
133 // u8 PairwiseTSC[6];
137 u32 ScanTimeStamp; //for the decision whether the station/AP(may exist at
138 //different channels) has left. It must be detected by
139 //scanning. Local device may connected or disconnected.
140 u32 BssTimeStamp; //Only for the decision whether the station/AP(exist in
141 //the same channel, and no scanning) if local device has
142 //connected successfully.
144 // 20061108 Add for storing WPS_IE. [E id][Length][OUI][Data]
145 u8 WPS_IE_Data[MAX_IE_APPEND_SIZE];
147 u16 WPS_IE_length_tmp; // For verify there is an WPS_IE in Beacon or probe response
149 } WB_BSSDESCRIPTION, *PWB_BSSDESCRIPTION;
151 #define wBSSConnectedSTA(Adapter) \
152 ((u16)(Adapter)->sLocalPara.wConnectedSTAindex)
154 #define psBSS(i) (&(Adapter->asBSSDescriptElement[(i)]))