blob: 56db3e9ce61bc5d41a3d7e906d57eef95ad05dea [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 */
Chet Lanctot4b9abd72013-06-27 11:14:56 -070041
42
43
Jeff Johnson295189b2012-06-20 16:38:30 -070044/*
45 * Airgo Networks, Inc proprietary. All rights reserved.
46 * This file schBeaconGen.cc contains beacon generation related
47 * functions
48 *
49 * Author: Sandesh Goel
50 * Date: 02/25/02
51 * History:-
52 * Date Modified by Modification Information
53 * --------------------------------------------------------------------
54 *
55 */
56
57#include "palTypes.h"
Jeff Johnson62c27982013-02-27 17:53:55 -080058#include "wniCfgSta.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070059#include "aniGlobal.h"
60#include "sirMacProtDef.h"
61
62#include "limUtils.h"
63#include "limApi.h"
64
Jeff Johnson295189b2012-06-20 16:38:30 -070065
66#include "halMsgApi.h"
67#include "cfgApi.h"
68#include "pmmApi.h"
69#include "schApi.h"
70
71#include "parserApi.h"
72
73#include "schDebug.h"
74
75//
76// March 15, 2006
77// Temporarily (maybe for all of Alpha-1), assuming TIM = 0
78//
79
80const tANI_U8 P2pOui[] = {0x50, 0x6F, 0x9A, 0x9};
81
Jeff Johnson295189b2012-06-20 16:38:30 -070082
Jeff Johnson295189b2012-06-20 16:38:30 -070083tSirRetStatus schGetP2pIeOffset(tANI_U8 *pExtraIe, tANI_U32 extraIeLen, tANI_U16 *pP2pIeOffset)
84{
85 tSirRetStatus status = eSIR_FAILURE;
86 *pP2pIeOffset = 0;
87
88 // Extra IE is not present
89 if(0 == extraIeLen)
90 {
91 return status;
92 }
93
94 // Calculate the P2P IE Offset
95 do
96 {
97 if(*pExtraIe == 0xDD)
98 {
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +053099 if ( vos_mem_compare ( (void *)(pExtraIe+2), &P2pOui, sizeof(P2pOui) ) )
Jeff Johnson295189b2012-06-20 16:38:30 -0700100 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700101 status = eSIR_SUCCESS;
102 break;
103 }
104 }
105
106 (*pP2pIeOffset)++;
107 pExtraIe++;
108 }while(--extraIeLen > 0);
109
110 return status;
111}
Jeff Johnson295189b2012-06-20 16:38:30 -0700112
113tSirRetStatus schAppendAddnIE(tpAniSirGlobal pMac, tpPESession psessionEntry,
114 tANI_U8 *pFrame, tANI_U32 maxBeaconSize,
115 tANI_U32 *nBytes)
116{
117 tSirRetStatus status = eSIR_FAILURE;
118 tANI_U32 present, len;
119 tANI_U8 addIE[WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN];
120
121 if((status = wlan_cfgGetInt(pMac, WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG,
122 &present)) != eSIR_SUCCESS)
123 {
124 limLog(pMac, LOGP, FL("Unable to get WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG"));
125 return status;
126 }
127
128 if(present)
129 {
130 if((status = wlan_cfgGetStrLen(pMac, WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA,
131 &len)) != eSIR_SUCCESS)
132 {
133 limLog(pMac, LOGP,
134 FL("Unable to get WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA length"));
135 return status;
136 }
137
138 if(len <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN && len &&
139 ((len + *nBytes) <= maxBeaconSize))
140 {
141 if((status = wlan_cfgGetStr(pMac,
142 WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA, &addIE[0], &len))
143 == eSIR_SUCCESS)
144 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700145 tANI_U8* pP2pIe = limGetP2pIEPtr(pMac, &addIE[0], len);
146 if(pP2pIe != NULL)
147 {
148 tANI_U8 noaLen = 0;
149 tANI_U8 noaStream[SIR_MAX_NOA_ATTR_LEN + SIR_P2P_IE_HEADER_LEN];
150 //get NoA attribute stream P2P IE
151 noaLen = limGetNoaAttrStream(pMac, noaStream, psessionEntry);
152 if(noaLen)
153 {
154 if(noaLen + len <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN)
155 {
156 vos_mem_copy(&addIE[len], noaStream, noaLen);
157 len += noaLen;
158 /* Update IE Len */
159 pP2pIe[1] += noaLen;
160 }
161 else
162 {
163 limLog(pMac, LOGE,
164 FL("Not able to insert NoA because of length constraint"));
165 }
166 }
167 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700168 vos_mem_copy(pFrame, &addIE[0], len);
169 *nBytes = *nBytes + len;
170 }
171 }
172 }
173
174 return status;
175}
176
177// --------------------------------------------------------------------
178/**
179 * schSetFixedBeaconFields
180 *
181 * FUNCTION:
182 *
183 * LOGIC:
184 *
185 * ASSUMPTIONS:
186 *
187 * NOTE:
188 *
189 * @param None
190 * @return None
191 */
192
193tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEntry)
194{
195 tpAniBeaconStruct pBeacon = (tpAniBeaconStruct)
196 pMac->sch.schObject.gSchBeaconFrameBegin;
197 tpSirMacMgmtHdr mac;
198 tANI_U16 offset;
199 tANI_U8 *ptr;
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700200 tDot11fBeacon1 *pBcn1;
201 tDot11fBeacon2 *pBcn2;
Jeff Johnson295189b2012-06-20 16:38:30 -0700202 tANI_U32 i, nStatus, nBytes;
203 tANI_U32 wpsApEnable=0, tmp;
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700204 tDot11fIEWscProbeRes *pWscProbeRes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700205 tANI_U8 *pExtraIe = NULL;
206 tANI_U32 extraIeLen =0;
207 tANI_U16 extraIeOffset = 0;
208 tANI_U16 p2pIeOffset = 0;
209 tSirRetStatus status = eSIR_SUCCESS;
Jeff Johnson295189b2012-06-20 16:38:30 -0700210
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530211 pBcn1 = vos_mem_malloc(sizeof(tDot11fBeacon1));
212 if ( NULL == pBcn1 )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700213 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700214 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700215 return eSIR_FAILURE;
216 }
217
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530218 pBcn2 = vos_mem_malloc(sizeof(tDot11fBeacon2));
219 if ( NULL == pBcn2 )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700220 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700221 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530222 vos_mem_free(pBcn1);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700223 return eSIR_FAILURE;
224 }
225
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530226 pWscProbeRes = vos_mem_malloc(sizeof(tDot11fIEWscProbeRes));
227 if ( NULL == pWscProbeRes )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700228 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700229 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530230 vos_mem_free(pBcn1);
231 vos_mem_free(pBcn2);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700232 return eSIR_FAILURE;
233 }
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700234
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700235 PELOG1(schLog(pMac, LOG1, FL("Setting fixed beacon fields"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700236
237 /*
238 * First set the fixed fields
239 */
240
241 // set the TFP headers
242
243 // set the mac header
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530244 vos_mem_set(( tANI_U8*) &pBeacon->macHdr, sizeof( tSirMacMgmtHdr ),0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700245 mac = (tpSirMacMgmtHdr) &pBeacon->macHdr;
246 mac->fc.type = SIR_MAC_MGMT_FRAME;
247 mac->fc.subType = SIR_MAC_MGMT_BEACON;
248
249 for (i=0; i<6; i++)
250 mac->da[i] = 0xff;
251
252 /* Knocking out Global pMac update */
253 /* limGetMyMacAddr(pMac, mac->sa); */
254 /* limGetBssid(pMac, mac->bssId); */
255
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530256 vos_mem_copy(mac->sa, psessionEntry->selfMacAddr, sizeof(psessionEntry->selfMacAddr));
257 vos_mem_copy(mac->bssId, psessionEntry->bssId, sizeof (psessionEntry->bssId));
Jeff Johnson295189b2012-06-20 16:38:30 -0700258
259 mac->fc.fromDS = 0;
260 mac->fc.toDS = 0;
261
262 /*
263 * Now set the beacon body
264 */
265
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530266 vos_mem_set(( tANI_U8*) pBcn1, sizeof( tDot11fBeacon1 ), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700267
268 // Skip over the timestamp (it'll be updated later).
269
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700270 pBcn1->BeaconInterval.interval = pMac->sch.schObject.gSchBeaconInterval;
271 PopulateDot11fCapabilities( pMac, &pBcn1->Capabilities, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700272 if (psessionEntry->ssidHidden)
273 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700274 pBcn1->SSID.present = 1; //rest of the fileds are 0 for hidden ssid
Jeff Johnson295189b2012-06-20 16:38:30 -0700275 }
276 else
277 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700278 PopulateDot11fSSID( pMac, &psessionEntry->ssId, &pBcn1->SSID );
Jeff Johnson295189b2012-06-20 16:38:30 -0700279 }
280
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700281
282 PopulateDot11fSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL, &pBcn1->SuppRates,psessionEntry);
283 PopulateDot11fDSParams( pMac, &pBcn1->DSParams, psessionEntry->currentOperChannel, psessionEntry);
284 PopulateDot11fIBSSParams( pMac, &pBcn1->IBSSParams,psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700285
286 offset = sizeof( tAniBeaconStruct );
287 ptr = pMac->sch.schObject.gSchBeaconFrameBegin + offset;
288
Jeff Johnson295189b2012-06-20 16:38:30 -0700289 if((psessionEntry->limSystemRole == eLIM_AP_ROLE)
290 && (psessionEntry->proxyProbeRspEn))
291 {
292 /* Initialize the default IE bitmap to zero */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530293 vos_mem_set(( tANI_U8* )&(psessionEntry->DefProbeRspIeBitmap), (sizeof( tANI_U32 ) * 8), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700294
295 /* Initialize the default IE bitmap to zero */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530296 vos_mem_set(( tANI_U8* )&(psessionEntry->probeRespFrame),
297 sizeof(psessionEntry->probeRespFrame), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700298
299 /* Can be efficiently updated whenever new IE added in Probe response in future */
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700300 limUpdateProbeRspTemplateIeBitmapBeacon1(pMac,pBcn1,&psessionEntry->DefProbeRspIeBitmap[0],
Jeff Johnson295189b2012-06-20 16:38:30 -0700301 &psessionEntry->probeRespFrame);
302 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700303
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700304 nStatus = dot11fPackBeacon1( pMac, pBcn1, ptr,
Jeff Johnson295189b2012-06-20 16:38:30 -0700305 SCH_MAX_BEACON_SIZE - offset,
306 &nBytes );
307 if ( DOT11F_FAILED( nStatus ) )
308 {
309 schLog( pMac, LOGE, FL("Failed to packed a tDot11fBeacon1 (0x%0"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700310 "8x.)."), nStatus );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530311 vos_mem_free(pBcn1);
312 vos_mem_free(pBcn2);
313 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700314 return eSIR_FAILURE;
315 }
316 else if ( DOT11F_WARNED( nStatus ) )
317 {
318 schLog( pMac, LOGE, FL("There were warnings while packing a tDo"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700319 "t11fBeacon1 (0x%08x.)."), nStatus );
Jeff Johnson295189b2012-06-20 16:38:30 -0700320 }
321 /*changed to correct beacon corruption */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530322 vos_mem_set(( tANI_U8*) pBcn2, sizeof( tDot11fBeacon2 ), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700323 pMac->sch.schObject.gSchBeaconOffsetBegin = offset + ( tANI_U16 )nBytes;
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700324 schLog( pMac, LOG1, FL("Initialized beacon begin, offset %d"), offset );
Jeff Johnson295189b2012-06-20 16:38:30 -0700325
326 /*
327 * Initialize the 'new' fields at the end of the beacon
328 */
329
330
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700331 PopulateDot11fCountry( pMac, &pBcn2->Country, psessionEntry);
332 if(pBcn1->Capabilities.qos)
Jeff Johnson295189b2012-06-20 16:38:30 -0700333 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700334 PopulateDot11fEDCAParamSet( pMac, &pBcn2->EDCAParamSet, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700335 }
336
Jeff Johnsone7245742012-09-05 17:12:55 -0700337 if(psessionEntry->lim11hEnable)
Jeff Johnson295189b2012-06-20 16:38:30 -0700338 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700339 PopulateDot11fPowerConstraints( pMac, &pBcn2->PowerConstraints );
340 PopulateDot11fTPCReport( pMac, &pBcn2->TPCReport, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700341 }
342
Jeff Johnson295189b2012-06-20 16:38:30 -0700343
344 if (psessionEntry->dot11mode != WNI_CFG_DOT11_MODE_11B)
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700345 PopulateDot11fERPInfo( pMac, &pBcn2->ERPInfo, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700346
Jeff Johnsone7245742012-09-05 17:12:55 -0700347 if(psessionEntry->htCapability)
Jeff Johnson295189b2012-06-20 16:38:30 -0700348 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700349 PopulateDot11fHTCaps( pMac,psessionEntry, &pBcn2->HTCaps );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700350 PopulateDot11fHTInfo( pMac, &pBcn2->HTInfo, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700351 }
Jeff Johnsone7245742012-09-05 17:12:55 -0700352#ifdef WLAN_FEATURE_11AC
353 if(psessionEntry->vhtCapability)
354 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700355 limLog( pMac, LOGW, FL("Populate VHT IEs in Beacon"));
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700356 PopulateDot11fVHTCaps( pMac, &pBcn2->VHTCaps );
357 PopulateDot11fVHTOperation( pMac, &pBcn2->VHTOperation);
Jeff Johnsone7245742012-09-05 17:12:55 -0700358 // we do not support multi users yet
359 //PopulateDot11fVHTExtBssLoad( pMac, &bcn2.VHTExtBssLoad);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700360 PopulateDot11fExtCap( pMac, &pBcn2->ExtCap);
Mohit Khanna4a70d262012-09-11 16:30:12 -0700361 if(psessionEntry->gLimOperatingMode.present)
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700362 PopulateDot11fOperatingMode( pMac, &pBcn2->OperatingMode, psessionEntry );
Jeff Johnsone7245742012-09-05 17:12:55 -0700363 }
364#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700365
366 PopulateDot11fExtSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL,
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700367 &pBcn2->ExtSuppRates, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700368
369 if( psessionEntry->pLimStartBssReq != NULL )
370 {
371 PopulateDot11fWPA( pMac, &psessionEntry->pLimStartBssReq->rsnIE,
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700372 &pBcn2->WPA );
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700373 PopulateDot11fRSNOpaque( pMac, &psessionEntry->pLimStartBssReq->rsnIE,
374 &pBcn2->RSNOpaque );
Jeff Johnson295189b2012-06-20 16:38:30 -0700375 }
376
377 if(psessionEntry->limWmeEnabled)
378 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700379 PopulateDot11fWMM( pMac, &pBcn2->WMMInfoAp, &pBcn2->WMMParams, &pBcn2->WMMCaps, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700380 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700381 if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
382 {
383 if(psessionEntry->wps_state != SAP_WPS_DISABLED)
384 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700385 PopulateDot11fBeaconWPSIEs( pMac, &pBcn2->WscBeacon, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700386 }
387 }
388 else
389 {
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800390 if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700391 limLog(pMac, LOGP,"Failed to cfg get id %d", WNI_CFG_WPS_ENABLE );
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800392
393 wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
394
395 if (wpsApEnable)
396 {
397 PopulateDot11fWsc(pMac, &pBcn2->WscBeacon);
398 }
399
400 if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
401 {
402 PopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
403 pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
404 }
405
406 if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
407 {
408 DePopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
409 pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
410 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700411 }
412
Jeff Johnson295189b2012-06-20 16:38:30 -0700413 if((psessionEntry->limSystemRole == eLIM_AP_ROLE)
414 && (psessionEntry->proxyProbeRspEn))
415 {
416 /* Can be efficiently updated whenever new IE added in Probe response in future */
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700417 limUpdateProbeRspTemplateIeBitmapBeacon2(pMac,pBcn2,&psessionEntry->DefProbeRspIeBitmap[0],
Jeff Johnson295189b2012-06-20 16:38:30 -0700418 &psessionEntry->probeRespFrame);
419
420 /* update probe response WPS IE instead of beacon WPS IE
421 * */
422 if(psessionEntry->wps_state != SAP_WPS_DISABLED)
423 {
424 if(psessionEntry->APWPSIEs.SirWPSProbeRspIE.FieldPresent)
425 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700426 PopulateDot11fProbeResWPSIEs(pMac, pWscProbeRes, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700427 }
428 else
429 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700430 pWscProbeRes->present = 0;
Jeff Johnson295189b2012-06-20 16:38:30 -0700431 }
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700432 if(pWscProbeRes->present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700433 {
434 SetProbeRspIeBitmap(&psessionEntry->DefProbeRspIeBitmap[0],SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530435 vos_mem_copy((void *)&psessionEntry->probeRespFrame.WscProbeRes,
436 (void *)pWscProbeRes,
437 sizeof(tDot11fIEWscProbeRes));
Jeff Johnson295189b2012-06-20 16:38:30 -0700438 }
439 }
440
441 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700442
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700443 nStatus = dot11fPackBeacon2( pMac, pBcn2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700444 pMac->sch.schObject.gSchBeaconFrameEnd,
445 SCH_MAX_BEACON_SIZE, &nBytes );
446 if ( DOT11F_FAILED( nStatus ) )
447 {
448 schLog( pMac, LOGE, FL("Failed to packed a tDot11fBeacon2 (0x%0"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700449 "8x.)."), nStatus );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530450 vos_mem_free(pBcn1);
451 vos_mem_free(pBcn2);
452 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700453 return eSIR_FAILURE;
454 }
455 else if ( DOT11F_WARNED( nStatus ) )
456 {
457 schLog( pMac, LOGE, FL("There were warnings while packing a tDo"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700458 "t11fBeacon2 (0x%08x.)."), nStatus );
Jeff Johnson295189b2012-06-20 16:38:30 -0700459 }
460
Jeff Johnson295189b2012-06-20 16:38:30 -0700461 pExtraIe = pMac->sch.schObject.gSchBeaconFrameEnd + nBytes;
462 extraIeOffset = nBytes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700463
464 //TODO: Append additional IE here.
465 schAppendAddnIE(pMac, psessionEntry,
466 pMac->sch.schObject.gSchBeaconFrameEnd + nBytes,
467 SCH_MAX_BEACON_SIZE, &nBytes);
468
469 pMac->sch.schObject.gSchBeaconOffsetEnd = ( tANI_U16 )nBytes;
470
Jeff Johnson295189b2012-06-20 16:38:30 -0700471 extraIeLen = nBytes - extraIeOffset;
472
473 //Get the p2p Ie Offset
474 status = schGetP2pIeOffset(pExtraIe, extraIeLen, &p2pIeOffset);
475
476 if(eSIR_SUCCESS == status)
477 {
478 //Update the P2P Ie Offset
479 pMac->sch.schObject.p2pIeOffset =
480 pMac->sch.schObject.gSchBeaconOffsetBegin + TIM_IE_SIZE +
481 extraIeOffset + p2pIeOffset;
482 }
483 else
484 {
485 pMac->sch.schObject.p2pIeOffset = 0;
486 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700487
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700488 schLog( pMac, LOG1, FL("Initialized beacon end, offset %d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700489 pMac->sch.schObject.gSchBeaconOffsetEnd );
490
491 pMac->sch.schObject.fBeaconChanged = 1;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530492 vos_mem_free(pBcn1);
493 vos_mem_free(pBcn2);
494 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700495 return eSIR_SUCCESS;
496}
497
Jeff Johnson295189b2012-06-20 16:38:30 -0700498void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
499 tDot11fBeacon1* beacon1,
500 tANI_U32* DefProbeRspIeBitmap,
501 tDot11fProbeResponse* prb_rsp)
502{
503 prb_rsp->BeaconInterval = beacon1->BeaconInterval;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530504 vos_mem_copy((void *)&prb_rsp->Capabilities, (void *)&beacon1->Capabilities,
505 sizeof(beacon1->Capabilities));
Jeff Johnson295189b2012-06-20 16:38:30 -0700506
507 /* SSID */
508 if(beacon1->SSID.present)
509 {
510 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_SSID_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530511 /* populating it, because probe response has to go with SSID even in hidden case */
Jeff Johnson295189b2012-06-20 16:38:30 -0700512 PopulateDot11fSSID2( pMac, &prb_rsp->SSID );
513 }
514 /* supported rates */
515 if(beacon1->SuppRates.present)
516 {
517 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_RATESET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530518 vos_mem_copy((void *)&prb_rsp->SuppRates, (void *)&beacon1->SuppRates,
519 sizeof(beacon1->SuppRates));
Jeff Johnson295189b2012-06-20 16:38:30 -0700520
521 }
522 /* DS Parameter set */
523 if(beacon1->DSParams.present)
524 {
525 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_DS_PARAM_SET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530526 vos_mem_copy((void *)&prb_rsp->DSParams, (void *)&beacon1->DSParams,
527 sizeof(beacon1->DSParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700528
529 }
530
531 /* IBSS params will not be present in the Beacons transmitted by AP */
532}
533
534void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac,
535 tDot11fBeacon2* beacon2,
536 tANI_U32* DefProbeRspIeBitmap,
537 tDot11fProbeResponse* prb_rsp)
538{
539 /* IBSS parameter set - will not be present in probe response tx by AP */
540 /* country */
541 if(beacon2->Country.present)
542 {
543 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_COUNTRY_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530544 vos_mem_copy((void *)&prb_rsp->Country, (void *)&beacon2->Country,
545 sizeof(beacon2->Country));
Jeff Johnson295189b2012-06-20 16:38:30 -0700546
547 }
548 /* Power constraint */
549 if(beacon2->PowerConstraints.present)
550 {
551 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_PWR_CONSTRAINT_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530552 vos_mem_copy((void *)&prb_rsp->PowerConstraints, (void *)&beacon2->PowerConstraints,
553 sizeof(beacon2->PowerConstraints));
Jeff Johnson295189b2012-06-20 16:38:30 -0700554
555 }
556 /* Channel Switch Annoouncement SIR_MAC_CHNL_SWITCH_ANN_EID */
557 if(beacon2->ChanSwitchAnn.present)
558 {
559 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_CHNL_SWITCH_ANN_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530560 vos_mem_copy((void *)&prb_rsp->ChanSwitchAnn, (void *)&beacon2->ChanSwitchAnn,
561 sizeof(beacon2->ChanSwitchAnn));
Jeff Johnson295189b2012-06-20 16:38:30 -0700562
563 }
564 /* ERP information */
565 if(beacon2->ERPInfo.present)
566 {
567 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_ERP_INFO_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530568 vos_mem_copy((void *)&prb_rsp->ERPInfo, (void *)&beacon2->ERPInfo,
569 sizeof(beacon2->ERPInfo));
Jeff Johnson295189b2012-06-20 16:38:30 -0700570
571 }
572 /* Extended supported rates */
573 if(beacon2->ExtSuppRates.present)
574 {
575 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_EXTENDED_RATE_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530576 vos_mem_copy((void *)&prb_rsp->ExtSuppRates, (void *)&beacon2->ExtSuppRates,
577 sizeof(beacon2->ExtSuppRates));
Jeff Johnson295189b2012-06-20 16:38:30 -0700578
579 }
580
581 /* WPA */
582 if(beacon2->WPA.present)
583 {
584 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530585 vos_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA,
586 sizeof(beacon2->WPA));
Jeff Johnson295189b2012-06-20 16:38:30 -0700587
588 }
589
590 /* RSN */
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700591 if(beacon2->RSNOpaque.present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700592 {
593 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_RSN_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530594 vos_mem_copy((void *)&prb_rsp->RSNOpaque, (void *)&beacon2->RSNOpaque,
595 sizeof(beacon2->RSNOpaque));
Jeff Johnson295189b2012-06-20 16:38:30 -0700596 }
597/*
598 // BSS load
599 if(beacon2->QBSSLoad.present)
600 {
601 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_QBSS_LOAD_EID);
602 }
603*/
604 /* EDCA Parameter set */
605 if(beacon2->EDCAParamSet.present)
606 {
607 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_EDCA_PARAM_SET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530608 vos_mem_copy((void *)&prb_rsp->EDCAParamSet, (void *)&beacon2->EDCAParamSet,
609 sizeof(beacon2->EDCAParamSet));
Jeff Johnson295189b2012-06-20 16:38:30 -0700610
611 }
612 /* Vendor specific - currently no vendor specific IEs added */
613 /* Requested IEs - currently we are not processing this will be added later */
614 //HT capability IE
615 if(beacon2->HTCaps.present)
616 {
617 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_HT_CAPABILITIES_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530618 vos_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps,
619 sizeof(beacon2->HTCaps));
Jeff Johnson295189b2012-06-20 16:38:30 -0700620 }
621 // HT Info IE
622 if(beacon2->HTInfo.present)
623 {
624 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_HT_INFO_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530625 vos_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo,
626 sizeof(beacon2->HTInfo));
Jeff Johnson295189b2012-06-20 16:38:30 -0700627 }
628
Jeff Johnsone7245742012-09-05 17:12:55 -0700629#ifdef WLAN_FEATURE_11AC
630 if(beacon2->VHTCaps.present)
631 {
632 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_CAPABILITIES_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530633 vos_mem_copy((void *)&prb_rsp->VHTCaps, (void *)&beacon2->VHTCaps,
634 sizeof(beacon2->VHTCaps));
Jeff Johnsone7245742012-09-05 17:12:55 -0700635 }
636 if(beacon2->VHTOperation.present)
637 {
638 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_OPERATION_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530639 vos_mem_copy((void *)&prb_rsp->VHTOperation, (void *)&beacon2->VHTOperation,
640 sizeof(beacon2->VHTOperation));
Jeff Johnsone7245742012-09-05 17:12:55 -0700641 }
642 if(beacon2->VHTExtBssLoad.present)
643 {
644 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_EXT_BSS_LOAD_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530645 vos_mem_copy((void *)&prb_rsp->VHTExtBssLoad, (void *)&beacon2->VHTExtBssLoad,
646 sizeof(beacon2->VHTExtBssLoad));
Jeff Johnsone7245742012-09-05 17:12:55 -0700647 }
648#endif
649
Jeff Johnson295189b2012-06-20 16:38:30 -0700650 //WMM IE
651 if(beacon2->WMMParams.present)
652 {
653 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530654 vos_mem_copy((void *)&prb_rsp->WMMParams, (void *)&beacon2->WMMParams,
655 sizeof(beacon2->WMMParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700656 }
657 //WMM capability - most of the case won't be present
658 if(beacon2->WMMCaps.present)
659 {
660 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530661 vos_mem_copy((void *)&prb_rsp->WMMCaps, (void *)&beacon2->WMMCaps,
662 sizeof(beacon2->WMMCaps));
Jeff Johnson295189b2012-06-20 16:38:30 -0700663 }
664
665}
666
667void SetProbeRspIeBitmap(tANI_U32* IeBitmap,tANI_U32 pos)
668{
669 tANI_U32 index,temp;
670
671 index = pos >> 5;
672 if(index >= 8 )
673 {
674 return;
675 }
676 temp = IeBitmap[index];
677
678 temp |= 1 << (pos & 0x1F);
679
680 IeBitmap[index] = temp;
681}
682
Jeff Johnson295189b2012-06-20 16:38:30 -0700683
Jeff Johnson295189b2012-06-20 16:38:30 -0700684
685// --------------------------------------------------------------------
686/**
687 * writeBeaconToMemory
688 *
689 * FUNCTION:
690 *
691 * LOGIC:
692 *
693 * ASSUMPTIONS:
694 *
695 * NOTE:
696 *
697 * @param None
698 * @param size Size of the beacon to write to memory
699 * @param length Length field of the beacon to write to memory
700 * @return None
701 */
702
703void writeBeaconToMemory(tpAniSirGlobal pMac, tANI_U16 size, tANI_U16 length, tpPESession psessionEntry)
704{
705 tANI_U16 i;
706 tpAniBeaconStruct pBeacon;
707
708 // copy end of beacon only if length > 0
709 if (length > 0)
710 {
711 for (i=0; i < pMac->sch.schObject.gSchBeaconOffsetEnd; i++)
712 pMac->sch.schObject.gSchBeaconFrameBegin[size++] = pMac->sch.schObject.gSchBeaconFrameEnd[i];
713 }
714
715 // Update the beacon length
716 pBeacon = (tpAniBeaconStruct) pMac->sch.schObject.gSchBeaconFrameBegin;
717 // Do not include the beaconLength indicator itself
718 if (length == 0)
719 {
720 pBeacon->beaconLength = 0;
721 // Dont copy entire beacon, Copy length field alone
722 size = 4;
723 }
724 else
725 pBeacon->beaconLength = (tANI_U32) size - sizeof( tANI_U32 );
726
727 // write size bytes from gSchBeaconFrameBegin
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700728 PELOG2(schLog(pMac, LOG2, FL("Beacon size - %d bytes"), size);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700729 PELOG2(sirDumpBuf(pMac, SIR_SCH_MODULE_ID, LOG2, pMac->sch.schObject.gSchBeaconFrameBegin, size);)
730
731 if (! pMac->sch.schObject.fBeaconChanged)
732 return;
733
734 pMac->sch.gSchGenBeacon = 1;
735 if (pMac->sch.gSchGenBeacon)
736 {
737 pMac->sch.gSchBeaconsSent++;
738
739 //
740 // Copy beacon data to SoftMAC shared memory...
741 // Do this by sending a message to HAL
742 //
743
744 size = (size + 3) & (~3);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530745 if( eSIR_SUCCESS != schSendBeaconReq( pMac, pMac->sch.schObject.gSchBeaconFrameBegin,
746 size, psessionEntry))
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700747 PELOGE(schLog(pMac, LOGE, FL("schSendBeaconReq() returned an error (zsize %d)"), size);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700748 else
749 {
750 pMac->sch.gSchBeaconsWritten++;
751 }
752 }
753 pMac->sch.schObject.fBeaconChanged = 0;
754}
755
756// --------------------------------------------------------------------
757/**
758 * @function: SchProcessPreBeaconInd
759 *
760 * @brief : Process the PreBeacon Indication from the Lim
761 *
762 * ASSUMPTIONS:
763 *
764 * NOTE:
765 *
766 * @param : pMac - tpAniSirGlobal
767 *
768 * @return None
769 */
770
771void
772schProcessPreBeaconInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
773{
774 tpBeaconGenParams pMsg = (tpBeaconGenParams)limMsg->bodyptr;
775 tANI_U32 beaconSize = pMac->sch.schObject.gSchBeaconOffsetBegin;
776 tpPESession psessionEntry;
777 tANI_U8 sessionId;
778
779 if((psessionEntry = peFindSessionByBssid(pMac,pMsg->bssId, &sessionId))== NULL)
780 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700781 PELOGE(schLog(pMac, LOGE, FL("session lookup fails"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700782 goto end;
783 }
784
785
786
787 // If SME is not in normal mode, no need to generate beacon
788 if (psessionEntry->limSmeState != eLIM_SME_NORMAL_STATE)
789 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700790 PELOGE(schLog(pMac, LOG1, FL("PreBeaconInd received in invalid state: %d"), psessionEntry->limSmeState);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700791 goto end;
792 }
793
794 switch(psessionEntry->limSystemRole){
795
796 case eLIM_STA_IN_IBSS_ROLE:
797 case eLIM_BT_AMP_AP_ROLE:
798 case eLIM_BT_AMP_STA_ROLE:
799 // generate IBSS parameter set
800 if(psessionEntry->statypeForBss == STA_ENTRY_SELF)
801 writeBeaconToMemory(pMac, (tANI_U16) beaconSize, (tANI_U16)beaconSize, psessionEntry);
802 else
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700803 PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700804 break;
805
Jeff Johnson295189b2012-06-20 16:38:30 -0700806 case eLIM_AP_ROLE:{
807 tANI_U8 *ptr = &pMac->sch.schObject.gSchBeaconFrameBegin[pMac->sch.schObject.gSchBeaconOffsetBegin];
808 tANI_U16 timLength = 0;
809 if(psessionEntry->statypeForBss == STA_ENTRY_SELF){
810 pmmGenerateTIM(pMac, &ptr, &timLength, psessionEntry->dtimPeriod);
811 beaconSize += 2 + timLength;
812 writeBeaconToMemory(pMac, (tANI_U16) beaconSize, (tANI_U16)beaconSize, psessionEntry);
813 }
814 else
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700815 PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700816 }
817 break;
Jeff Johnson295189b2012-06-20 16:38:30 -0700818
Jeff Johnson295189b2012-06-20 16:38:30 -0700819
820 default:
821 PELOGE(schLog(pMac, LOGE, FL("Error-PE has Receive PreBeconGenIndication when System is in %d role"),
822 psessionEntry->limSystemRole);)
823 }
824
825end:
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530826 vos_mem_free(pMsg);
Jeff Johnson295189b2012-06-20 16:38:30 -0700827
828}