blob: 36fd65260de65d9a42a9624773d057cf50c7bc5e [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;
143 }
144 else
145 {
Katya Nigam70d68332013-09-16 16:49:45 +0530146 schLog(pMac, LOGE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700147 FL("Not able to insert NoA because of length constraint"));
148 }
149 }
150 }
Rashmi Ramanna3ec0dee2014-06-27 21:21:41 +0530151 vos_mem_copy(pFrame, &addIE[0], len);
152 *nBytes = *nBytes + len;
Jeff Johnson295189b2012-06-20 16:38:30 -0700153 }
154 }
155 }
156
157 return status;
158}
159
160// --------------------------------------------------------------------
161/**
162 * schSetFixedBeaconFields
163 *
164 * FUNCTION:
165 *
166 * LOGIC:
167 *
168 * ASSUMPTIONS:
169 *
170 * NOTE:
171 *
172 * @param None
173 * @return None
174 */
175
176tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEntry)
177{
178 tpAniBeaconStruct pBeacon = (tpAniBeaconStruct)
179 pMac->sch.schObject.gSchBeaconFrameBegin;
180 tpSirMacMgmtHdr mac;
181 tANI_U16 offset;
182 tANI_U8 *ptr;
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700183 tDot11fBeacon1 *pBcn1;
184 tDot11fBeacon2 *pBcn2;
Jeff Johnson295189b2012-06-20 16:38:30 -0700185 tANI_U32 i, nStatus, nBytes;
186 tANI_U32 wpsApEnable=0, tmp;
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700187 tDot11fIEWscProbeRes *pWscProbeRes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700188 tANI_U8 *pExtraIe = NULL;
189 tANI_U32 extraIeLen =0;
190 tANI_U16 extraIeOffset = 0;
191 tANI_U16 p2pIeOffset = 0;
192 tSirRetStatus status = eSIR_SUCCESS;
Jeff Johnson295189b2012-06-20 16:38:30 -0700193
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530194 pBcn1 = vos_mem_malloc(sizeof(tDot11fBeacon1));
195 if ( NULL == pBcn1 )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700196 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700197 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700198 return eSIR_FAILURE;
199 }
200
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530201 pBcn2 = vos_mem_malloc(sizeof(tDot11fBeacon2));
202 if ( NULL == pBcn2 )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700203 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700204 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530205 vos_mem_free(pBcn1);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700206 return eSIR_FAILURE;
207 }
208
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530209 pWscProbeRes = vos_mem_malloc(sizeof(tDot11fIEWscProbeRes));
210 if ( NULL == pWscProbeRes )
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700211 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700212 schLog(pMac, LOGE, FL("Failed to allocate memory") );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530213 vos_mem_free(pBcn1);
214 vos_mem_free(pBcn2);
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700215 return eSIR_FAILURE;
216 }
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700217
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700218 PELOG1(schLog(pMac, LOG1, FL("Setting fixed beacon fields"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700219
220 /*
221 * First set the fixed fields
222 */
223
224 // set the TFP headers
225
226 // set the mac header
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530227 vos_mem_set(( tANI_U8*) &pBeacon->macHdr, sizeof( tSirMacMgmtHdr ),0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700228 mac = (tpSirMacMgmtHdr) &pBeacon->macHdr;
229 mac->fc.type = SIR_MAC_MGMT_FRAME;
230 mac->fc.subType = SIR_MAC_MGMT_BEACON;
231
232 for (i=0; i<6; i++)
233 mac->da[i] = 0xff;
234
235 /* Knocking out Global pMac update */
236 /* limGetMyMacAddr(pMac, mac->sa); */
237 /* limGetBssid(pMac, mac->bssId); */
238
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530239 vos_mem_copy(mac->sa, psessionEntry->selfMacAddr, sizeof(psessionEntry->selfMacAddr));
240 vos_mem_copy(mac->bssId, psessionEntry->bssId, sizeof (psessionEntry->bssId));
Jeff Johnson295189b2012-06-20 16:38:30 -0700241
242 mac->fc.fromDS = 0;
243 mac->fc.toDS = 0;
244
245 /*
246 * Now set the beacon body
247 */
248
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530249 vos_mem_set(( tANI_U8*) pBcn1, sizeof( tDot11fBeacon1 ), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700250
251 // Skip over the timestamp (it'll be updated later).
252
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700253 pBcn1->BeaconInterval.interval = pMac->sch.schObject.gSchBeaconInterval;
254 PopulateDot11fCapabilities( pMac, &pBcn1->Capabilities, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700255 if (psessionEntry->ssidHidden)
256 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700257 pBcn1->SSID.present = 1; //rest of the fileds are 0 for hidden ssid
Jeff Johnson295189b2012-06-20 16:38:30 -0700258 }
259 else
260 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700261 PopulateDot11fSSID( pMac, &psessionEntry->ssId, &pBcn1->SSID );
Jeff Johnson295189b2012-06-20 16:38:30 -0700262 }
263
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700264
265 PopulateDot11fSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL, &pBcn1->SuppRates,psessionEntry);
266 PopulateDot11fDSParams( pMac, &pBcn1->DSParams, psessionEntry->currentOperChannel, psessionEntry);
267 PopulateDot11fIBSSParams( pMac, &pBcn1->IBSSParams,psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700268
269 offset = sizeof( tAniBeaconStruct );
270 ptr = pMac->sch.schObject.gSchBeaconFrameBegin + offset;
271
Jeff Johnson295189b2012-06-20 16:38:30 -0700272 if((psessionEntry->limSystemRole == eLIM_AP_ROLE)
273 && (psessionEntry->proxyProbeRspEn))
274 {
275 /* Initialize the default IE bitmap to zero */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530276 vos_mem_set(( tANI_U8* )&(psessionEntry->DefProbeRspIeBitmap), (sizeof( tANI_U32 ) * 8), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700277
278 /* Initialize the default IE bitmap to zero */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530279 vos_mem_set(( tANI_U8* )&(psessionEntry->probeRespFrame),
280 sizeof(psessionEntry->probeRespFrame), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700281
282 /* Can be efficiently updated whenever new IE added in Probe response in future */
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700283 limUpdateProbeRspTemplateIeBitmapBeacon1(pMac,pBcn1,&psessionEntry->DefProbeRspIeBitmap[0],
Jeff Johnson295189b2012-06-20 16:38:30 -0700284 &psessionEntry->probeRespFrame);
285 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700286
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700287 nStatus = dot11fPackBeacon1( pMac, pBcn1, ptr,
Jeff Johnson295189b2012-06-20 16:38:30 -0700288 SCH_MAX_BEACON_SIZE - offset,
289 &nBytes );
290 if ( DOT11F_FAILED( nStatus ) )
291 {
292 schLog( pMac, LOGE, FL("Failed to packed a tDot11fBeacon1 (0x%0"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700293 "8x.)."), nStatus );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530294 vos_mem_free(pBcn1);
295 vos_mem_free(pBcn2);
296 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700297 return eSIR_FAILURE;
298 }
299 else if ( DOT11F_WARNED( nStatus ) )
300 {
301 schLog( pMac, LOGE, FL("There were warnings while packing a tDo"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700302 "t11fBeacon1 (0x%08x.)."), nStatus );
Jeff Johnson295189b2012-06-20 16:38:30 -0700303 }
304 /*changed to correct beacon corruption */
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530305 vos_mem_set(( tANI_U8*) pBcn2, sizeof( tDot11fBeacon2 ), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -0700306 pMac->sch.schObject.gSchBeaconOffsetBegin = offset + ( tANI_U16 )nBytes;
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700307 schLog( pMac, LOG1, FL("Initialized beacon begin, offset %d"), offset );
Jeff Johnson295189b2012-06-20 16:38:30 -0700308
309 /*
310 * Initialize the 'new' fields at the end of the beacon
311 */
312
313
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700314 PopulateDot11fCountry( pMac, &pBcn2->Country, psessionEntry);
315 if(pBcn1->Capabilities.qos)
Jeff Johnson295189b2012-06-20 16:38:30 -0700316 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700317 PopulateDot11fEDCAParamSet( pMac, &pBcn2->EDCAParamSet, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700318 }
319
Jeff Johnsone7245742012-09-05 17:12:55 -0700320 if(psessionEntry->lim11hEnable)
Jeff Johnson295189b2012-06-20 16:38:30 -0700321 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700322 PopulateDot11fPowerConstraints( pMac, &pBcn2->PowerConstraints );
323 PopulateDot11fTPCReport( pMac, &pBcn2->TPCReport, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700324 }
325
Jeff Johnson295189b2012-06-20 16:38:30 -0700326
327 if (psessionEntry->dot11mode != WNI_CFG_DOT11_MODE_11B)
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700328 PopulateDot11fERPInfo( pMac, &pBcn2->ERPInfo, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700329
Jeff Johnsone7245742012-09-05 17:12:55 -0700330 if(psessionEntry->htCapability)
Jeff Johnson295189b2012-06-20 16:38:30 -0700331 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700332 PopulateDot11fHTCaps( pMac,psessionEntry, &pBcn2->HTCaps );
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700333 PopulateDot11fHTInfo( pMac, &pBcn2->HTInfo, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700334 }
Jeff Johnsone7245742012-09-05 17:12:55 -0700335#ifdef WLAN_FEATURE_11AC
336 if(psessionEntry->vhtCapability)
337 {
Katya Nigam70d68332013-09-16 16:49:45 +0530338 schLog( pMac, LOGW, FL("Populate VHT IEs in Beacon"));
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700339 PopulateDot11fVHTCaps( pMac, &pBcn2->VHTCaps );
340 PopulateDot11fVHTOperation( pMac, &pBcn2->VHTOperation);
Jeff Johnsone7245742012-09-05 17:12:55 -0700341 // we do not support multi users yet
342 //PopulateDot11fVHTExtBssLoad( pMac, &bcn2.VHTExtBssLoad);
Sandeep Puligilla60342762014-01-30 21:05:37 +0530343 PopulateDot11fExtCap( pMac, &pBcn2->ExtCap, psessionEntry);
Mohit Khanna4a70d262012-09-11 16:30:12 -0700344 if(psessionEntry->gLimOperatingMode.present)
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700345 PopulateDot11fOperatingMode( pMac, &pBcn2->OperatingMode, psessionEntry );
Jeff Johnsone7245742012-09-05 17:12:55 -0700346 }
347#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700348
349 PopulateDot11fExtSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL,
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700350 &pBcn2->ExtSuppRates, psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700351
352 if( psessionEntry->pLimStartBssReq != NULL )
353 {
354 PopulateDot11fWPA( pMac, &psessionEntry->pLimStartBssReq->rsnIE,
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700355 &pBcn2->WPA );
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700356 PopulateDot11fRSNOpaque( pMac, &psessionEntry->pLimStartBssReq->rsnIE,
357 &pBcn2->RSNOpaque );
Jeff Johnson295189b2012-06-20 16:38:30 -0700358 }
359
360 if(psessionEntry->limWmeEnabled)
361 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700362 PopulateDot11fWMM( pMac, &pBcn2->WMMInfoAp, &pBcn2->WMMParams, &pBcn2->WMMCaps, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700363 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700364 if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
365 {
366 if(psessionEntry->wps_state != SAP_WPS_DISABLED)
367 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700368 PopulateDot11fBeaconWPSIEs( pMac, &pBcn2->WscBeacon, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700369 }
370 }
371 else
372 {
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800373 if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
Katya Nigam70d68332013-09-16 16:49:45 +0530374 schLog(pMac, LOGP,"Failed to cfg get id %d", WNI_CFG_WPS_ENABLE );
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800375
376 wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
377
378 if (wpsApEnable)
379 {
380 PopulateDot11fWsc(pMac, &pBcn2->WscBeacon);
381 }
382
383 if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
384 {
385 PopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
386 pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
387 }
388
389 if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
390 {
391 DePopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
392 pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
393 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700394 }
395
Jeff Johnson295189b2012-06-20 16:38:30 -0700396 if((psessionEntry->limSystemRole == eLIM_AP_ROLE)
397 && (psessionEntry->proxyProbeRspEn))
398 {
399 /* Can be efficiently updated whenever new IE added in Probe response in future */
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700400 limUpdateProbeRspTemplateIeBitmapBeacon2(pMac,pBcn2,&psessionEntry->DefProbeRspIeBitmap[0],
Jeff Johnson295189b2012-06-20 16:38:30 -0700401 &psessionEntry->probeRespFrame);
402
403 /* update probe response WPS IE instead of beacon WPS IE
404 * */
405 if(psessionEntry->wps_state != SAP_WPS_DISABLED)
406 {
407 if(psessionEntry->APWPSIEs.SirWPSProbeRspIE.FieldPresent)
408 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700409 PopulateDot11fProbeResWPSIEs(pMac, pWscProbeRes, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700410 }
411 else
412 {
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700413 pWscProbeRes->present = 0;
Jeff Johnson295189b2012-06-20 16:38:30 -0700414 }
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700415 if(pWscProbeRes->present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700416 {
417 SetProbeRspIeBitmap(&psessionEntry->DefProbeRspIeBitmap[0],SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530418 vos_mem_copy((void *)&psessionEntry->probeRespFrame.WscProbeRes,
419 (void *)pWscProbeRes,
420 sizeof(tDot11fIEWscProbeRes));
Jeff Johnson295189b2012-06-20 16:38:30 -0700421 }
422 }
423
424 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700425
Madan Mohan Koyyalamudi19032762012-10-21 12:42:11 -0700426 nStatus = dot11fPackBeacon2( pMac, pBcn2,
Jeff Johnson295189b2012-06-20 16:38:30 -0700427 pMac->sch.schObject.gSchBeaconFrameEnd,
428 SCH_MAX_BEACON_SIZE, &nBytes );
429 if ( DOT11F_FAILED( nStatus ) )
430 {
431 schLog( pMac, LOGE, FL("Failed to packed a tDot11fBeacon2 (0x%0"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700432 "8x.)."), nStatus );
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530433 vos_mem_free(pBcn1);
434 vos_mem_free(pBcn2);
435 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700436 return eSIR_FAILURE;
437 }
438 else if ( DOT11F_WARNED( nStatus ) )
439 {
440 schLog( pMac, LOGE, FL("There were warnings while packing a tDo"
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700441 "t11fBeacon2 (0x%08x.)."), nStatus );
Jeff Johnson295189b2012-06-20 16:38:30 -0700442 }
443
Jeff Johnson295189b2012-06-20 16:38:30 -0700444 pExtraIe = pMac->sch.schObject.gSchBeaconFrameEnd + nBytes;
445 extraIeOffset = nBytes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700446
447 //TODO: Append additional IE here.
448 schAppendAddnIE(pMac, psessionEntry,
449 pMac->sch.schObject.gSchBeaconFrameEnd + nBytes,
450 SCH_MAX_BEACON_SIZE, &nBytes);
451
452 pMac->sch.schObject.gSchBeaconOffsetEnd = ( tANI_U16 )nBytes;
453
Jeff Johnson295189b2012-06-20 16:38:30 -0700454 extraIeLen = nBytes - extraIeOffset;
455
456 //Get the p2p Ie Offset
457 status = schGetP2pIeOffset(pExtraIe, extraIeLen, &p2pIeOffset);
458
459 if(eSIR_SUCCESS == status)
460 {
461 //Update the P2P Ie Offset
462 pMac->sch.schObject.p2pIeOffset =
463 pMac->sch.schObject.gSchBeaconOffsetBegin + TIM_IE_SIZE +
464 extraIeOffset + p2pIeOffset;
465 }
466 else
467 {
468 pMac->sch.schObject.p2pIeOffset = 0;
469 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700470
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700471 schLog( pMac, LOG1, FL("Initialized beacon end, offset %d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700472 pMac->sch.schObject.gSchBeaconOffsetEnd );
473
474 pMac->sch.schObject.fBeaconChanged = 1;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530475 vos_mem_free(pBcn1);
476 vos_mem_free(pBcn2);
477 vos_mem_free(pWscProbeRes);
Jeff Johnson295189b2012-06-20 16:38:30 -0700478 return eSIR_SUCCESS;
479}
480
Jeff Johnson295189b2012-06-20 16:38:30 -0700481void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
482 tDot11fBeacon1* beacon1,
483 tANI_U32* DefProbeRspIeBitmap,
484 tDot11fProbeResponse* prb_rsp)
485{
486 prb_rsp->BeaconInterval = beacon1->BeaconInterval;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530487 vos_mem_copy((void *)&prb_rsp->Capabilities, (void *)&beacon1->Capabilities,
488 sizeof(beacon1->Capabilities));
Jeff Johnson295189b2012-06-20 16:38:30 -0700489
490 /* SSID */
491 if(beacon1->SSID.present)
492 {
493 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_SSID_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530494 /* populating it, because probe response has to go with SSID even in hidden case */
Jeff Johnson295189b2012-06-20 16:38:30 -0700495 PopulateDot11fSSID2( pMac, &prb_rsp->SSID );
496 }
497 /* supported rates */
498 if(beacon1->SuppRates.present)
499 {
500 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_RATESET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530501 vos_mem_copy((void *)&prb_rsp->SuppRates, (void *)&beacon1->SuppRates,
502 sizeof(beacon1->SuppRates));
Jeff Johnson295189b2012-06-20 16:38:30 -0700503
504 }
505 /* DS Parameter set */
506 if(beacon1->DSParams.present)
507 {
508 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_DS_PARAM_SET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530509 vos_mem_copy((void *)&prb_rsp->DSParams, (void *)&beacon1->DSParams,
510 sizeof(beacon1->DSParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700511
512 }
513
514 /* IBSS params will not be present in the Beacons transmitted by AP */
515}
516
517void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac,
518 tDot11fBeacon2* beacon2,
519 tANI_U32* DefProbeRspIeBitmap,
520 tDot11fProbeResponse* prb_rsp)
521{
522 /* IBSS parameter set - will not be present in probe response tx by AP */
523 /* country */
524 if(beacon2->Country.present)
525 {
526 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_COUNTRY_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530527 vos_mem_copy((void *)&prb_rsp->Country, (void *)&beacon2->Country,
528 sizeof(beacon2->Country));
Jeff Johnson295189b2012-06-20 16:38:30 -0700529
530 }
531 /* Power constraint */
532 if(beacon2->PowerConstraints.present)
533 {
534 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_PWR_CONSTRAINT_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530535 vos_mem_copy((void *)&prb_rsp->PowerConstraints, (void *)&beacon2->PowerConstraints,
536 sizeof(beacon2->PowerConstraints));
Jeff Johnson295189b2012-06-20 16:38:30 -0700537
538 }
539 /* Channel Switch Annoouncement SIR_MAC_CHNL_SWITCH_ANN_EID */
540 if(beacon2->ChanSwitchAnn.present)
541 {
542 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_CHNL_SWITCH_ANN_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530543 vos_mem_copy((void *)&prb_rsp->ChanSwitchAnn, (void *)&beacon2->ChanSwitchAnn,
544 sizeof(beacon2->ChanSwitchAnn));
Jeff Johnson295189b2012-06-20 16:38:30 -0700545
546 }
547 /* ERP information */
548 if(beacon2->ERPInfo.present)
549 {
550 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_ERP_INFO_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530551 vos_mem_copy((void *)&prb_rsp->ERPInfo, (void *)&beacon2->ERPInfo,
552 sizeof(beacon2->ERPInfo));
Jeff Johnson295189b2012-06-20 16:38:30 -0700553
554 }
555 /* Extended supported rates */
556 if(beacon2->ExtSuppRates.present)
557 {
558 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_EXTENDED_RATE_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530559 vos_mem_copy((void *)&prb_rsp->ExtSuppRates, (void *)&beacon2->ExtSuppRates,
560 sizeof(beacon2->ExtSuppRates));
Jeff Johnson295189b2012-06-20 16:38:30 -0700561
562 }
563
564 /* WPA */
565 if(beacon2->WPA.present)
566 {
567 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530568 vos_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA,
569 sizeof(beacon2->WPA));
Jeff Johnson295189b2012-06-20 16:38:30 -0700570
571 }
572
573 /* RSN */
Chet Lanctot4b9abd72013-06-27 11:14:56 -0700574 if(beacon2->RSNOpaque.present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700575 {
576 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_RSN_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530577 vos_mem_copy((void *)&prb_rsp->RSNOpaque, (void *)&beacon2->RSNOpaque,
578 sizeof(beacon2->RSNOpaque));
Jeff Johnson295189b2012-06-20 16:38:30 -0700579 }
580/*
581 // BSS load
582 if(beacon2->QBSSLoad.present)
583 {
584 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_QBSS_LOAD_EID);
585 }
586*/
587 /* EDCA Parameter set */
588 if(beacon2->EDCAParamSet.present)
589 {
590 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_EDCA_PARAM_SET_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530591 vos_mem_copy((void *)&prb_rsp->EDCAParamSet, (void *)&beacon2->EDCAParamSet,
592 sizeof(beacon2->EDCAParamSet));
Jeff Johnson295189b2012-06-20 16:38:30 -0700593
594 }
595 /* Vendor specific - currently no vendor specific IEs added */
596 /* Requested IEs - currently we are not processing this will be added later */
597 //HT capability IE
598 if(beacon2->HTCaps.present)
599 {
600 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_HT_CAPABILITIES_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530601 vos_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps,
602 sizeof(beacon2->HTCaps));
Jeff Johnson295189b2012-06-20 16:38:30 -0700603 }
604 // HT Info IE
605 if(beacon2->HTInfo.present)
606 {
607 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_HT_INFO_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530608 vos_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo,
609 sizeof(beacon2->HTInfo));
Jeff Johnson295189b2012-06-20 16:38:30 -0700610 }
611
Jeff Johnsone7245742012-09-05 17:12:55 -0700612#ifdef WLAN_FEATURE_11AC
613 if(beacon2->VHTCaps.present)
614 {
615 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_CAPABILITIES_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530616 vos_mem_copy((void *)&prb_rsp->VHTCaps, (void *)&beacon2->VHTCaps,
617 sizeof(beacon2->VHTCaps));
Jeff Johnsone7245742012-09-05 17:12:55 -0700618 }
619 if(beacon2->VHTOperation.present)
620 {
621 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_OPERATION_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530622 vos_mem_copy((void *)&prb_rsp->VHTOperation, (void *)&beacon2->VHTOperation,
623 sizeof(beacon2->VHTOperation));
Jeff Johnsone7245742012-09-05 17:12:55 -0700624 }
625 if(beacon2->VHTExtBssLoad.present)
626 {
627 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_VHT_EXT_BSS_LOAD_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530628 vos_mem_copy((void *)&prb_rsp->VHTExtBssLoad, (void *)&beacon2->VHTExtBssLoad,
629 sizeof(beacon2->VHTExtBssLoad));
Jeff Johnsone7245742012-09-05 17:12:55 -0700630 }
631#endif
632
Jeff Johnson295189b2012-06-20 16:38:30 -0700633 //WMM IE
634 if(beacon2->WMMParams.present)
635 {
636 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530637 vos_mem_copy((void *)&prb_rsp->WMMParams, (void *)&beacon2->WMMParams,
638 sizeof(beacon2->WMMParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700639 }
640 //WMM capability - most of the case won't be present
641 if(beacon2->WMMCaps.present)
642 {
643 SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_WPA_EID);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530644 vos_mem_copy((void *)&prb_rsp->WMMCaps, (void *)&beacon2->WMMCaps,
645 sizeof(beacon2->WMMCaps));
Jeff Johnson295189b2012-06-20 16:38:30 -0700646 }
647
648}
649
650void SetProbeRspIeBitmap(tANI_U32* IeBitmap,tANI_U32 pos)
651{
652 tANI_U32 index,temp;
653
654 index = pos >> 5;
655 if(index >= 8 )
656 {
657 return;
658 }
659 temp = IeBitmap[index];
660
661 temp |= 1 << (pos & 0x1F);
662
663 IeBitmap[index] = temp;
664}
665
Jeff Johnson295189b2012-06-20 16:38:30 -0700666
Jeff Johnson295189b2012-06-20 16:38:30 -0700667
668// --------------------------------------------------------------------
669/**
670 * writeBeaconToMemory
671 *
672 * FUNCTION:
673 *
674 * LOGIC:
675 *
676 * ASSUMPTIONS:
677 *
678 * NOTE:
679 *
680 * @param None
681 * @param size Size of the beacon to write to memory
682 * @param length Length field of the beacon to write to memory
683 * @return None
684 */
685
686void writeBeaconToMemory(tpAniSirGlobal pMac, tANI_U16 size, tANI_U16 length, tpPESession psessionEntry)
687{
688 tANI_U16 i;
689 tpAniBeaconStruct pBeacon;
690
691 // copy end of beacon only if length > 0
692 if (length > 0)
693 {
694 for (i=0; i < pMac->sch.schObject.gSchBeaconOffsetEnd; i++)
695 pMac->sch.schObject.gSchBeaconFrameBegin[size++] = pMac->sch.schObject.gSchBeaconFrameEnd[i];
696 }
697
698 // Update the beacon length
699 pBeacon = (tpAniBeaconStruct) pMac->sch.schObject.gSchBeaconFrameBegin;
700 // Do not include the beaconLength indicator itself
701 if (length == 0)
702 {
703 pBeacon->beaconLength = 0;
704 // Dont copy entire beacon, Copy length field alone
705 size = 4;
706 }
707 else
708 pBeacon->beaconLength = (tANI_U32) size - sizeof( tANI_U32 );
709
710 // write size bytes from gSchBeaconFrameBegin
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700711 PELOG2(schLog(pMac, LOG2, FL("Beacon size - %d bytes"), size);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700712 PELOG2(sirDumpBuf(pMac, SIR_SCH_MODULE_ID, LOG2, pMac->sch.schObject.gSchBeaconFrameBegin, size);)
713
714 if (! pMac->sch.schObject.fBeaconChanged)
715 return;
716
717 pMac->sch.gSchGenBeacon = 1;
718 if (pMac->sch.gSchGenBeacon)
719 {
720 pMac->sch.gSchBeaconsSent++;
721
722 //
723 // Copy beacon data to SoftMAC shared memory...
724 // Do this by sending a message to HAL
725 //
726
727 size = (size + 3) & (~3);
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530728 if( eSIR_SUCCESS != schSendBeaconReq( pMac, pMac->sch.schObject.gSchBeaconFrameBegin,
729 size, psessionEntry))
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700730 PELOGE(schLog(pMac, LOGE, FL("schSendBeaconReq() returned an error (zsize %d)"), size);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700731 else
732 {
733 pMac->sch.gSchBeaconsWritten++;
734 }
735 }
736 pMac->sch.schObject.fBeaconChanged = 0;
737}
738
739// --------------------------------------------------------------------
740/**
741 * @function: SchProcessPreBeaconInd
742 *
743 * @brief : Process the PreBeacon Indication from the Lim
744 *
745 * ASSUMPTIONS:
746 *
747 * NOTE:
748 *
749 * @param : pMac - tpAniSirGlobal
750 *
751 * @return None
752 */
753
754void
755schProcessPreBeaconInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
756{
757 tpBeaconGenParams pMsg = (tpBeaconGenParams)limMsg->bodyptr;
758 tANI_U32 beaconSize = pMac->sch.schObject.gSchBeaconOffsetBegin;
759 tpPESession psessionEntry;
760 tANI_U8 sessionId;
761
762 if((psessionEntry = peFindSessionByBssid(pMac,pMsg->bssId, &sessionId))== NULL)
763 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700764 PELOGE(schLog(pMac, LOGE, FL("session lookup fails"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700765 goto end;
766 }
767
768
769
770 // If SME is not in normal mode, no need to generate beacon
771 if (psessionEntry->limSmeState != eLIM_SME_NORMAL_STATE)
772 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700773 PELOGE(schLog(pMac, LOG1, FL("PreBeaconInd received in invalid state: %d"), psessionEntry->limSmeState);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700774 goto end;
775 }
776
777 switch(psessionEntry->limSystemRole){
778
779 case eLIM_STA_IN_IBSS_ROLE:
780 case eLIM_BT_AMP_AP_ROLE:
781 case eLIM_BT_AMP_STA_ROLE:
782 // generate IBSS parameter set
783 if(psessionEntry->statypeForBss == STA_ENTRY_SELF)
784 writeBeaconToMemory(pMac, (tANI_U16) beaconSize, (tANI_U16)beaconSize, psessionEntry);
785 else
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700786 PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700787 break;
788
Jeff Johnson295189b2012-06-20 16:38:30 -0700789 case eLIM_AP_ROLE:{
790 tANI_U8 *ptr = &pMac->sch.schObject.gSchBeaconFrameBegin[pMac->sch.schObject.gSchBeaconOffsetBegin];
791 tANI_U16 timLength = 0;
792 if(psessionEntry->statypeForBss == STA_ENTRY_SELF){
793 pmmGenerateTIM(pMac, &ptr, &timLength, psessionEntry->dtimPeriod);
794 beaconSize += 2 + timLength;
795 writeBeaconToMemory(pMac, (tANI_U16) beaconSize, (tANI_U16)beaconSize, psessionEntry);
796 }
797 else
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700798 PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700799 }
800 break;
Jeff Johnson295189b2012-06-20 16:38:30 -0700801
Jeff Johnson295189b2012-06-20 16:38:30 -0700802
803 default:
804 PELOGE(schLog(pMac, LOGE, FL("Error-PE has Receive PreBeconGenIndication when System is in %d role"),
805 psessionEntry->limSystemRole);)
806 }
807
808end:
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530809 vos_mem_free(pMsg);
Jeff Johnson295189b2012-06-20 16:38:30 -0700810
811}