blob: af77b3d14b05d3cb0e325f871d916c18441e586c [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42/*
43 *
44 * Airgo Networks, Inc proprietary. All rights reserved.
45 * This file limProcessProbeRspFrame.cc contains the code
46 * for processing Probe Response Frame.
47 * Author: Chandra Modumudi
48 * Date: 03/01/02
49 * History:-
50 * Date Modified by Modification Information
51 * --------------------------------------------------------------------
52 *
53 */
54
55#include "wniApi.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070056#include "wniCfgSta.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070057#include "aniGlobal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070058#include "schApi.h"
59#include "utilsApi.h"
60#include "limApi.h"
61#include "limTypes.h"
62#include "limUtils.h"
63#include "limAssocUtils.h"
64#include "limPropExtsUtils.h"
65#include "limSerDesUtils.h"
66#include "limSendMessages.h"
67
68#include "parserApi.h"
69
Leela V Kiran Kumar Reddy Chirala6a458752013-02-16 15:41:27 -080070tSirRetStatus
71limValidateIEInformationInProbeRspFrame (tANI_U8 *pRxPacketInfo)
72{
73 tSirRetStatus status = eSIR_SUCCESS;
74
75 if (WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo) < (SIR_MAC_B_PR_SSID_OFFSET + SIR_MAC_MIN_IE_LEN))
76 {
77 status = eSIR_FAILURE;
78 }
79
80 return status;
81}
82
Jeff Johnson295189b2012-06-20 16:38:30 -070083/**
84 * limProcessProbeRspFrame
85 *
86 *FUNCTION:
87 * This function is called by limProcessMessageQueue() upon
88 * Probe Response frame reception.
89 *
90 *LOGIC:
91 * This function processes received Probe Response frame.
92 *
93 *ASSUMPTIONS:
94 *
95 *NOTE:
96 * 1. Frames with out-of-order IEs are dropped.
97 * 2. In case of IBSS, join 'success' makes MLM state machine
98 * transition into 'BSS started' state. This may have to change
99 * depending on supporting what kinda Authentication in IBSS.
100 *
101 * @param pMac Pointer to Global MAC structure
102 * @param *pRxPacketInfo A pointer to Buffer descriptor + associated PDUs
103 * @return None
104 */
105
106
107void
108limProcessProbeRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession psessionEntry)
109{
110 tANI_U8 *pBody;
111 tANI_U32 frameLen = 0;
112 tSirMacAddr currentBssId;
113 tpSirMacMgmtHdr pHdr;
Jeff Johnson32d95a32012-09-10 13:15:23 -0700114 tSirProbeRespBeacon *pProbeRsp;
Jeff Johnson295189b2012-06-20 16:38:30 -0700115 tANI_U8 qosEnabled = false;
116 tANI_U8 wmeEnabled = false;
117
Jeff Johnson32d95a32012-09-10 13:15:23 -0700118 if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
119 (void **)&pProbeRsp, sizeof(tSirProbeRespBeacon)))
120 {
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700121 limLog(pMac, LOGE, FL("Unable to PAL allocate memory in limProcessProbeRspFrame") );
Jeff Johnson32d95a32012-09-10 13:15:23 -0700122 return;
123 }
124
125 pProbeRsp->ssId.length = 0;
126 pProbeRsp->wpa.length = 0;
127 pProbeRsp->propIEinfo.apName.length = 0;
Jeff Johnson295189b2012-06-20 16:38:30 -0700128
129
130 pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
131
132
133 PELOG2(limLog(pMac, LOG2,
134 FL("Received Probe Response frame with length=%d from "),
135 WDA_GET_RX_MPDU_LEN(pRxPacketInfo));
136 limPrintMacAddr(pMac, pHdr->sa, LOG2);)
137
138 if (limDeactivateMinChannelTimerDuringScan(pMac) != eSIR_SUCCESS)
Jeff Johnson32d95a32012-09-10 13:15:23 -0700139 {
140 palFreeMemory(pMac->hHdd, pProbeRsp);
141 return;
142 }
Leela V Kiran Kumar Reddy Chirala6a458752013-02-16 15:41:27 -0800143 // Validate IE information before processing Probe Response Frame
144 if (limValidateIEInformationInProbeRspFrame(pRxPacketInfo) != eSIR_SUCCESS)
145 {
146 PELOG1(limLog(pMac, LOG1,
147 FL("Parse error ProbeResponse, length=%d"), frameLen);)
148 palFreeMemory(pMac->hHdd, pProbeRsp);
149 return;
150 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700151
152 /**
153 * Expect Probe Response only when
154 * 1. STA is in scan mode waiting for Beacon/Probe response or
155 * 2. STA is waiting for Beacon/Probe Response to announce
156 * join success or
157 * 3. STA is in IBSS mode in BSS started state or
158 * 4. STA/AP is in learn mode
159 * 5. STA in link established state. In this state, the probe response is
160 * expected for two scenarios:
161 * -- As part of heart beat mechanism, probe req is sent out
162 * -- If QoS Info IE in beacon has a different count for EDCA Params,
163 * and EDCA IE is not present in beacon,
164 * then probe req is sent out to get the EDCA params.
165 *
166 * Ignore Probe Response frame in all other states
167 */
168 // TO SUPPORT BT-AMP
169 if (((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) || //mlm state check should be global - 18th oct
170 (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) || //mlm state check should be global - 18th oct
171 (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE) || //mlm state check should be global - 18th oct
172 (psessionEntry->limMlmState == eLIM_MLM_WT_JOIN_BEACON_STATE) ||
173 (psessionEntry->limMlmState == eLIM_MLM_LINK_ESTABLISHED_STATE) )||
174 ((GET_LIM_SYSTEM_ROLE(psessionEntry) == eLIM_STA_IN_IBSS_ROLE) &&
175 (psessionEntry->limMlmState == eLIM_MLM_BSS_STARTED_STATE)))
176 {
177 frameLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
178
179 // Get pointer to Probe Response frame body
180 pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
181
Leela V Kiran Kumar Reddy Chirala6a458752013-02-16 15:41:27 -0800182 if (sirConvertProbeFrame2Struct(pMac, pBody, frameLen, pProbeRsp) == eSIR_FAILURE ||
183 !pProbeRsp->ssidPresent) // Enforce Mandatory IEs
Jeff Johnson295189b2012-06-20 16:38:30 -0700184 {
185 PELOG1(limLog(pMac, LOG1,
Leela V Kiran Kumar Reddy Chirala6a458752013-02-16 15:41:27 -0800186 FL("Parse error ProbeResponse, length=%d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700187 frameLen);)
Jeff Johnson32d95a32012-09-10 13:15:23 -0700188 palFreeMemory(pMac->hHdd, pProbeRsp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700189 return;
190 }
191 //To Support BT-AMP
192 if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) || //mlm state check should be global - 18th oct
193 (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE))
Jeff Johnson32d95a32012-09-10 13:15:23 -0700194 limCheckAndAddBssDescription(pMac, pProbeRsp, pRxPacketInfo,
Jeff Johnson295189b2012-06-20 16:38:30 -0700195 ((pMac->lim.gLimHalScanState == eLIM_HAL_SCANNING_STATE) ? eANI_BOOLEAN_TRUE : eANI_BOOLEAN_FALSE), eANI_BOOLEAN_TRUE);
196 else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE) //mlm state check should be global - 18th oct
197 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700198 }
199 else if (psessionEntry->limMlmState ==
200 eLIM_MLM_WT_JOIN_BEACON_STATE)
201 {
Jeff Johnson43971f52012-07-17 12:26:56 -0700202 if( psessionEntry->beacon != NULL )//Either Beacon/probe response is required. Hence store it in same buffer.
Jeff Johnson295189b2012-06-20 16:38:30 -0700203 {
204 palFreeMemory(pMac->hHdd, psessionEntry->beacon);
205 psessionEntry->beacon = NULL;
Jeff Johnson43971f52012-07-17 12:26:56 -0700206 }
207 psessionEntry->bcnLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
208 if ((palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->beacon,
209 psessionEntry->bcnLen))
210 != eHAL_STATUS_SUCCESS)
211 {
212 PELOGE(limLog(pMac, LOGE,
213 FL("Unable to allocate memory to store beacon"));)
214 }
215 else
216 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700217 //Store the Beacon/ProbeRsp. This is sent to csr/hdd in join cnf response.
Jeff Johnson43971f52012-07-17 12:26:56 -0700218 palCopyMemory(pMac->hHdd, psessionEntry->beacon,
219 WDA_GET_RX_MPDU_DATA(pRxPacketInfo),
220 psessionEntry->bcnLen);
221 }
222
Jeff Johnson295189b2012-06-20 16:38:30 -0700223 // STA in WT_JOIN_BEACON_STATE
Jeff Johnson32d95a32012-09-10 13:15:23 -0700224 limCheckAndAnnounceJoinSuccess(pMac, pProbeRsp, pHdr, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700225 }
226 else if(psessionEntry->limMlmState == eLIM_MLM_LINK_ESTABLISHED_STATE)
227 {
228 tpDphHashNode pStaDs = NULL;
229 /**
230 * Check if this Probe Response is for
231 * our Probe Request sent upon reaching
232 * heart beat threshold
233 */
234 #if 0
235 if (wlan_cfgGetStr(pMac,
236 WNI_CFG_BSSID,
237 currentBssId,
238 &cfg) != eSIR_SUCCESS)
239 {
240 /// Could not get BSSID from CFG. Log error.
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700241 limLog(pMac, LOGP, FL("could not retrieve BSSID"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700242 }
243 #endif //TO SUPPORT BT-AMP
244 sirCopyMacAddr(currentBssId,psessionEntry->bssId);
245
246 if ( !palEqualMemory( pMac->hHdd,currentBssId, pHdr->bssId, sizeof(tSirMacAddr)) )
Jeff Johnson32d95a32012-09-10 13:15:23 -0700247 {
248 palFreeMemory(pMac->hHdd, pProbeRsp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700249 return;
Jeff Johnson32d95a32012-09-10 13:15:23 -0700250 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700251
252 if (!LIM_IS_CONNECTION_ACTIVE(psessionEntry))
253 {
254 limLog(pMac, LOGW,
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700255 FL("Received Probe Resp from AP. So it is alive!!"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700256
Jeff Johnson32d95a32012-09-10 13:15:23 -0700257 if (pProbeRsp->HTInfo.present)
258 limReceivedHBHandler(pMac, (tANI_U8)pProbeRsp->HTInfo.primaryChannel, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700259 else
Jeff Johnson32d95a32012-09-10 13:15:23 -0700260 limReceivedHBHandler(pMac, (tANI_U8)pProbeRsp->channelNumber, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700261 }
262
Jeff Johnson295189b2012-06-20 16:38:30 -0700263
264 if (psessionEntry->limSystemRole == eLIM_STA_ROLE)
265 {
Jeff Johnson32d95a32012-09-10 13:15:23 -0700266 if (pProbeRsp->channelSwitchPresent ||
267 pProbeRsp->propIEinfo.propChannelSwitchPresent)
Jeff Johnson295189b2012-06-20 16:38:30 -0700268 {
Jeff Johnson32d95a32012-09-10 13:15:23 -0700269 limUpdateChannelSwitch(pMac, pProbeRsp, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700270 }
Jeff Johnsone7245742012-09-05 17:12:55 -0700271 else if (psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
Jeff Johnson295189b2012-06-20 16:38:30 -0700272 {
273 limCancelDot11hChannelSwitch(pMac, psessionEntry);
274 }
275 }
276
Jeff Johnson295189b2012-06-20 16:38:30 -0700277
278 /**
279 * Now Process EDCA Parameters, if EDCAParamSet count is different.
280 * -- While processing beacons in link established state if it is determined that
281 * QoS Info IE has a different count for EDCA Params,
282 * and EDCA IE is not present in beacon,
283 * then probe req is sent out to get the EDCA params.
284 */
285
286 pStaDs = dphGetHashEntry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable);
287
288 limGetQosMode(psessionEntry, &qosEnabled);
289 limGetWmeMode(psessionEntry, &wmeEnabled);
290 PELOG2(limLog(pMac, LOG2,
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700291 FL("wmeEdcaPresent: %d wmeEnabled: %d, edcaPresent: %d, qosEnabled: %d, edcaParams.qosInfo.count: %d schObject.gLimEdcaParamSetCount: %d"),
Jeff Johnson32d95a32012-09-10 13:15:23 -0700292 pProbeRsp->wmeEdcaPresent, wmeEnabled, pProbeRsp->edcaPresent, qosEnabled,
293 pProbeRsp->edcaParams.qosInfo.count, psessionEntry->gLimEdcaParamSetCount);)
294 if (((pProbeRsp->wmeEdcaPresent && wmeEnabled) ||
295 (pProbeRsp->edcaPresent && qosEnabled)) &&
296 (pProbeRsp->edcaParams.qosInfo.count != psessionEntry->gLimEdcaParamSetCount))
Jeff Johnson295189b2012-06-20 16:38:30 -0700297 {
Jeff Johnson32d95a32012-09-10 13:15:23 -0700298 if (schBeaconEdcaProcess(pMac, &pProbeRsp->edcaParams, psessionEntry) != eSIR_SUCCESS)
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700299 PELOGE(limLog(pMac, LOGE, FL("EDCA parameter processing error"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700300 else if (pStaDs != NULL)
301 {
302 // If needed, downgrade the EDCA parameters
303 limSetActiveEdcaParams(pMac, psessionEntry->gLimEdcaParams, psessionEntry);
304
305 if (pStaDs->aniPeer == eANI_BOOLEAN_TRUE)
306 limSendEdcaParams(pMac, psessionEntry->gLimEdcaParamsActive, pStaDs->bssId, eANI_BOOLEAN_TRUE);
307 else
308 limSendEdcaParams(pMac, psessionEntry->gLimEdcaParamsActive, pStaDs->bssId, eANI_BOOLEAN_FALSE);
309 }
310 else
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700311 PELOGE(limLog(pMac, LOGE, FL("Self Entry missing in Hash Table"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700312
313 }
Gopichand Nakkalabe8653b2013-04-10 08:16:05 +0530314
315 if (psessionEntry->fWaitForProbeRsp == true)
316 {
317 limLog(pMac, LOGW, FL("Checking probe response for capability change\n") );
318 limDetectChangeInApCapabilities(pMac, pProbeRsp, psessionEntry);
319 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700320 }
321 else if ((psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE) &&
322 (psessionEntry->limMlmState == eLIM_MLM_BSS_STARTED_STATE))
Jeff Johnson32d95a32012-09-10 13:15:23 -0700323 limHandleIBSScoalescing(pMac, pProbeRsp, pRxPacketInfo,psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700324 } // if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) || ...
325
Jeff Johnson32d95a32012-09-10 13:15:23 -0700326 palFreeMemory(pMac->hHdd, pProbeRsp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700327 // Ignore Probe Response frame in all other states
328 return;
329} /*** end limProcessProbeRspFrame() ***/
330
331
332void
333limProcessProbeRspFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo)
334{
335 tANI_U8 *pBody;
336 tANI_U32 frameLen = 0;
337 tpSirMacMgmtHdr pHdr;
Jeff Johnson32d95a32012-09-10 13:15:23 -0700338 tSirProbeRespBeacon *pProbeRsp;
Jeff Johnson295189b2012-06-20 16:38:30 -0700339
Jeff Johnson32d95a32012-09-10 13:15:23 -0700340 if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
341 (void **)&pProbeRsp, sizeof(tSirProbeRespBeacon)))
342 {
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700343 limLog(pMac, LOGE, FL("Unable to PAL allocate memory in limProcessProbeRspFrameNoSession") );
Jeff Johnson32d95a32012-09-10 13:15:23 -0700344 return;
345 }
346
347 pProbeRsp->ssId.length = 0;
348 pProbeRsp->wpa.length = 0;
349 pProbeRsp->propIEinfo.apName.length = 0;
Jeff Johnson295189b2012-06-20 16:38:30 -0700350
351
352 pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
353
354
355 limLog(pMac, LOG2,
356 FL("Received Probe Response frame with length=%d from "),
357 WDA_GET_RX_MPDU_LEN(pRxPacketInfo));
358 limPrintMacAddr(pMac, pHdr->sa, LOG2);
359
360 if (limDeactivateMinChannelTimerDuringScan(pMac) != eSIR_SUCCESS)
Jeff Johnson32d95a32012-09-10 13:15:23 -0700361 {
362 palFreeMemory(pMac->hHdd, pProbeRsp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700363 return;
Jeff Johnson32d95a32012-09-10 13:15:23 -0700364 }
Leela V Kiran Kumar Reddy Chirala6a458752013-02-16 15:41:27 -0800365 // Validate IE information before processing Probe Response Frame
366 if (limValidateIEInformationInProbeRspFrame(pRxPacketInfo) != eSIR_SUCCESS)
367 {
368 PELOG1(limLog(pMac, LOG1,FL("Parse error ProbeResponse, length=%d"),
369 frameLen);)
370 palFreeMemory(pMac->hHdd, pProbeRsp);
371 return;
372 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700373 /* Since there is no psessionEntry, PE cannot be in the following states:
374 * - eLIM_MLM_WT_JOIN_BEACON_STATE
375 * - eLIM_MLM_LINK_ESTABLISHED_STATE
376 * - eLIM_MLM_BSS_STARTED_STATE
377 * Hence, expect Probe Response only when
378 * 1. STA is in scan mode waiting for Beacon/Probe response
379 *
380 * Ignore Probe Response frame in all other states
381 */
382 if( (pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
383 (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) || //mlm state check should be global - 18th oct
384 (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE) )
385 {
386 frameLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
387
388 // Get pointer to Probe Response frame body
389 pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
390
Jeff Johnson32d95a32012-09-10 13:15:23 -0700391 if (sirConvertProbeFrame2Struct(pMac, pBody, frameLen, pProbeRsp) == eSIR_FAILURE)
Jeff Johnson295189b2012-06-20 16:38:30 -0700392 {
Kiran Kumar Lokere531ca702013-04-01 13:24:23 -0700393 limLog(pMac, LOG1, FL("Parse error ProbeResponse, length=%d"), frameLen);
Jeff Johnson32d95a32012-09-10 13:15:23 -0700394 palFreeMemory(pMac->hHdd, pProbeRsp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700395 return;
396 }
397
398 if( (pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
399 (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) )
Jeff Johnson32d95a32012-09-10 13:15:23 -0700400 limCheckAndAddBssDescription(pMac, pProbeRsp, pRxPacketInfo, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_TRUE);
Jeff Johnson295189b2012-06-20 16:38:30 -0700401 else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE)
402 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700403 }
404 }
Jeff Johnson32d95a32012-09-10 13:15:23 -0700405 palFreeMemory(pMac->hHdd, pProbeRsp);
Jeff Johnson295189b2012-06-20 16:38:30 -0700406 return;
407} /*** end limProcessProbeRspFrameNew() ***/