blob: 18abbd99a8f103ae905b97c7b833447d7cf23d2d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Sushant Kaushikfc420e72015-01-16 15:24:25 +05302 * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
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.
Kiet Lamaa8e15a2014-02-11 23:30:06 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
Jeff Johnson295189b2012-06-20 16:38:30 -070022/*
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 schBeaconProcess.cc contains beacon processing 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
43#include "cfgApi.h"
44#include "pmmApi.h"
45#include "limApi.h"
46#include "utilsApi.h"
47#include "schDebug.h"
48#include "schApi.h"
49
Jeff Johnson295189b2012-06-20 16:38:30 -070050
51#include "limUtils.h"
52#include "limSendMessages.h"
53#include "limStaHashApi.h"
54
55#if defined WLAN_FEATURE_VOWIFI
56#include "rrmApi.h"
57#endif
58
59#ifdef FEATURE_WLAN_DIAG_SUPPORT
60#include "vos_diag_core_log.h"
61#endif //FEATURE_WLAN_DIAG_SUPPORT
62
63/**
64 * Number of bytes of variation in beacon length from the last beacon
65 * to trigger reprogramming of rx delay register
66 */
67#define SCH_BEACON_LEN_DELTA 3
68
69// calculate 2^cw - 1
70#define CW_GET(cw) (((cw) == 0) ? 1 : ((1 << (cw)) - 1))
71
72static void
73ap_beacon_process(
74 tpAniSirGlobal pMac,
75 tANI_U8* pRxPacketInfo,
76 tpSchBeaconStruct pBcnStruct,
77 tpUpdateBeaconParams pBeaconParams,
78 tpPESession psessionEntry)
79{
80 tpSirMacMgmtHdr pMh = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
81 tANI_U32 phyMode;
82 tSirRFBand rfBand = SIR_BAND_UNKNOWN;
83 //Get RF band from psessionEntry
84 rfBand = psessionEntry->limRFBand;
85
86 limGetPhyMode(pMac, &phyMode, psessionEntry);
87
88 if(SIR_BAND_5_GHZ == rfBand)
89 {
Jeff Johnsone7245742012-09-05 17:12:55 -070090 if (psessionEntry->htCapability)
Jeff Johnson295189b2012-06-20 16:38:30 -070091 {
92 if (pBcnStruct->channelNumber == psessionEntry->currentOperChannel)
93 {
94 //11a (non HT) AP overlaps or
95 //HT AP with HT op mode as mixed overlaps.
96 //HT AP with HT op mode as overlap legacy overlaps.
97 if ((!pBcnStruct->HTInfo.present) ||
98 (eSIR_HT_OP_MODE_MIXED == pBcnStruct->HTInfo.opMode) ||
99 (eSIR_HT_OP_MODE_OVERLAP_LEGACY == pBcnStruct->HTInfo.opMode))
100 {
101 limUpdateOverlapStaParam(pMac, pMh->bssId, &(pMac->lim.gLimOverlap11aParams));
102
103 if (pMac->lim.gLimOverlap11aParams.numSta &&
104 !pMac->lim.gLimOverlap11aParams.protectionEnabled)
105 {
106 limEnable11aProtection(pMac, true, true, pBeaconParams,psessionEntry);
107 }
108 }
109 //HT AP with HT20 op mode overlaps.
110 else if(eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT == pBcnStruct->HTInfo.opMode)
111 {
112 limUpdateOverlapStaParam(pMac, pMh->bssId, &(pMac->lim.gLimOverlapHt20Params));
113
114 if (pMac->lim.gLimOverlapHt20Params.numSta &&
115 !pMac->lim.gLimOverlapHt20Params.protectionEnabled)
116 {
117 limEnableHT20Protection(pMac, true, true, pBeaconParams,psessionEntry);
118 }
119 }
120 }
121 }
122 }
123 else if(SIR_BAND_2_4_GHZ == rfBand)
124 {
125 //We are 11G AP.
126 if ((phyMode == WNI_CFG_PHY_MODE_11G) &&
Jeff Johnsone7245742012-09-05 17:12:55 -0700127 (false == psessionEntry->htCapability))
Jeff Johnson295189b2012-06-20 16:38:30 -0700128 {
129 if (pBcnStruct->channelNumber == psessionEntry->currentOperChannel)
130 {
131 if (((!(pBcnStruct->erpPresent)) &&
132 !(pBcnStruct->HTInfo.present))||
133 //if erp not present then 11B AP overlapping
134 (pBcnStruct->erpPresent &&
135 (pBcnStruct->erpIEInfo.useProtection ||
136 pBcnStruct->erpIEInfo.nonErpPresent)))
137 {
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800138#ifdef FEATURE_WLAN_ESE
139 if( psessionEntry->isESEconnection )
Jeff Johnson295189b2012-06-20 16:38:30 -0700140 {
141 VOS_TRACE (VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800142 "%s: [INFOLOG]ESE 11g erpPresent=%d useProtection=%d nonErpPresent=%d", __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -0700143 pBcnStruct->erpPresent,
144 pBcnStruct->erpIEInfo.useProtection,
145 pBcnStruct->erpIEInfo.nonErpPresent);
146 }
147#endif
148 limEnableOverlap11gProtection(pMac, pBeaconParams, pMh,psessionEntry);
149 }
150
151 }
152 }
153 // handling the case when HT AP has overlapping legacy BSS.
Jeff Johnsone7245742012-09-05 17:12:55 -0700154 else if(psessionEntry->htCapability)
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700155 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700156 if (pBcnStruct->channelNumber == psessionEntry->currentOperChannel)
157 {
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700158 if (((!(pBcnStruct->erpPresent)) &&
159 !(pBcnStruct->HTInfo.present))||
160 //if erp not present then 11B AP overlapping
161 (pBcnStruct->erpPresent &&
162 (pBcnStruct->erpIEInfo.useProtection ||
163 pBcnStruct->erpIEInfo.nonErpPresent)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700164 {
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800165#ifdef FEATURE_WLAN_ESE
166 if( psessionEntry->isESEconnection )
Jeff Johnson295189b2012-06-20 16:38:30 -0700167 {
168 VOS_TRACE (VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800169 "%s: [INFOLOG]ESE 11g erpPresent=%d useProtection=%d nonErpPresent=%d", __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -0700170 pBcnStruct->erpPresent,
171 pBcnStruct->erpIEInfo.useProtection,
172 pBcnStruct->erpIEInfo.nonErpPresent);
173 }
174#endif
175 limEnableOverlap11gProtection(pMac, pBeaconParams, pMh,psessionEntry);
176 }
177
178 //11g device overlaps
179 if (pBcnStruct->erpPresent &&
180 !(pBcnStruct->erpIEInfo.useProtection ||
181 pBcnStruct->erpIEInfo.nonErpPresent) && !(pBcnStruct->HTInfo.present))
182 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700183 limUpdateOverlapStaParam(pMac, pMh->bssId, &(psessionEntry->gLimOverlap11gParams));
184
185 if (psessionEntry->gLimOverlap11gParams.numSta &&
186 !psessionEntry->gLimOverlap11gParams.protectionEnabled)
Jeff Johnson295189b2012-06-20 16:38:30 -0700187 {
188 limEnableHtProtectionFrom11g(pMac, true, true, pBeaconParams,psessionEntry);
189 }
190 }
191
192 //ht device overlaps.
193 //here we will check for HT related devices only which might need protection.
194 //check for 11b and 11g is already done in the previous blocks.
195 //so we will not check for HT operating mode as MIXED.
196 if (pBcnStruct->HTInfo.present)
197 {
198 //if we are not already in mixed mode or legacy mode as HT operating mode
199 //and received beacon has HT operating mode as legacy
200 //then we need to enable protection from 11g station.
201 //we don't need protection from 11b because if that's needed then our operating
202 //mode would have already been set to legacy in the previous blocks.
203 if(eSIR_HT_OP_MODE_OVERLAP_LEGACY == pBcnStruct->HTInfo.opMode)
204 {
205 if((eSIR_HT_OP_MODE_MIXED != pMac->lim.gHTOperMode) &&
206 (eSIR_HT_OP_MODE_OVERLAP_LEGACY != pMac->lim.gHTOperMode))
207 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700208 limUpdateOverlapStaParam(pMac, pMh->bssId, &(psessionEntry->gLimOverlap11gParams));
209 if (psessionEntry->gLimOverlap11gParams.numSta &&
210 !psessionEntry->gLimOverlap11gParams.protectionEnabled)
Jeff Johnson295189b2012-06-20 16:38:30 -0700211 {
212 limEnableHtProtectionFrom11g(pMac, true, true, pBeaconParams,psessionEntry);
213 }
214 }
215 }
216 else if(eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT == pBcnStruct->HTInfo.opMode)
217 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700218 limUpdateOverlapStaParam(pMac, pMh->bssId, &(psessionEntry->gLimOverlapHt20Params));
219 if (psessionEntry->gLimOverlapHt20Params.numSta &&
220 !psessionEntry->gLimOverlapHt20Params.protectionEnabled)
Jeff Johnson295189b2012-06-20 16:38:30 -0700221 {
222 limEnableHT20Protection(pMac, true, true, pBeaconParams,psessionEntry);
223 }
224 }
225 }
226
227 }
228 }
229 }
230 pMac->sch.gSchBcnIgnored++;
231}
232// --------------------------------------------------------------------
233
234
235
236
237/**
238 * __schBeaconProcessNoSession
239 *
240 * FUNCTION:
241 * Process the received beacon frame when
242 * -- Station is not scanning
243 * -- No corresponding session is found
244 *
245 * LOGIC:
246 * Following scenarios exist when Session Does not exist:
247 * * IBSS Beacons, when IBSS session already exists with same SSID,
248 * but from STA which has not yet joined and has a different BSSID.
249 * - invoke limHandleIBSScoalescing with the session context of existing IBSS session.
250 *
251 * * IBSS Beacons when IBSS session does not exist, only Infra or BT-AMP session exists,
252 * then save the beacon in the scan results and throw it away.
253 *
254 * * Infra Beacons
255 * - beacons received when no session active
256 * should not come here, it should be handled as part of scanning,
257 * else they should not be getting received, should update scan results and drop it if that happens.
258 * - beacons received when IBSS session active:
259 * update scan results and drop it.
260 * - beacons received when Infra session(STA) is active:
261 * update scan results and drop it
262 * - beacons received when BT-STA session is active:
263 * update scan results and drop it.
264 * - beacons received when Infra/BT-STA or Infra/IBSS is active.
265 * update scan results and drop it.
266 *
267
268 */
269static void __schBeaconProcessNoSession(tpAniSirGlobal pMac, tpSchBeaconStruct pBeacon,tANI_U8* pRxPacketInfo)
270{
271 tpPESession psessionEntry = NULL;
272
273 if( (psessionEntry = limIsIBSSSessionActive(pMac)) != NULL)
274 {
275 limHandleIBSScoalescing(pMac, pBeacon, pRxPacketInfo, psessionEntry);
276 }
277
278 //If station(STA/BT-STA/BT-AP/IBSS) mode, Always save the beacon in the scan results, if atleast one session is active
279 //schBeaconProcessNoSession will be called only when there is atleast one session active, so not checking
280 //it again here.
281 limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
282 return;
283}
284
285
286
287/*
288 * __schBeaconProcessForSession
289 *
290 * FUNCTION:
291 * Process the received beacon frame when
292 * -- Station is not scanning
293 * -- Corresponding session is found
294 *
295 * LOGIC:
296 * Following scenarios exist when Session exists
297 * * IBSS STA receving beacons from IBSS Peers, who are part of IBSS.
298 * - call limHandleIBSScoalescing with that session context.
299 * * Infra STA receving beacons from AP to which it is connected
300 * - call schBeaconProcessFromAP with that session's context.
301 * * BTAMP STA receving beacons from BTAMP AP
302 * - call schBeaconProcessFromAP with that session's context.
303 * * BTAMP AP receiving beacons from BTAMP STA
304 * (here need to make sure BTAP creates session entry for BT STA)
305 * - just update the beacon count for heart beat purposes for now,
306 * for now, don't process the beacon.
307 * * Infra/IBSS both active and receives IBSS beacon:
308 * - call limHandleIBSScoalescing with that session context.
309 * * Infra/IBSS both active and receives Infra beacon:
310 * - call schBeaconProcessFromAP with that session's context.
311 * any updates to EDCA parameters will be effective for IBSS as well,
312 * even though no WMM for IBSS ?? Need to figure out how to handle this scenario.
313 * * Infra/BTSTA both active and receive Infra beacon.
314 * - change in EDCA parameters on Infra affect the BTSTA link.
315 * Update the same parameters on BT link
316 * * Infra/BTSTA both active and receive BT-AP beacon.
317 * -update beacon cnt for heartbeat
318 * * Infra/BTAP both active and receive Infra beacon.
319 * - BT-AP starts advertising BE parameters from Infra AP, if they get changed.
320 *
321 * * Infra/BTAP both active and receive BTSTA beacon.
322 * - update beacon cnt for heartbeat
323 */
324
325static void __schBeaconProcessForSession( tpAniSirGlobal pMac,
326 tpSchBeaconStruct pBeacon,
327 tANI_U8* pRxPacketInfo,
328 tpPESession psessionEntry)
329{
330 tANI_U32 bi;
331 tANI_U8 bssIdx = 0;
332 //tpSirMacMgmtHdr pMh = SIR_MAC_BD_TO_MPDUHEADER(pRxPacketInfo);
333 //tANI_U8 bssid[sizeof(tSirMacAddr)];
334 tUpdateBeaconParams beaconParams;
335 tANI_U8 sendProbeReq = FALSE;
336 tpDphHashNode pStaDs = NULL;
Abhishek Singhcacf70f2014-11-15 00:49:28 +0530337 tANI_U32 channelBondingMode;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700338#ifdef WLAN_FEATURE_11AC
339 tpSirMacMgmtHdr pMh = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
340 tANI_U16 aid;
341 tANI_U8 operMode;
Kiran Kumar Lokere6e455332013-06-21 19:31:12 -0700342 tANI_U8 chWidth = 0;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700343#endif
Girish Gowli65b096c2014-10-20 21:04:55 +0530344#if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530345 tPowerdBm regMax = 0,maxTxPower = 0;
346#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700347
Kaushik, Sushantfb156732014-01-07 15:36:03 +0530348 vos_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700349 beaconParams.paramChangeBitmap = 0;
350
351 if(eLIM_STA_IN_IBSS_ROLE == psessionEntry->limSystemRole )
352 {
Abhishek Singhd5c31272014-03-07 14:46:50 +0530353 if( limHandleIBSScoalescing(pMac, pBeacon, pRxPacketInfo, psessionEntry)
354 != eSIR_SUCCESS )
355 return;
Jeff Johnson295189b2012-06-20 16:38:30 -0700356 }
357 else if( (eLIM_STA_ROLE == psessionEntry->limSystemRole) ||
358 (eLIM_BT_AMP_STA_ROLE == psessionEntry->limSystemRole))
359 {
360 /*
361 * This handles two cases:
362 * -- Infra STA receving beacons from AP
363 * -- BTAMP_STA receving beacons from BTAMP_AP
364 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700365 //Always save the beacon into LIM's cached scan results
366 limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530367
Jeff Johnson295189b2012-06-20 16:38:30 -0700368 /**
369 * This is the Beacon received from the AP we're currently associated with. Check
370 * if there are any changes in AP's capabilities
371 */
372 if((tANI_U8) pBeacon->channelNumber != psessionEntry->currentOperChannel)
373 {
Katya Nigam70d68332013-09-16 16:49:45 +0530374 PELOGE(schLog(pMac, LOGE, FL("Channel Change from %d --> %d - "
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700375 "Ignoring beacon!"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700376 psessionEntry->currentOperChannel, pBeacon->channelNumber);)
377 goto fail;
378 }
Abhishek Singhcacf70f2014-11-15 00:49:28 +0530379
380 if( RF_CHAN_14 >= psessionEntry->currentOperChannel )
381 {
382 channelBondingMode = pMac->roam.configParam.channelBondingMode24GHz;
383 }
384 else
385 {
386 channelBondingMode = pMac->roam.configParam.channelBondingMode5GHz;
387 }
388
Jeff Johnson295189b2012-06-20 16:38:30 -0700389 limDetectChangeInApCapabilities(pMac, pBeacon, psessionEntry);
390 if(limGetStaHashBssidx(pMac, DPH_STA_HASH_INDEX_PEER, &bssIdx, psessionEntry) != eSIR_SUCCESS)
391 goto fail;
392 beaconParams.bssIdx = bssIdx;
Madan Mohan Koyyalamudifff03f22013-07-11 11:32:07 +0530393 vos_mem_copy(( tANI_U8* )&psessionEntry->lastBeaconTimeStamp,
394 ( tANI_U8* )pBeacon->timeStamp, sizeof(tANI_U64));
Jeff Johnson295189b2012-06-20 16:38:30 -0700395 psessionEntry->lastBeaconDtimCount = pBeacon->tim.dtimCount;
396 psessionEntry->lastBeaconDtimPeriod= pBeacon->tim.dtimPeriod;
397 psessionEntry->currentBssBeaconCnt++;
398
399
400
Jeff Johnsone7245742012-09-05 17:12:55 -0700401 MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, psessionEntry->peSessionId, pBeacon->timeStamp[0]);)
402 MTRACE(macTrace(pMac, TRACE_CODE_RX_MGMT_TSF, psessionEntry->peSessionId, pBeacon->timeStamp[1]);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700403
404 /* Read beacon interval session Entry */
405 bi = psessionEntry->beaconParams.beaconInterval;
406 if (bi != pBeacon->beaconInterval)
407 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700408 PELOG1(schLog(pMac, LOG1, FL("Beacon interval changed from %d to %d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700409 pBeacon->beaconInterval, bi);)
410
411 bi = pBeacon->beaconInterval;
412 psessionEntry->beaconParams.beaconInterval = (tANI_U16) bi;
413 beaconParams.paramChangeBitmap |= PARAM_BCN_INTERVAL_CHANGED;
414 beaconParams.beaconInterval = (tANI_U16)bi;
415 }
416
417 if (pBeacon->cfPresent)
418 {
419 cfgSetInt(pMac, WNI_CFG_CFP_PERIOD, pBeacon->cfParamSet.cfpPeriod);
420 limSendCFParams(pMac, bssIdx, pBeacon->cfParamSet.cfpCount, pBeacon->cfParamSet.cfpPeriod);
421 }
422
423 if (pBeacon->timPresent)
424 {
425 cfgSetInt(pMac, WNI_CFG_DTIM_PERIOD, pBeacon->tim.dtimPeriod);
426 //No need to send DTIM Period and Count to HAL/SMAC
427 //SMAC already parses TIM bit.
428 }
429
Jeff Johnson295189b2012-06-20 16:38:30 -0700430 if(pMac->lim.gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
431
432 limDecideStaProtection(pMac, pBeacon, &beaconParams, psessionEntry);
433 if (pBeacon->erpPresent)
434 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700435 if (pBeacon->erpIEInfo.barkerPreambleMode)
436 limEnableShortPreamble(pMac, false, &beaconParams, psessionEntry);
437 else
438 limEnableShortPreamble(pMac, true, &beaconParams, psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700439 }
440 limUpdateShortSlot(pMac, pBeacon, &beaconParams,psessionEntry);
441
442 pStaDs = dphGetHashEntry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable);
443 if ((pBeacon->wmeEdcaPresent && (psessionEntry->limWmeEnabled)) ||
444 (pBeacon->edcaPresent && (psessionEntry->limQosEnabled)))
445 {
446 if(pBeacon->edcaParams.qosInfo.count != psessionEntry->gLimEdcaParamSetCount)
447 {
448 if (schBeaconEdcaProcess(pMac, &pBeacon->edcaParams, psessionEntry) != eSIR_SUCCESS)
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700449 PELOGE(schLog(pMac, LOGE, FL("EDCA parameter processing error"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700450 else if(pStaDs != NULL)
451 {
452 // If needed, downgrade the EDCA parameters
453 limSetActiveEdcaParams(pMac, psessionEntry->gLimEdcaParams, psessionEntry);
454
455 if (pStaDs->aniPeer == eANI_BOOLEAN_TRUE)
456 limSendEdcaParams(pMac, psessionEntry->gLimEdcaParamsActive, pStaDs->bssId, eANI_BOOLEAN_TRUE);
457 else
458 limSendEdcaParams(pMac, psessionEntry->gLimEdcaParamsActive, pStaDs->bssId, eANI_BOOLEAN_FALSE);
459 }
460 else
Katya Nigam70d68332013-09-16 16:49:45 +0530461 PELOGE(schLog(pMac, LOGE, FL("Self Entry missing in Hash Table"));)
Jeff Johnson295189b2012-06-20 16:38:30 -0700462 }
463 }
464 else if( (pBeacon->qosCapabilityPresent && psessionEntry->limQosEnabled) &&
465 (pBeacon->qosCapability.qosInfo.count != psessionEntry->gLimEdcaParamSetCount))
466 sendProbeReq = TRUE;
467 }
468
Subrat Dashd833a192017-03-14 13:32:38 +0800469 if (psessionEntry->htCapability && pBeacon->HTInfo.present &&
470 (!LIM_IS_IBSS_ROLE(psessionEntry)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700471 {
472 limUpdateStaRunTimeHTSwitchChnlParams( pMac, &pBeacon->HTInfo, bssIdx,psessionEntry);
473 }
474
Jeff Johnson295189b2012-06-20 16:38:30 -0700475 if ( (psessionEntry->limSystemRole == eLIM_STA_ROLE) ||(psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE) ||
476 (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE) )
477 {
Jeff Johnson295189b2012-06-20 16:38:30 -0700478 /* Channel Switch information element updated */
Kiet Lamaa8e15a2014-02-11 23:30:06 -0800479 if(pBeacon->channelSwitchPresent ||
Jeff Johnson295189b2012-06-20 16:38:30 -0700480 pBeacon->propIEinfo.propChannelSwitchPresent)
481 {
482 limUpdateChannelSwitch(pMac, pBeacon, psessionEntry);
483 }
Jeff Johnsone7245742012-09-05 17:12:55 -0700484 else if (psessionEntry->gLimSpecMgmt.dot11hChanSwState == eLIM_11H_CHANSW_RUNNING)
Jeff Johnson295189b2012-06-20 16:38:30 -0700485 {
486 limCancelDot11hChannelSwitch(pMac, psessionEntry);
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530487 }
Sandeep Puligilla60342762014-01-30 21:05:37 +0530488 // check for HT capability
489 pStaDs = dphLookupHashEntry(pMac, pMh->sa, &aid,
490 &psessionEntry->dph.dphHashTable);
Abhishek Singhcacf70f2014-11-15 00:49:28 +0530491 /* Update the channel bonding mode only if channel bonding
492 * mode is enabled in INI.
493 */
494 if ( (pStaDs != NULL) &&
495 (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE != channelBondingMode) )
Sandeep Puligilla60342762014-01-30 21:05:37 +0530496 {
497 /* Following check is related to HT40 on 2.4GHz mode*/
498 if ((pStaDs->htSecondaryChannelOffset !=
499 pBeacon->HTInfo.secondaryChannelOffset) &&
500 (IS_HT40_OBSS_SCAN_FEATURE_ENABLE) &&
Kiet Lamaa8e15a2014-02-11 23:30:06 -0800501 (psessionEntry->currentOperChannel <= RF_CHAN_14))
Sandeep Puligilla60342762014-01-30 21:05:37 +0530502 {
503 VOS_TRACE( VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
504 FL(" Current Secondarychanoffset %d received "
505 " secondaryChannelOffset %d, staIdx = %d"),
506 pStaDs->htSecondaryChannelOffset,
507 pBeacon->HTInfo.secondaryChannelOffset,
508 pStaDs->staIndex);
509 if (eANI_BOOLEAN_TRUE ==(limCheckHTChanBondModeChange(pMac,
510 psessionEntry,
511 pBeacon->HTInfo.secondaryChannelOffset,
512 pStaDs->htSecondaryChannelOffset,
513 pStaDs->staIndex)))
514 {
515 pStaDs->htSupportedChannelWidthSet =
516 pBeacon->HTInfo.recommendedTxWidthSet;
Kiet Lamaa8e15a2014-02-11 23:30:06 -0800517 pStaDs->htSecondaryChannelOffset =
Sandeep Puligilla60342762014-01-30 21:05:37 +0530518 pBeacon->HTInfo.secondaryChannelOffset;
519 }
520 }
521 }
522 else
Abhishek Singhcacf70f2014-11-15 00:49:28 +0530523 schLog(pMac, LOG1,
524 FL("Self Entry missing in Hash Table or channel bonding mode is disabled"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700525 }
Sandeep Puligilla60342762014-01-30 21:05:37 +0530526 /* TODO : Below condition checks can be merged with the if */
Mohit Khanna4a70d262012-09-11 16:30:12 -0700527#ifdef WLAN_FEATURE_11AC
Kiran Kumar Lokere6e455332013-06-21 19:31:12 -0700528 if ((psessionEntry->limSystemRole == eLIM_STA_ROLE) ||
529 (psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE) ||
530 (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE))
Mohit Khanna4a70d262012-09-11 16:30:12 -0700531 {
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700532 // check for VHT capability
533 pStaDs = dphLookupHashEntry(pMac, pMh->sa, &aid,
534 &psessionEntry->dph.dphHashTable);
Abhishek Singhcacf70f2014-11-15 00:49:28 +0530535
536 /* Update the channel bonding mode only if channel bonding
537 * mode is enabled in INI.
538 */
539 if ( (NULL != pStaDs) &&
540 (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE != channelBondingMode) )
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700541 {
542 if (psessionEntry->vhtCapability && pBeacon->OperatingMode.present )
543 {
544 operMode = pStaDs->vhtSupportedChannelWidthSet ?
545 eHT_CHANNEL_WIDTH_80MHZ :
546 pStaDs->htSupportedChannelWidthSet ?
547 eHT_CHANNEL_WIDTH_40MHZ: eHT_CHANNEL_WIDTH_20MHZ;
548 if (operMode != pBeacon->OperatingMode.chanWidth)
549 {
Katya Nigam70d68332013-09-16 16:49:45 +0530550 PELOG1(schLog(pMac, LOG1,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700551 FL(" received OpMode Chanwidth %d, staIdx = %d"),
552 pBeacon->OperatingMode.chanWidth,
553 pStaDs->staIndex);)
Katya Nigam70d68332013-09-16 16:49:45 +0530554 PELOG1(schLog(pMac, LOG1, FL(" MAC - %0x:%0x:%0x:%0x:%0x:%0x"),
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700555 pMh->sa[0],
556 pMh->sa[1],
557 pMh->sa[2],
558 pMh->sa[3],
559 pMh->sa[4],
560 pMh->sa[5]);)
Kiran Kumar Lokere6e455332013-06-21 19:31:12 -0700561
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700562 if (pBeacon->OperatingMode.chanWidth == eHT_CHANNEL_WIDTH_80MHZ)
563 {
Katya Nigam70d68332013-09-16 16:49:45 +0530564 PELOG1(schLog(pMac, LOG1,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700565 FL("Updating the CH Width to 80MHz"));)
566 pStaDs->vhtSupportedChannelWidthSet =
567 WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
568 pStaDs->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
569 }
570 else if (pBeacon->OperatingMode.chanWidth == eHT_CHANNEL_WIDTH_40MHZ)
571 {
Katya Nigam70d68332013-09-16 16:49:45 +0530572 PELOG1(schLog(pMac, LOG1,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700573 FL("Updating the CH Width to 40MHz"));)
574 pStaDs->vhtSupportedChannelWidthSet =
575 WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
576 pStaDs->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
577 }
578 else if (pBeacon->OperatingMode.chanWidth ==
579 eHT_CHANNEL_WIDTH_20MHZ)
580 {
Katya Nigam70d68332013-09-16 16:49:45 +0530581 PELOG1(schLog(pMac, LOG1,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700582 FL("Updating the CH Width to 20MHz"));)
583 pStaDs->vhtSupportedChannelWidthSet =
584 WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
585 pStaDs->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_20MHZ;
586 }
587 limCheckVHTOpModeChange(pMac, psessionEntry,
588 pBeacon->OperatingMode.chanWidth,
589 pStaDs->staIndex);
590 }
591 }
592 else if (psessionEntry->vhtCapability && pBeacon->VHTOperation.present)
593 {
594 operMode = pStaDs->vhtSupportedChannelWidthSet;
595 if (operMode != pBeacon->VHTOperation.chanWidth)
596 {
Katya Nigam70d68332013-09-16 16:49:45 +0530597 PELOG1(schLog(pMac, LOG1,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700598 FL(" received VHTOP CHWidth %d staIdx = %d"),
599 pBeacon->VHTOperation.chanWidth,
600 pStaDs->staIndex);)
Katya Nigam70d68332013-09-16 16:49:45 +0530601 PELOG1(schLog(pMac, LOG1, FL(" MAC - %0x:%0x:%0x:%0x:%0x:%0x"),
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700602 pMh->sa[0],
603 pMh->sa[1],
604 pMh->sa[2],
605 pMh->sa[3],
606 pMh->sa[4],
607 pMh->sa[5]);)
608
609 if (pBeacon->VHTOperation.chanWidth ==
610 WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
611 {
Katya Nigam70d68332013-09-16 16:49:45 +0530612 PELOG1(schLog(pMac, LOG1,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700613 FL("Updating the CH Width to 80MHz"));)
614 pStaDs->vhtSupportedChannelWidthSet =
615 WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
616 pStaDs->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
617 chWidth = eHT_CHANNEL_WIDTH_80MHZ;
618 }
619 else if (pBeacon->VHTOperation.chanWidth ==
620 WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ)
621 {
622 pStaDs->vhtSupportedChannelWidthSet =
623 WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
624 if (pBeacon->HTCaps.supportedChannelWidthSet)
625 {
Katya Nigam70d68332013-09-16 16:49:45 +0530626 PELOG1(schLog(pMac, LOG1,
Kiran Kumar Lokere6e455332013-06-21 19:31:12 -0700627 FL("Updating the CH Width to 40MHz"));)
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700628 pStaDs->htSupportedChannelWidthSet =
629 eHT_CHANNEL_WIDTH_40MHZ;
630 chWidth = eHT_CHANNEL_WIDTH_40MHZ;
631 }
632 else
633 {
Katya Nigam70d68332013-09-16 16:49:45 +0530634 PELOG1(schLog(pMac, LOG1,
Kiran Kumar Lokere6e455332013-06-21 19:31:12 -0700635 FL("Updating the CH Width to 20MHz"));)
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700636 pStaDs->htSupportedChannelWidthSet =
637 eHT_CHANNEL_WIDTH_20MHZ;
638 chWidth = eHT_CHANNEL_WIDTH_20MHZ;
639 }
640 }
Kiran Kumar Lokere6e455332013-06-21 19:31:12 -0700641 limCheckVHTOpModeChange(pMac, psessionEntry,
Ravi Joshi0fc681b2013-09-11 16:46:07 -0700642 chWidth, pStaDs->staIndex);
643 }
644 }
645 }
Mohit Khanna4a70d262012-09-11 16:30:12 -0700646 }
647#endif
648
Girish Gowli65b096c2014-10-20 21:04:55 +0530649#if defined (FEATURE_WLAN_ESE) || defined (WLAN_FEATURE_VOWIFI)
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530650 /* Obtain the Max Tx power for the current regulatory */
651 regMax = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel );
652#endif
653
Girish Gowli65b096c2014-10-20 21:04:55 +0530654#if defined WLAN_FEATURE_VOWIFI
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530655 {
656 tPowerdBm localRRMConstraint = 0;
657 if ( pMac->rrm.rrmPEContext.rrmEnable && pBeacon->powerConstraintPresent )
658 {
659 localRRMConstraint = pBeacon->localPowerConstraint.localPowerConstraints;
660 }
661 else
662 {
663 localRRMConstraint = 0;
664 }
665 maxTxPower = VOS_MIN(regMax,(regMax - localRRMConstraint));
666 }
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800667#elif defined FEATURE_WLAN_ESE
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530668 maxTxPower = regMax;
669#endif
670
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800671#if defined FEATURE_WLAN_ESE
672 if( psessionEntry->isESEconnection )
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530673 {
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800674 tPowerdBm localESEConstraint = 0;
675 if (pBeacon->eseTxPwr.present)
Jeff Johnson295189b2012-06-20 16:38:30 -0700676 {
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800677 localESEConstraint = pBeacon->eseTxPwr.power_limit;
678 maxTxPower = limGetMaxTxPower(maxTxPower, localESEConstraint, pMac->roam.configParam.nTxPowerCap);
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530679 }
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800680 schLog( pMac, LOG1, "RegMax = %d, localESECons = %d, MaxTx = %d", regMax, localESEConstraint, maxTxPower );
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530681 }
682#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700683
Girish Gowli65b096c2014-10-20 21:04:55 +0530684#if defined (FEATURE_WLAN_ESE) || defined (WLAN_FEATURE_VOWIFI)
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530685 {
686 //If maxTxPower is increased or decreased
687 if( maxTxPower != psessionEntry->maxTxPower )
688 {
Katya Nigam70d68332013-09-16 16:49:45 +0530689 schLog( pMac, LOG1, "Local power constraint change..updating new maxTx power %d to HAL",maxTxPower);
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530690 if( limSendSetMaxTxPowerReq ( pMac, maxTxPower, psessionEntry ) == eSIR_SUCCESS )
Jeff Johnson295189b2012-06-20 16:38:30 -0700691 psessionEntry->maxTxPower = maxTxPower;
Jeff Johnson295189b2012-06-20 16:38:30 -0700692 }
Madan Mohan Koyyalamudi016117f2013-08-06 16:42:11 +0530693 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700694#endif
695
696 // Indicate to LIM that Beacon is received
697
698 if (pBeacon->HTInfo.present)
699 limReceivedHBHandler(pMac, (tANI_U8)pBeacon->HTInfo.primaryChannel, psessionEntry);
700 else
701 limReceivedHBHandler(pMac, (tANI_U8)pBeacon->channelNumber, psessionEntry);
702
703 // I don't know if any additional IE is required here. Currently, not include addIE.
704 if(sendProbeReq)
705 limSendProbeReqMgmtFrame(pMac, &psessionEntry->ssId,
706 psessionEntry->bssId, psessionEntry->currentOperChannel,psessionEntry->selfMacAddr,
707 psessionEntry->dot11mode, 0, NULL);
708
Jeff Johnson295189b2012-06-20 16:38:30 -0700709 if(beaconParams.paramChangeBitmap)
710 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700711 PELOGW(schLog(pMac, LOGW, FL("Beacon for session[%d] got changed. "), psessionEntry->peSessionId);)
712 PELOGW(schLog(pMac, LOGW, FL("sending beacon param change bitmap: 0x%x "), beaconParams.paramChangeBitmap);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700713 limSendBeaconParams(pMac, &beaconParams, psessionEntry);
714 }
715
716fail:
717 return;
718
719}
720
Jeff Johnson295189b2012-06-20 16:38:30 -0700721/**
722 * schBeaconProcess
723 *
724 * FUNCTION:
725 * Process the received beacon frame
726 *
727 * LOGIC:
728 *
729 * ASSUMPTIONS:
730 *
731 * NOTE:
732 *
733 * @param pRxPacketInfo pointer to buffer descriptor
734 * @return None
735 */
736
737void schBeaconProcess(tpAniSirGlobal pMac, tANI_U8* pRxPacketInfo, tpPESession psessionEntry)
738{
739 static tSchBeaconStruct beaconStruct;
740 tUpdateBeaconParams beaconParams;
741 tpPESession pAPSession = NULL;
Kaushik, Sushantfb156732014-01-07 15:36:03 +0530742 vos_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
Jeff Johnson295189b2012-06-20 16:38:30 -0700743 beaconParams.paramChangeBitmap = 0;
744
745 pMac->sch.gSchBcnRcvCnt++;
746
747 // Convert the beacon frame into a structure
748 if (sirConvertBeaconFrame2Struct(pMac, (tANI_U8 *) pRxPacketInfo, &beaconStruct)!= eSIR_SUCCESS)
749 {
Sushant Kaushikfc420e72015-01-16 15:24:25 +0530750 schLog(pMac, LOGE, FL("beacon parsing failed"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700751 pMac->sch.gSchBcnParseErrorCnt++;
Sushant Kaushikfc420e72015-01-16 15:24:25 +0530752
753 if ((NULL != psessionEntry) && (!psessionEntry->currentBssBeaconCnt))
754 limParseBeaconForTim(pMac, (tANI_U8 *) pRxPacketInfo, psessionEntry);
755
Jeff Johnson295189b2012-06-20 16:38:30 -0700756 return;
757 }
758
759 if (beaconStruct.ssidPresent)
760 {
761 beaconStruct.ssId.ssId[beaconStruct.ssId.length] = 0;
762 }
763
764 /*
765 * First process the beacon in the context of any existing AP or BTAP session.
766 * This takes cares of following two scenarios:
767 * - psessionEntry = NULL:
768 * e.g. beacon received from a neighboring BSS, you want to apply the protection settings to BTAP/InfraAP beacons
769 * - psessionEntry is non NULL:
770 * e.g. beacon received is from the INFRA AP to which you are connected on another concurrent link.
771 * In this case also, we want to apply the protection settings(as advertised by Infra AP) to BTAP beacons
772 *
773 *
774 */
775
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700776 if (((pAPSession = limIsApSessionActive(pMac)) != NULL)
777#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
778 && (!(WDA_GET_OFFLOADSCANLEARN(pRxPacketInfo)))
779#endif
780 )
Jeff Johnson295189b2012-06-20 16:38:30 -0700781 {
782 beaconParams.bssIdx = pAPSession->bssIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -0700783 if (pAPSession->gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
Jeff Johnson295189b2012-06-20 16:38:30 -0700784 ap_beacon_process(pMac, pRxPacketInfo, &beaconStruct, &beaconParams, pAPSession);
785
786 if (beaconParams.paramChangeBitmap)
787 {
788 //Update the beacons and apply the new settings to HAL
789 schSetFixedBeaconFields(pMac, pAPSession);
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700790 PELOG1(schLog(pMac, LOG1, FL("Beacon for PE session[%d] got changed. "), pAPSession->peSessionId);)
791 PELOG1(schLog(pMac, LOG1, FL("sending beacon param change bitmap: 0x%x "), beaconParams.paramChangeBitmap);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700792 limSendBeaconParams(pMac, &beaconParams, pAPSession);
793 }
794 }
795
796 /*
797 * Now process the beacon in the context of the BSS which is transmitting the beacons, if one is found
798 */
799 if(psessionEntry == NULL)
800 {
801 __schBeaconProcessNoSession(pMac, &beaconStruct, pRxPacketInfo );
802 }
803 else
804 {
805 __schBeaconProcessForSession(pMac, &beaconStruct, pRxPacketInfo, psessionEntry );
806 }
807
808}
809
810
811
812
813
814// --------------------------------------------------------------------
815/**
816 * schBeaconEdcaProcess
817 *
818 * FUNCTION:
819 * Process the EDCA parameter set in the received beacon frame
820 *
821 * LOGIC:
822 *
823 * ASSUMPTIONS:
824 *
825 * NOTE:
826 *
827 * @param edca reference to edca parameters in beacon struct
828 * @return success
829 */
830
831tSirRetStatus schBeaconEdcaProcess(tpAniSirGlobal pMac, tSirMacEdcaParamSetIE *edca, tpPESession psessionEntry)
832{
833 tANI_U8 i;
834#ifdef FEATURE_WLAN_DIAG_SUPPORT
835 vos_log_qos_edca_pkt_type *log_ptr = NULL;
836#endif //FEATURE_WLAN_DIAG_SUPPORT
837
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700838 PELOG1(schLog(pMac, LOG1, FL("Updating parameter set count: Old %d ---> new %d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700839 psessionEntry->gLimEdcaParamSetCount, edca->qosInfo.count);)
840
841 psessionEntry->gLimEdcaParamSetCount = edca->qosInfo.count;
842 psessionEntry->gLimEdcaParams[EDCA_AC_BE] = edca->acbe;
843 psessionEntry->gLimEdcaParams[EDCA_AC_BK] = edca->acbk;
844 psessionEntry->gLimEdcaParams[EDCA_AC_VI] = edca->acvi;
845 psessionEntry->gLimEdcaParams[EDCA_AC_VO] = edca->acvo;
846//log: LOG_WLAN_QOS_EDCA_C
847#ifdef FEATURE_WLAN_DIAG_SUPPORT
848 WLAN_VOS_DIAG_LOG_ALLOC(log_ptr, vos_log_qos_edca_pkt_type, LOG_WLAN_QOS_EDCA_C);
849 if(log_ptr)
850 {
851 log_ptr->aci_be = psessionEntry->gLimEdcaParams[EDCA_AC_BE].aci.aci;
852 log_ptr->cw_be = psessionEntry->gLimEdcaParams[EDCA_AC_BE].cw.max << 4 |
853 psessionEntry->gLimEdcaParams[EDCA_AC_BE].cw.min;
854 log_ptr->txoplimit_be = psessionEntry->gLimEdcaParams[EDCA_AC_BE].txoplimit;
855 log_ptr->aci_bk = psessionEntry->gLimEdcaParams[EDCA_AC_BK].aci.aci;
856 log_ptr->cw_bk = psessionEntry->gLimEdcaParams[EDCA_AC_BK].cw.max << 4 |
857 psessionEntry->gLimEdcaParams[EDCA_AC_BK].cw.min;
858 log_ptr->txoplimit_bk = psessionEntry->gLimEdcaParams[EDCA_AC_BK].txoplimit;
859 log_ptr->aci_vi = psessionEntry->gLimEdcaParams[EDCA_AC_VI].aci.aci;
860 log_ptr->cw_vi = psessionEntry->gLimEdcaParams[EDCA_AC_VI].cw.max << 4 |
861 psessionEntry->gLimEdcaParams[EDCA_AC_VI].cw.min;
862 log_ptr->txoplimit_vi = psessionEntry->gLimEdcaParams[EDCA_AC_VI].txoplimit;
863 log_ptr->aci_vo = psessionEntry->gLimEdcaParams[EDCA_AC_VO].aci.aci;
864 log_ptr->cw_vo = psessionEntry->gLimEdcaParams[EDCA_AC_VO].cw.max << 4 |
865 psessionEntry->gLimEdcaParams[EDCA_AC_VO].cw.min;
866 log_ptr->txoplimit_vo = psessionEntry->gLimEdcaParams[EDCA_AC_VO].txoplimit;
867 }
868 WLAN_VOS_DIAG_LOG_REPORT(log_ptr);
869#endif //FEATURE_WLAN_DIAG_SUPPORT
870 PELOG1(schLog(pMac, LOGE, FL("Updating Local EDCA Params(gLimEdcaParams) to: "));)
871 for(i=0; i<MAX_NUM_AC; i++)
872 {
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700873 PELOG1(schLog(pMac, LOG1, FL("AC[%d]: AIFSN: %d, ACM %d, CWmin %d, CWmax %d, TxOp %d"),
Jeff Johnson295189b2012-06-20 16:38:30 -0700874 i,
875 psessionEntry->gLimEdcaParams[i].aci.aifsn,
876 psessionEntry->gLimEdcaParams[i].aci.acm,
877 psessionEntry->gLimEdcaParams[i].cw.min,
878 psessionEntry->gLimEdcaParams[i].cw.max,
879 psessionEntry->gLimEdcaParams[i].txoplimit);)
880 }
881
882 return eSIR_SUCCESS;
883}