blob: ae3d93e446b6692f14edef8154529861e0eef322 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -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.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080022/*
Kiet Lam842dad02014-02-18 18:44:02 -080023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/*
Jeff Johnson295189b2012-06-20 16:38:30 -070029 * This file schBeaconGen.cc contains beacon generation related
30 * functions
31 *
32 * Author: Sandesh Goel
33 * Date: 02/25/02
34 * History:-
35 * Date Modified by Modification Information
36 * --------------------------------------------------------------------
37 *
38 */
39
40#include "palTypes.h"
Jeff Johnson62c27982013-02-27 17:53:55 -080041#include "wniCfgSta.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070042#include "aniGlobal.h"
43#include "sirMacProtDef.h"
44
45#include "limUtils.h"
46#include "limApi.h"
47
Jeff Johnson295189b2012-06-20 16:38:30 -070048
49#include "halMsgApi.h"
50#include "cfgApi.h"
51#include "pmmApi.h"
52#include "schApi.h"
53
54#include "parserApi.h"
55
56#include "schDebug.h"
57
58//
59// March 15, 2006
60// Temporarily (maybe for all of Alpha-1), assuming TIM = 0
61//
62
63const tANI_U8 P2pOui[] = {0x50, 0x6F, 0x9A, 0x9};
64
Jeff Johnson295189b2012-06-20 16:38:30 -070065
Jeff Johnson295189b2012-06-20 16:38:30 -070066tSirRetStatus schGetP2pIeOffset(tANI_U8 *pExtraIe, tANI_U32 extraIeLen, tANI_U16 *pP2pIeOffset)
67{
68 tSirRetStatus status = eSIR_FAILURE;
69 *pP2pIeOffset = 0;
70
71 // Extra IE is not present
72 if(0 == extraIeLen)
73 {
74 return status;
75 }
76
77 // Calculate the P2P IE Offset
78 do
79 {
80 if(*pExtraIe == 0xDD)
81 {
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +053082 if ( vos_mem_compare ( (void *)(pExtraIe+2), &P2pOui, sizeof(P2pOui) ) )
Jeff Johnson295189b2012-06-20 16:38:30 -070083 {
Jeff Johnson295189b2012-06-20 16:38:30 -070084 status = eSIR_SUCCESS;
85 break;
86 }
87 }
88
89 (*pP2pIeOffset)++;
90 pExtraIe++;
91 }while(--extraIeLen > 0);
92
93 return status;
94}
Jeff Johnson295189b2012-06-20 16:38:30 -070095
96tSirRetStatus schAppendAddnIE(tpAniSirGlobal pMac, tpPESession psessionEntry,
97 tANI_U8 *pFrame, tANI_U32 maxBeaconSize,
98 tANI_U32 *nBytes)
99{
100 tSirRetStatus status = eSIR_FAILURE;
101 tANI_U32 present, len;
102 tANI_U8 addIE[WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN];
103
104 if((status = wlan_cfgGetInt(pMac, WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG,
105 &present)) != eSIR_SUCCESS)
106 {
Katya Nigam70d68332013-09-16 16:49:45 +0530107 schLog(pMac, LOGP, FL("Unable to get WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700108 return status;
109 }
110
111 if(present)
112 {
113 if((status = wlan_cfgGetStrLen(pMac, WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA,
114 &len)) != eSIR_SUCCESS)
115 {
Katya Nigam70d68332013-09-16 16:49:45 +0530116 schLog(pMac, LOGP,
Jeff Johnson295189b2012-06-20 16:38:30 -0700117 FL("Unable to get WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA length"));
118 return status;
119 }
120
121 if(len <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN && len &&
122 ((len + *nBytes) <= maxBeaconSize))
123 {
124 if((status = wlan_cfgGetStr(pMac,
125 WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA, &addIE[0], &len))
126 == eSIR_SUCCESS)
127 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700128 tANI_U8* pP2pIe = limGetP2pIEPtr(pMac, &addIE[0], len);
129 if(pP2pIe != NULL)
130 {
131 tANI_U8 noaLen = 0;
132 tANI_U8 noaStream[SIR_MAX_NOA_ATTR_LEN + SIR_P2P_IE_HEADER_LEN];
133 //get NoA attribute stream P2P IE
134 noaLen = limGetNoaAttrStream(pMac, noaStream, psessionEntry);
135 if(noaLen)
136 {
Abhishek Singhce4b6932014-06-30 15:10:08 +0530137 if ( (noaLen + len) <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN )
Jeff Johnson295189b2012-06-20 16:38:30 -0700138 {
139 vos_mem_copy(&addIE[len], noaStream, noaLen);
140 len += noaLen;
141 /* Update IE Len */
142 pP2pIe[1] += noaLen;
Kaushik, Sushanta5ee77a2014-07-30 19:35:25 +0530143 schLog(pMac, LOG1,
144 FL("NoA length is %d"),noaLen);
Jeff Johnson295189b2012-06-20 16:38:30 -0700145 }
146 else
147 {
Katya Nigam70d68332013-09-16 16:49:45 +0530148 schLog(pMac, LOGE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700149 FL("Not able to insert NoA because of length constraint"));
150 }
151 }
152 }
Rashmi Ramanna3ec0dee2014-06-27 21:21:41 +0530153 vos_mem_copy(pFrame, &addIE[0], len);
154 *nBytes = *nBytes + len;
Kaushik, Sushanta5ee77a2014-07-30 19:35:25 +0530155 schLog(pMac, LOG1,
156 FL("Total beacon size is %d"), *nBytes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700157 }
158 }
159 }
160
161 return status;
162}
163
164// --------------------------------------------------------------------
165/**
166 * schSetFixedBeaconFields
167 *
168 * FUNCTION:
169 *
170 * LOGIC:
171 *
172 * ASSUMPTIONS:
173 *
174 * NOTE:
175 *
176 * @param None
177 * @return None
178 */
179
180tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEntry)
181{
182 tpAniBeaconStruct pBeacon = (tpAniBeaconStruct)
183 pMac->sch.schObject.gSchBeaconFrameBegin;
184 tpSirMacMgmtHdr mac;
185 tANI_U16 offset;
186 tANI_U8 *ptr;
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700187 tDot11fBeacon1 *pBcn1;
188 tDot11fBeacon2 *pBcn2;
Jeff Johnson295189b2012-06-20 16:38:30 -0700189 tANI_U32 i, nStatus, nBytes;
190 tANI_U32 wpsApEnable=0, tmp;
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700191 tDot11fIEWscProbeRes *pWscProbeRes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700192 tANI_U8 *pExtraIe = NULL;
193 tANI_U32 extraIeLen =0;
194 tANI_U16 extraIeOffset = 0;
195 tANI_U16 p2pIeOffset = 0;
196 tSirRetStatus status = eSIR_SUCCESS;
Jeff Johnson295189b2012-06-20 16:38:30 -0700197
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530198 pBcn1 = vos_mem_malloc(sizeof(tDot11fBeacon1));
199 if ( NULL == pBcn1 )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700200 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700201 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700202 return eSIR_FAILURE;
203 }
204
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530205 pBcn2 = vos_mem_malloc(sizeof(tDot11fBeacon2));
206 if ( NULL == pBcn2 )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700207 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700208 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530209 vos_mem_free(pBcn1);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700210 return eSIR_FAILURE;
211 }
212
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530213 pWscProbeRes = vos_mem_malloc(sizeof(tDot11fIEWscProbeRes));
214 if ( NULL == pWscProbeRes )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700215 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700216 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530217 vos_mem_free(pBcn1);
218 vos_mem_free(pBcn2);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700219 return eSIR_FAILURE;
220 }
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700221
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700222 PELOG1(schLog(pMac, LOG1, FL("Setting fixed beacon fields"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700223
224 /*
225 * First set the fixed fields
226 */
227
228 // set the TFP headers
229
230 // set the mac header
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530231 vos_mem_set(( tANI_U8*) &pBeacon->macHdr, sizeof( tSirMacMgmtHdr ),0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700232 mac = (tpSirMacMgmtHdr) &pBeacon->macHdr;
233 mac->fc.type = SIR_MAC_MGMT_FRAME;
234 mac->fc.subType = SIR_MAC_MGMT_BEACON;
235
236 for (i=0; i<6; i++)
237 mac->da[i] = 0xff;
238
239 /* Knocking out Global pMac update */
240 /* limGetMyMacAddr(pMac, mac->sa); */
241 /* limGetBssid(pMac, mac->bssId); */
242
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530243 vos_mem_copy(mac->sa, psessionEntry->selfMacAddr, sizeof(psessionEntry->selfMacAddr));
244 vos_mem_copy(mac->bssId, psessionEntry->bssId, sizeof (psessionEntry->bssId));
Jeff Johnson295189b2012-06-20 16:38:30 -0700245
246 mac->fc.fromDS = 0;
247 mac->fc.toDS = 0;
248
249 /*
250 * Now set the beacon body
251 */
252
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530253 vos_mem_set(( tANI_U8*) pBcn1, sizeof( tDot11fBeacon1 ), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700254
255 // Skip over the timestamp (it'll be updated later).
256
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700257 pBcn1->BeaconInterval.interval = pMac->sch.schObject.gSchBeaconInterval;
258 PopulateDot11fCapabilities( pMac, &pBcn1->Capabilities, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700259 if (psessionEntry->ssidHidden)
260 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700261 pBcn1->SSID.present = 1; //rest of the fileds are 0 for hidden ssid
Jeff Johnson295189b2012-06-20 16:38:30 -0700262 }
263 else
264 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700265 PopulateDot11fSSID( pMac, &psessionEntry->ssId, &pBcn1->SSID );
Jeff Johnson295189b2012-06-20 16:38:30 -0700266 }
267
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700268
269 PopulateDot11fSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL, &pBcn1->SuppRates,psessionEntry);
270 PopulateDot11fDSParams( pMac, &pBcn1->DSParams, psessionEntry->currentOperChannel, psessionEntry);
271 PopulateDot11fIBSSParams( pMac, &pBcn1->IBSSParams,psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700272
273 offset = sizeof( tAniBeaconStruct );
274 ptr = pMac->sch.schObject.gSchBeaconFrameBegin + offset;
275
Jeff Johnson295189b2012-06-20 16:38:30 -0700276 if((psessionEntry->limSystemRole == eLIM_AP_ROLE)
277 && (psessionEntry->proxyProbeRspEn))
278 {
279 /* Initialize the default IE bitmap to zero */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530280 vos_mem_set(( tANI_U8* )&(psessionEntry->DefProbeRspIeBitmap), (sizeof( tANI_U32 ) * 8), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700281
282 /* Initialize the default IE bitmap to zero */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530283 vos_mem_set(( tANI_U8* )&(psessionEntry->probeRespFrame),
284 sizeof(psessionEntry->probeRespFrame), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700285
286 /* Can be efficiently updated whenever new IE added in Probe response in future */
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700287 limUpdateProbeRspTemplateIeBitmapBeacon1(pMac,pBcn1,&psessionEntry->DefProbeRspIeBitmap[0],
Jeff Johnson295189b2012-06-20 16:38:30 -0700288 &psessionEntry->probeRespFrame);
289 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700290
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700291 nStatus = dot11fPackBeacon1( pMac, pBcn1, ptr,
Jeff Johnson295189b2012-06-20 16:38:30 -0700292 SCH_MAX_BEACON_SIZE - offset,
293 &nBytes );
294 if ( DOT11F_FAILED( nStatus ) )
295 {
296 schLog( pMac, LOGE, FL("Failed to packed a tDot11fBeacon1 (0x%0"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700297 "8x.)."), nStatus );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530298 vos_mem_free(pBcn1);
299 vos_mem_free(pBcn2);
300 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700301 return eSIR_FAILURE;
302 }
303 else if ( DOT11F_WARNED( nStatus ) )
304 {
305 schLog( pMac, LOGE, FL("There were warnings while packing a tDo"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700306 "t11fBeacon1 (0x%08x.)."), nStatus );
Jeff Johnson295189b2012-06-20 16:38:30 -0700307 }
308 /*changed to correct beacon corruption */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530309 vos_mem_set(( tANI_U8*) pBcn2, sizeof( tDot11fBeacon2 ), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700310 pMac->sch.schObject.gSchBeaconOffsetBegin = offset + ( tANI_U16 )nBytes;
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700311 schLog( pMac, LOG1, FL("Initialized beacon begin, offset %d"), offset );
Jeff Johnson295189b2012-06-20 16:38:30 -0700312
313 /*
314 * Initialize the 'new' fields at the end of the beacon
315 */
316
317
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700318 PopulateDot11fCountry( pMac, &pBcn2->Country, psessionEntry);
319 if(pBcn1->Capabilities.qos)
Jeff Johnson295189b2012-06-20 16:38:30 -0700320 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700321 PopulateDot11fEDCAParamSet( pMac, &pBcn2->EDCAParamSet, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700322 }
323
Jeff Johnsone7245742012-09-05 17:12:55 -0700324 if(psessionEntry->lim11hEnable)
Jeff Johnson295189b2012-06-20 16:38:30 -0700325 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700326 PopulateDot11fPowerConstraints( pMac, &pBcn2->PowerConstraints );
327 PopulateDot11fTPCReport( pMac, &pBcn2->TPCReport, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700328 }
329
Jeff Johnson295189b2012-06-20 16:38:30 -0700330
331 if (psessionEntry->dot11mode != WNI_CFG_DOT11_MODE_11B)
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700332 PopulateDot11fERPInfo( pMac, &pBcn2->ERPInfo, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700333
Jeff Johnsone7245742012-09-05 17:12:55 -0700334 if(psessionEntry->htCapability)
Jeff Johnson295189b2012-06-20 16:38:30 -0700335 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700336 PopulateDot11fHTCaps( pMac,psessionEntry, &pBcn2->HTCaps );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700337 PopulateDot11fHTInfo( pMac, &pBcn2->HTInfo, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700338 }
Jeff Johnsone7245742012-09-05 17:12:55 -0700339#ifdef WLAN_FEATURE_11AC
340 if(psessionEntry->vhtCapability)
341 {
Katya Nigam70d68332013-09-16 16:49:45 +0530342 schLog( pMac, LOGW, FL("Populate VHT IEs in Beacon"));
Abhishek Singh6d5d29c2014-07-03 14:25:22 +0530343 PopulateDot11fVHTCaps( pMac, &pBcn2->VHTCaps, eSIR_TRUE );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700344 PopulateDot11fVHTOperation( pMac, &pBcn2->VHTOperation);
Jeff Johnsone7245742012-09-05 17:12:55 -0700345 // we do not support multi users yet
346 //PopulateDot11fVHTExtBssLoad( pMac, &bcn2.VHTExtBssLoad);
Sandeep Puligilla60342762014-01-30 21:05:37 +0530347 PopulateDot11fExtCap( pMac, &pBcn2->ExtCap, psessionEntry);
Mohit Khanna4a70d262012-09-11 16:30:12 -0700348 if(psessionEntry->gLimOperatingMode.present)
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700349 PopulateDot11fOperatingMode( pMac, &pBcn2->OperatingMode, psessionEntry );
Jeff Johnsone7245742012-09-05 17:12:55 -0700350 }
351#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700352
353 PopulateDot11fExtSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL,
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700354 &pBcn2->ExtSuppRates, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700355
356 if( psessionEntry->pLimStartBssReq != NULL )
357 {
358 PopulateDot11fWPA( pMac, &psessionEntry->pLimStartBssReq->rsnIE,
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700359 &pBcn2->WPA );
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700360 PopulateDot11fRSNOpaque( pMac, &psessionEntry->pLimStartBssReq->rsnIE,
361 &pBcn2->RSNOpaque );
Jeff Johnson295189b2012-06-20 16:38:30 -0700362 }
363
364 if(psessionEntry->limWmeEnabled)
365 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700366 PopulateDot11fWMM( pMac, &pBcn2->WMMInfoAp, &pBcn2->WMMParams, &pBcn2->WMMCaps, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700367 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700368 if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
369 {
370 if(psessionEntry->wps_state != SAP_WPS_DISABLED)
371 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700372 PopulateDot11fBeaconWPSIEs( pMac, &pBcn2->WscBeacon, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700373 }
374 }
375 else
376 {
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800377 if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
Katya Nigam70d68332013-09-16 16:49:45 +0530378 schLog(pMac, LOGP,"Failed to cfg get id %d", WNI_CFG_WPS_ENABLE );
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800379
380 wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
381
382 if (wpsApEnable)
383 {
384 PopulateDot11fWsc(pMac, &pBcn2->WscBeacon);
385 }
386
387 if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
388 {
389 PopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
390 pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
391 }
392
393 if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
394 {
395 DePopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
396 pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
397 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700398 }
399
Jeff Johnson295189b2012-06-20 16:38:30 -0700400 if((psessionEntry->limSystemRole == eLIM_AP_ROLE)
401 && (psessionEntry->proxyProbeRspEn))
402 {
403 /* Can be efficiently updated whenever new IE added in Probe response in future */
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700404 limUpdateProbeRspTemplateIeBitmapBeacon2(pMac,pBcn2,&psessionEntry->DefProbeRspIeBitmap[0],
Jeff Johnson295189b2012-06-20 16:38:30 -0700405 &psessionEntry->probeRespFrame);
406
407 /* update probe response WPS IE instead of beacon WPS IE
408 * */
409 if(psessionEntry->wps_state != SAP_WPS_DISABLED)
410 {
411 if(psessionEntry->APWPSIEs.SirWPSProbeRspIE.FieldPresent)
412 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700413 PopulateDot11fProbeResWPSIEs(pMac, pWscProbeRes, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700414 }
415 else
416 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700417 pWscProbeRes->present = 0;
Jeff Johnson295189b2012-06-20 16:38:30 -0700418 }
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700419 if(pWscProbeRes->present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700420 {
421 SetProbeRspIeBitmap(&psessionEntry->DefProbeRspIeBitmap[0],SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530422 vos_mem_copy((void *)&psessionEntry->probeRespFrame.WscProbeRes,
423 (void *)pWscProbeRes,
424 sizeof(tDot11fIEWscProbeRes));
Jeff Johnson295189b2012-06-20 16:38:30 -0700425 }
426 }
427
428 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700429
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700430 nStatus = dot11fPackBeacon2( pMac, pBcn2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700431 pMac->sch.schObject.gSchBeaconFrameEnd,
432 SCH_MAX_BEACON_SIZE, &nBytes );
433 if ( DOT11F_FAILED( nStatus ) )
434 {
435 schLog( pMac, LOGE, FL("Failed to packed a tDot11fBeacon2 (0x%0"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700436 "8x.)."), nStatus );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530437 vos_mem_free(pBcn1);
438 vos_mem_free(pBcn2);
439 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700440 return eSIR_FAILURE;
441 }
442 else if ( DOT11F_WARNED( nStatus ) )
443 {
444 schLog( pMac, LOGE, FL("There were warnings while packing a tDo"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700445 "t11fBeacon2 (0x%08x.)."), nStatus );
Jeff Johnson295189b2012-06-20 16:38:30 -0700446 }
447
Jeff Johnson295189b2012-06-20 16:38:30 -0700448 pExtraIe = pMac->sch.schObject.gSchBeaconFrameEnd + nBytes;
449 extraIeOffset = nBytes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700450
451 //TODO: Append additional IE here.
452 schAppendAddnIE(pMac, psessionEntry,
453 pMac->sch.schObject.gSchBeaconFrameEnd + nBytes,
454 SCH_MAX_BEACON_SIZE, &nBytes);
455
456 pMac->sch.schObject.gSchBeaconOffsetEnd = ( tANI_U16 )nBytes;
457
Jeff Johnson295189b2012-06-20 16:38:30 -0700458 extraIeLen = nBytes - extraIeOffset;
459
460 //Get the p2p Ie Offset
461 status = schGetP2pIeOffset(pExtraIe, extraIeLen, &p2pIeOffset);
462
463 if(eSIR_SUCCESS == status)
464 {
465 //Update the P2P Ie Offset
466 pMac->sch.schObject.p2pIeOffset =
467 pMac->sch.schObject.gSchBeaconOffsetBegin + TIM_IE_SIZE +
468 extraIeOffset + p2pIeOffset;
469 }
470 else
471 {
472 pMac->sch.schObject.p2pIeOffset = 0;
473 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700474
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700475 schLog( pMac, LOG1, FL("Initialized beacon end, offset %d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700476 pMac->sch.schObject.gSchBeaconOffsetEnd );
477
478 pMac->sch.schObject.fBeaconChanged = 1;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530479 vos_mem_free(pBcn1);
480 vos_mem_free(pBcn2);
481 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700482 return eSIR_SUCCESS;
483}
484
Jeff Johnson295189b2012-06-20 16:38:30 -0700485void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
486 tDot11fBeacon1* beacon1,
487 tANI_U32* DefProbeRspIeBitmap,
488 tDot11fProbeResponse* prb_rsp)
489{
490 prb_rsp->BeaconInterval = beacon1->BeaconInterval;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530491 vos_mem_copy((void *)&prb_rsp->Capabilities, (void *)&beacon1->Capabilities,
492 sizeof(beacon1->Capabilities));
Jeff Johnson295189b2012-06-20 16:38:30 -0700493
494 /* SSID */
495 if(beacon1->SSID.present)
496 {
497 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_SSID_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530498 /* populating it, because probe response has to go with SSID even in hidden case */
Jeff Johnson295189b2012-06-20 16:38:30 -0700499 PopulateDot11fSSID2( pMac, &prb_rsp->SSID );
500 }
501 /* supported rates */
502 if(beacon1->SuppRates.present)
503 {
504 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_RATESET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530505 vos_mem_copy((void *)&prb_rsp->SuppRates, (void *)&beacon1->SuppRates,
506 sizeof(beacon1->SuppRates));
Jeff Johnson295189b2012-06-20 16:38:30 -0700507
508 }
509 /* DS Parameter set */
510 if(beacon1->DSParams.present)
511 {
512 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_DS_PARAM_SET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530513 vos_mem_copy((void *)&prb_rsp->DSParams, (void *)&beacon1->DSParams,
514 sizeof(beacon1->DSParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700515
516 }
517
518 /* IBSS params will not be present in the Beacons transmitted by AP */
519}
520
521void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac,
522 tDot11fBeacon2* beacon2,
523 tANI_U32* DefProbeRspIeBitmap,
524 tDot11fProbeResponse* prb_rsp)
525{
526 /* IBSS parameter set - will not be present in probe response tx by AP */
527 /* country */
528 if(beacon2->Country.present)
529 {
530 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_COUNTRY_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530531 vos_mem_copy((void *)&prb_rsp->Country, (void *)&beacon2->Country,
532 sizeof(beacon2->Country));
Jeff Johnson295189b2012-06-20 16:38:30 -0700533
534 }
535 /* Power constraint */
536 if(beacon2->PowerConstraints.present)
537 {
538 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_PWR_CONSTRAINT_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530539 vos_mem_copy((void *)&prb_rsp->PowerConstraints, (void *)&beacon2->PowerConstraints,
540 sizeof(beacon2->PowerConstraints));
Jeff Johnson295189b2012-06-20 16:38:30 -0700541
542 }
543 /* Channel Switch Annoouncement SIR_MAC_CHNL_SWITCH_ANN_EID */
544 if(beacon2->ChanSwitchAnn.present)
545 {
546 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_CHNL_SWITCH_ANN_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530547 vos_mem_copy((void *)&prb_rsp->ChanSwitchAnn, (void *)&beacon2->ChanSwitchAnn,
548 sizeof(beacon2->ChanSwitchAnn));
Jeff Johnson295189b2012-06-20 16:38:30 -0700549
550 }
551 /* ERP information */
552 if(beacon2->ERPInfo.present)
553 {
554 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_ERP_INFO_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530555 vos_mem_copy((void *)&prb_rsp->ERPInfo, (void *)&beacon2->ERPInfo,
556 sizeof(beacon2->ERPInfo));
Jeff Johnson295189b2012-06-20 16:38:30 -0700557
558 }
559 /* Extended supported rates */
560 if(beacon2->ExtSuppRates.present)
561 {
562 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_EXTENDED_RATE_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530563 vos_mem_copy((void *)&prb_rsp->ExtSuppRates, (void *)&beacon2->ExtSuppRates,
564 sizeof(beacon2->ExtSuppRates));
Jeff Johnson295189b2012-06-20 16:38:30 -0700565
566 }
567
568 /* WPA */
569 if(beacon2->WPA.present)
570 {
571 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530572 vos_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA,
573 sizeof(beacon2->WPA));
Jeff Johnson295189b2012-06-20 16:38:30 -0700574
575 }
576
577 /* RSN */
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700578 if(beacon2->RSNOpaque.present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700579 {
580 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_RSN_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530581 vos_mem_copy((void *)&prb_rsp->RSNOpaque, (void *)&beacon2->RSNOpaque,
582 sizeof(beacon2->RSNOpaque));
Jeff Johnson295189b2012-06-20 16:38:30 -0700583 }
584/*
585 // BSS load
586 if(beacon2->QBSSLoad.present)
587 {
588 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_QBSS_LOAD_EID);
589 }
590*/
591 /* EDCA Parameter set */
592 if(beacon2->EDCAParamSet.present)
593 {
594 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_EDCA_PARAM_SET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530595 vos_mem_copy((void *)&prb_rsp->EDCAParamSet, (void *)&beacon2->EDCAParamSet,
596 sizeof(beacon2->EDCAParamSet));
Jeff Johnson295189b2012-06-20 16:38:30 -0700597
598 }
599 /* Vendor specific - currently no vendor specific IEs added */
600 /* Requested IEs - currently we are not processing this will be added later */
601 //HT capability IE
602 if(beacon2->HTCaps.present)
603 {
604 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_HT_CAPABILITIES_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530605 vos_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps,
606 sizeof(beacon2->HTCaps));
Jeff Johnson295189b2012-06-20 16:38:30 -0700607 }
608 // HT Info IE
609 if(beacon2->HTInfo.present)
610 {
611 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_HT_INFO_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530612 vos_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo,
613 sizeof(beacon2->HTInfo));
Jeff Johnson295189b2012-06-20 16:38:30 -0700614 }
615
Jeff Johnsone7245742012-09-05 17:12:55 -0700616#ifdef WLAN_FEATURE_11AC
617 if(beacon2->VHTCaps.present)
618 {
619 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_CAPABILITIES_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530620 vos_mem_copy((void *)&prb_rsp->VHTCaps, (void *)&beacon2->VHTCaps,
621 sizeof(beacon2->VHTCaps));
Jeff Johnsone7245742012-09-05 17:12:55 -0700622 }
623 if(beacon2->VHTOperation.present)
624 {
625 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_OPERATION_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530626 vos_mem_copy((void *)&prb_rsp->VHTOperation, (void *)&beacon2->VHTOperation,
627 sizeof(beacon2->VHTOperation));
Jeff Johnsone7245742012-09-05 17:12:55 -0700628 }
629 if(beacon2->VHTExtBssLoad.present)
630 {
631 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_EXT_BSS_LOAD_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530632 vos_mem_copy((void *)&prb_rsp->VHTExtBssLoad, (void *)&beacon2->VHTExtBssLoad,
633 sizeof(beacon2->VHTExtBssLoad));
Jeff Johnsone7245742012-09-05 17:12:55 -0700634 }
635#endif
636
Jeff Johnson295189b2012-06-20 16:38:30 -0700637 //WMM IE
638 if(beacon2->WMMParams.present)
639 {
640 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530641 vos_mem_copy((void *)&prb_rsp->WMMParams, (void *)&beacon2->WMMParams,
642 sizeof(beacon2->WMMParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700643 }
644 //WMM capability - most of the case won't be present
645 if(beacon2->WMMCaps.present)
646 {
647 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530648 vos_mem_copy((void *)&prb_rsp->WMMCaps, (void *)&beacon2->WMMCaps,
649 sizeof(beacon2->WMMCaps));
Jeff Johnson295189b2012-06-20 16:38:30 -0700650 }
651
652}
653
654void SetProbeRspIeBitmap(tANI_U32* IeBitmap,tANI_U32 pos)
655{
656 tANI_U32 index,temp;
657
658 index = pos >> 5;
659 if(index >= 8 )
660 {
661 return;
662 }
663 temp = IeBitmap[index];
664
665 temp |= 1 << (pos & 0x1F);
666
667 IeBitmap[index] = temp;
668}
669
Jeff Johnson295189b2012-06-20 16:38:30 -0700670
Jeff Johnson295189b2012-06-20 16:38:30 -0700671
672// --------------------------------------------------------------------
673/**
674 * writeBeaconToMemory
675 *
676 * FUNCTION:
677 *
678 * LOGIC:
679 *
680 * ASSUMPTIONS:
681 *
682 * NOTE:
683 *
684 * @param None
685 * @param size Size of the beacon to write to memory
686 * @param length Length field of the beacon to write to memory
687 * @return None
688 */
689
690void writeBeaconToMemory(tpAniSirGlobal pMac, tANI_U16 size, tANI_U16 length, tpPESession psessionEntry)
691{
692 tANI_U16 i;
693 tpAniBeaconStruct pBeacon;
694
695 // copy end of beacon only if length > 0
696 if (length > 0)
697 {
698 for (i=0; i < pMac->sch.schObject.gSchBeaconOffsetEnd; i++)
699 pMac->sch.schObject.gSchBeaconFrameBegin[size++] = pMac->sch.schObject.gSchBeaconFrameEnd[i];
700 }
701
702 // Update the beacon length
703 pBeacon = (tpAniBeaconStruct) pMac->sch.schObject.gSchBeaconFrameBegin;
704 // Do not include the beaconLength indicator itself
705 if (length == 0)
706 {
707 pBeacon->beaconLength = 0;
708 // Dont copy entire beacon, Copy length field alone
709 size = 4;
710 }
711 else
712 pBeacon->beaconLength = (tANI_U32) size - sizeof( tANI_U32 );
713
714 // write size bytes from gSchBeaconFrameBegin
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700715 PELOG2(schLog(pMac, LOG2, FL("Beacon size - %d bytes"), size);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700716 PELOG2(sirDumpBuf(pMac, SIR_SCH_MODULE_ID, LOG2, pMac->sch.schObject.gSchBeaconFrameBegin, size);)
717
718 if (! pMac->sch.schObject.fBeaconChanged)
719 return;
720
721 pMac->sch.gSchGenBeacon = 1;
722 if (pMac->sch.gSchGenBeacon)
723 {
724 pMac->sch.gSchBeaconsSent++;
725
726 //
727 // Copy beacon data to SoftMAC shared memory...
728 // Do this by sending a message to HAL
729 //
730
731 size = (size + 3) & (~3);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530732 if( eSIR_SUCCESS != schSendBeaconReq( pMac, pMac->sch.schObject.gSchBeaconFrameBegin,
733 size, psessionEntry))
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700734 PELOGE(schLog(pMac, LOGE, FL("schSendBeaconReq() returned an error (zsize %d)"), size);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700735 else
736 {
737 pMac->sch.gSchBeaconsWritten++;
738 }
739 }
740 pMac->sch.schObject.fBeaconChanged = 0;
741}
742
743// --------------------------------------------------------------------
744/**
745 * @function: SchProcessPreBeaconInd
746 *
747 * @brief : Process the PreBeacon Indication from the Lim
748 *
749 * ASSUMPTIONS:
750 *
751 * NOTE:
752 *
753 * @param : pMac - tpAniSirGlobal
754 *
755 * @return None
756 */
757
758void
759schProcessPreBeaconInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
760{
761 tpBeaconGenParams pMsg = (tpBeaconGenParams)limMsg->bodyptr;
762 tANI_U32 beaconSize = pMac->sch.schObject.gSchBeaconOffsetBegin;
763 tpPESession psessionEntry;
764 tANI_U8 sessionId;
765
766 if((psessionEntry = peFindSessionByBssid(pMac,pMsg->bssId, &sessionId))== NULL)
767 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700768 PELOGE(schLog(pMac, LOGE, FL("session lookup fails"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700769 goto end;
770 }
771
772
773
774 // If SME is not in normal mode, no need to generate beacon
775 if (psessionEntry->limSmeState != eLIM_SME_NORMAL_STATE)
776 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700777 PELOGE(schLog(pMac, LOG1, FL("PreBeaconInd received in invalid state: %d"), psessionEntry->limSmeState);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700778 goto end;
779 }
780
781 switch(psessionEntry->limSystemRole){
782
783 case eLIM_STA_IN_IBSS_ROLE:
784 case eLIM_BT_AMP_AP_ROLE:
785 case eLIM_BT_AMP_STA_ROLE:
786 // generate IBSS parameter set
787 if(psessionEntry->statypeForBss == STA_ENTRY_SELF)
788 writeBeaconToMemory(pMac, (tANI_U16) beaconSize, (tANI_U16)beaconSize, psessionEntry);
789 else
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700790 PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700791 break;
792
Jeff Johnson295189b2012-06-20 16:38:30 -0700793 case eLIM_AP_ROLE:{
794 tANI_U8 *ptr = &pMac->sch.schObject.gSchBeaconFrameBegin[pMac->sch.schObject.gSchBeaconOffsetBegin];
795 tANI_U16 timLength = 0;
796 if(psessionEntry->statypeForBss == STA_ENTRY_SELF){
797 pmmGenerateTIM(pMac, &ptr, &timLength, psessionEntry->dtimPeriod);
798 beaconSize += 2 + timLength;
799 writeBeaconToMemory(pMac, (tANI_U16) beaconSize, (tANI_U16)beaconSize, psessionEntry);
800 }
801 else
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700802 PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700803 }
804 break;
Jeff Johnson295189b2012-06-20 16:38:30 -0700805
Jeff Johnson295189b2012-06-20 16:38:30 -0700806
807 default:
808 PELOGE(schLog(pMac, LOGE, FL("Error-PE has Receive PreBeconGenIndication when System is in %d role"),
809 psessionEntry->limSystemRole);)
810 }
811
812end:
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530813 vos_mem_free(pMsg);
Jeff Johnson295189b2012-06-20 16:38:30 -0700814
815}