blob: 601a5e0dd20be1cb4ae0afbc80cd656495119f1d [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Rajeev Kumar416b73f2017-01-21 16:45:21 -08002 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -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.
20 */
21
22/*
23 * 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/*
29 * This file lim_process_cfg_updates.cc contains the utility functions
30 * to handle various CFG parameter update events
31 * Author: Chandra Modumudi
32 * Date: 01/20/03
33 * History:-
34 * Date Modified by Modification Information
35 * --------------------------------------------------------------------
36 */
37
38#include "ani_global.h"
39
40#include "wni_cfg.h"
41#include "sir_mac_prot_def.h"
42#include "cfg_api.h"
43#include "lim_types.h"
44#include "lim_utils.h"
45#include "lim_prop_exts_utils.h"
46#include "sch_api.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080047#include "rrm_api.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080048
49static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry);
50
51static void lim_set_default_key_id_and_keys(tpAniSirGlobal pMac)
52{
53#ifdef FIXME_GEN6
54 uint32_t val;
55 uint32_t dkCfgId;
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -070056
57 pe_debug("Setting default keys at SP");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080058 if (wlan_cfg_get_int(pMac, WNI_CFG_WEP_DEFAULT_KEYID,
59 &val) != eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -070060 pe_err("Unable to retrieve defaultKeyId from CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080061 }
62 dkCfgId = limGetCfgIdOfDefaultKeyid(val);
63#endif
64
65} /*** end lim_set_default_key_id_and_keys() ***/
66/** -------------------------------------------------------------
67 \fn lim_set_cfg_protection
68 \brief sets lim global cfg cache from the config.
69 \param tpAniSirGlobal pMac
70 \return None
71 -------------------------------------------------------------*/
72void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
73{
74 uint32_t val = 0;
75
76 if (pesessionEntry != NULL && LIM_IS_AP_ROLE(pesessionEntry)) {
77 if (pesessionEntry->gLimProtectionControl ==
78 WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
Anurag Chouhan600c3a02016-03-01 10:33:54 +053079 qdf_mem_set((void *)&pesessionEntry->cfgProtection,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080080 sizeof(tCfgProtection), 0);
81 else {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -070082 pe_debug("frm11a = %d, from11b = %d, frm11g = %d, "
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080083 "ht20 = %d, nongf = %d, lsigTxop = %d, "
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -070084 "rifs = %d, obss = %d",
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080085 pesessionEntry->cfgProtection.fromlla,
86 pesessionEntry->cfgProtection.fromllb,
87 pesessionEntry->cfgProtection.fromllg,
88 pesessionEntry->cfgProtection.ht20,
89 pesessionEntry->cfgProtection.nonGf,
90 pesessionEntry->cfgProtection.lsigTxop,
91 pesessionEntry->cfgProtection.rifs,
92 pesessionEntry->cfgProtection.obss);
93 }
94 } else {
95 if (wlan_cfg_get_int(pMac, WNI_CFG_FORCE_POLICY_PROTECTION, &val)
96 != eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -070097 pe_err("reading WNI_CFG_FORCE_POLICY_PROTECTION cfg failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080098 return;
99 } else
100 pMac->lim.gLimProtectionControl = (uint8_t) val;
101
102 if (wlan_cfg_get_int(pMac, WNI_CFG_PROTECTION_ENABLED, &val) !=
103 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700104 pe_err("reading protection cfg failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800105 return;
106 }
107
108 if (pMac->lim.gLimProtectionControl ==
109 WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
Anurag Chouhan600c3a02016-03-01 10:33:54 +0530110 qdf_mem_set((void *)&pMac->lim.cfgProtection,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800111 sizeof(tCfgProtection), 0);
112 else {
113 pMac->lim.cfgProtection.fromlla =
114 (val >> WNI_CFG_PROTECTION_ENABLED_FROM_llA) & 1;
115 pMac->lim.cfgProtection.fromllb =
116 (val >> WNI_CFG_PROTECTION_ENABLED_FROM_llB) & 1;
117 pMac->lim.cfgProtection.fromllg =
118 (val >> WNI_CFG_PROTECTION_ENABLED_FROM_llG) & 1;
119 pMac->lim.cfgProtection.ht20 =
120 (val >> WNI_CFG_PROTECTION_ENABLED_HT_20) & 1;
121 pMac->lim.cfgProtection.nonGf =
122 (val >> WNI_CFG_PROTECTION_ENABLED_NON_GF) & 1;
123 pMac->lim.cfgProtection.lsigTxop =
124 (val >> WNI_CFG_PROTECTION_ENABLED_LSIG_TXOP) & 1;
125 pMac->lim.cfgProtection.rifs =
126 (val >> WNI_CFG_PROTECTION_ENABLED_RIFS) & 1;
127 pMac->lim.cfgProtection.obss =
128 (val >> WNI_CFG_PROTECTION_ENABLED_OBSS) & 1;
129
130 }
131 }
132}
133
134/**
135 * lim_handle_param_update()
136 *
137 ***FUNCTION:
138 * This function is use to post a message whenever need indicate
139 * there is update of config parameter.
140 *
141 ***PARAMS:
142 *
143 ***LOGIC:
144 *
145 ***ASSUMPTIONS:
146 * NA
147 *
148 ***NOTE:
149 *
150 * @param pMac - Pointer to Global MAC structure
151 * @param cfgId - ID of CFG parameter that got updated
152 * @return None
153 */
154void lim_handle_param_update(tpAniSirGlobal pMac, eUpdateIEsType cfgId)
155{
Rajeev Kumar416b73f2017-01-21 16:45:21 -0800156 struct scheduler_msg msg = { 0 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800157 uint32_t status;
158
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700159 pe_debug("Handling CFG parameter id %X update", cfgId);
160
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800161 switch (cfgId) {
162 case eUPDATE_IE_PROBE_BCN:
163 {
164 msg.type = SIR_LIM_UPDATE_BEACON;
165 status = lim_post_msg_api(pMac, &msg);
166
167 if (status != TX_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700168 pe_err("Failed lim_post_msg_api %u", status);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800169 break;
170 }
171 default:
172 break;
173 }
174}
175
176/**
177 * lim_handle_cf_gparam_update()
178 *
179 ***FUNCTION:
180 * This function is called by lim_process_messages() to
181 * whenever SIR_CFG_PARAM_UPDATE_IND message is posted
182 * to LIM (due to a set operation on a CFG parameter).
183 *
184 ***PARAMS:
185 *
186 ***LOGIC:
187 *
188 ***ASSUMPTIONS:
189 * NA
190 *
191 ***NOTE:
192 *
193 * @param pMac - Pointer to Global MAC structure
194 * @param cfgId - ID of CFG parameter that got updated
195 * @return None
196 */
197
198void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
199{
200 uint32_t val1, val2;
201 uint16_t val16;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800202 tSirMacHTParametersInfo *pAmpduParamInfo;
203
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700204 pe_debug("Handling CFG parameter id %X update", cfgId);
205
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800206 switch (cfgId) {
207 case WNI_CFG_WEP_DEFAULT_KEYID:
208
209 /* !!LAC - when the default KeyID is changed, force all of the */
210 /* keys and the keyID to be reprogrammed. this allows the */
211 /* keys to change after the initial setting of the keys when the CFG was */
212 /* applied at association time through CFG changes of the keys. */
213 lim_set_default_key_id_and_keys(pMac);
214
215 break;
216
217 case WNI_CFG_EXCLUDE_UNENCRYPTED:
218 if (wlan_cfg_get_int(pMac, WNI_CFG_EXCLUDE_UNENCRYPTED,
219 &val1) != eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700220 pe_err("Unable to retrieve excludeUnencr from CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800221 }
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700222 pe_err("Unsupported CFG: WNI_CFG_EXCLUDE_UNENCRYPTED");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800223
224 break;
225
226 case WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT:
227 if (pMac->lim.gLimMlmState != eLIM_MLM_WT_ASSOC_RSP_STATE) {
228 /* 'Change' timer for future activations */
229 lim_deactivate_and_change_timer(pMac,
230 eLIM_ASSOC_FAIL_TIMER);
231 }
232
233 break;
234
235 case WNI_CFG_PROTECTION_ENABLED:
236 lim_set_cfg_protection(pMac, NULL);
237 break;
238 case WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG:
239 {
Rajeev Kumar416b73f2017-01-21 16:45:21 -0800240 struct scheduler_msg msg = { 0 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800241 uint32_t status;
242
243 msg.type = SIR_LIM_UPDATE_BEACON;
244
245 status = lim_post_msg_api(pMac, &msg);
246
247 if (status != TX_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700248 pe_err("Failed lim_post_msg_api %u", status);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800249 break;
250 }
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800251
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800252 case WNI_CFG_MPDU_DENSITY:
253 if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &val1) !=
254 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700255 pe_err("could not retrieve HT AMPDU Param CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800256 break;
257 }
258 if (wlan_cfg_get_int(pMac, WNI_CFG_MPDU_DENSITY, &val2) !=
259 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700260 pe_err("could not retrieve MPDU Density CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800261 break;
262 }
263 val16 = (uint16_t) val1;
264 pAmpduParamInfo = (tSirMacHTParametersInfo *) &val16;
265 pAmpduParamInfo->mpduDensity = (uint8_t) val2;
266 if (cfg_set_int
267 (pMac, WNI_CFG_HT_AMPDU_PARAMS,
268 *(uint8_t *) pAmpduParamInfo) != eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700269 pe_err("could not update HT AMPDU Param CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800270 break;
271 case WNI_CFG_MAX_RX_AMPDU_FACTOR:
272 if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &val1) !=
273 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700274 pe_err("could not retrieve HT AMPDU Param CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800275 break;
276 }
277 if (wlan_cfg_get_int(pMac, WNI_CFG_MAX_RX_AMPDU_FACTOR, &val2) !=
278 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700279 pe_err("could not retrieve AMPDU Factor CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800280 break;
281 }
282 val16 = (uint16_t) val1;
283 pAmpduParamInfo = (tSirMacHTParametersInfo *) &val16;
284 pAmpduParamInfo->maxRxAMPDUFactor = (uint8_t) val2;
285 if (cfg_set_int
286 (pMac, WNI_CFG_HT_AMPDU_PARAMS,
287 *(uint8_t *) pAmpduParamInfo) != eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700288 pe_err("could not update HT AMPDU Param CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800289 break;
290
291 case WNI_CFG_DOT11_MODE:
292 if (wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &val1) !=
293 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700294 pe_err("could not retrieve Dot11 Mode CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800295 break;
296 }
297 break;
298
299 case WNI_CFG_SCAN_IN_POWERSAVE:
300 if (wlan_cfg_get_int(pMac, WNI_CFG_SCAN_IN_POWERSAVE, &val1) !=
301 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700302 pe_err("Unable to get WNI_CFG_SCAN_IN_POWERSAVE");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800303 break;
304 }
305 pMac->lim.gScanInPowersave = (uint8_t) val1;
306 break;
307
308 case WNI_CFG_ASSOC_STA_LIMIT:
309 if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val1) !=
310 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700311 pe_err("Unable to get WNI_CFG_ASSOC_STA_LIMIT");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800312 break;
313 }
314 pMac->lim.gLimAssocStaLimit = (uint16_t) val1;
315 break;
316 default:
317 break;
318 }
319} /*** end lim_handle_cf_gparam_update() ***/
320
321/**
322 * lim_apply_configuration()
323 *
324 ***FUNCTION:
325 * This function is called to apply the configured parameters
326 * before joining or reassociating with a BSS or starting a BSS.
327 *
328 ***PARAMS:
329 *
330 ***LOGIC:
331 *
332 ***ASSUMPTIONS:
333 * NA
334 *
335 ***NOTE:
336 *
337 * @param pMac - Pointer to Global MAC structure
338 * @return None
339 */
340
341void lim_apply_configuration(tpAniSirGlobal pMac, tpPESession psessionEntry)
342{
343 uint32_t val = 0, phyMode;
344
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700345 pe_debug("Applying config");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800346
347 psessionEntry->limSentCapsChangeNtf = false;
348
349 lim_get_phy_mode(pMac, &phyMode, psessionEntry);
350
351 /* Set default keyId and keys */
352 lim_set_default_key_id_and_keys(pMac);
353
354 lim_update_config(pMac, psessionEntry);
355
356 lim_get_short_slot_from_phy_mode(pMac, psessionEntry, phyMode,
357 &psessionEntry->shortSlotTimeSupported);
358
359 lim_set_cfg_protection(pMac, psessionEntry);
360
361 /* Added for BT - AMP Support */
362 if (LIM_IS_AP_ROLE(psessionEntry) ||
Rajeev Kumarcf835a02016-04-15 15:01:31 -0700363 LIM_IS_IBSS_ROLE(psessionEntry)) {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800364 /* This check is required to ensure the beacon generation is not done
365 as a part of join request for a BT-AMP station */
366
367 if (psessionEntry->statypeForBss == STA_ENTRY_SELF) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700368 pe_debug("Initializing BT-AMP beacon generation");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800369 sch_set_beacon_interval(pMac, psessionEntry);
370 sch_set_fixed_beacon_fields(pMac, psessionEntry);
371 }
372 }
373
374 if (wlan_cfg_get_int(pMac, WNI_CFG_SCAN_IN_POWERSAVE, &val) !=
375 eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700376 pe_err("could not retrieve WNI_CFG_SCAN_IN_POWERSAVE");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800377 return;
378 }
379
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700380 pe_debug("pMac->lim.gScanInPowersave = %hu",
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800381 pMac->lim.gScanInPowersave);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800382 pMac->lim.gScanInPowersave = (uint8_t) val;
383
384} /*** end lim_apply_configuration() ***/
385
386/**
387 * lim_update_config
388 *
389 * FUNCTION:
390 * Update the local state from CFG database
391 * (This used to be dphUpdateConfig)
392 *
393 * LOGIC:
394 *
395 * ASSUMPTIONS:
396 *
397 * NOTE:
398 *
399 * @param None
400 * @return None
401 */
402
403static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry)
404{
405 uint32_t val;
406
407 sir_copy_mac_addr(pMac->lim.gLimMyMacAddr, psessionEntry->selfMacAddr);
408
409 if (wlan_cfg_get_int(pMac, WNI_CFG_SHORT_PREAMBLE, &val) != eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700410 pe_err("cfg get short preamble failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800411 psessionEntry->beaconParams.fShortPreamble = (val) ? 1 : 0;
412
413 /* In STA case this parameter is filled during the join request */
414 if (LIM_IS_AP_ROLE(psessionEntry) ||
415 LIM_IS_IBSS_ROLE(psessionEntry)) {
416 if (wlan_cfg_get_int(pMac, WNI_CFG_WME_ENABLED, &val) !=
417 eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700418 pe_err("cfg get wme enabled failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800419 psessionEntry->limWmeEnabled = (val) ? 1 : 0;
420 }
421
422 if (wlan_cfg_get_int(pMac, WNI_CFG_WSM_ENABLED, &val) != eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700423 pe_err("cfg get wsm enabled failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800424 psessionEntry->limWsmEnabled = (val) ? 1 : 0;
425
426 if ((!psessionEntry->limWmeEnabled) && (psessionEntry->limWsmEnabled)) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700427 pe_err("Can't enable WSM without WME");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800428 psessionEntry->limWsmEnabled = 0;
429 }
430 /* In STA , this parameter is filled during the join request */
431 if (LIM_IS_AP_ROLE(psessionEntry) || LIM_IS_IBSS_ROLE(psessionEntry)) {
432 if (wlan_cfg_get_int(pMac, WNI_CFG_QOS_ENABLED, &val) !=
433 eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700434 pe_err("cfg get qos enabled failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800435 psessionEntry->limQosEnabled = (val) ? 1 : 0;
436 }
437 if (wlan_cfg_get_int(pMac, WNI_CFG_HCF_ENABLED, &val) != eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700438 pe_err("cfg get hcf enabled failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800439 psessionEntry->limHcfEnabled = (val) ? 1 : 0;
440
441 /* AP: WSM should enable HCF as well, for STA enable WSM only after */
442 /* association response is received */
443 if (psessionEntry->limWsmEnabled && LIM_IS_AP_ROLE(psessionEntry))
444 psessionEntry->limHcfEnabled = 1;
445
446 if (wlan_cfg_get_int(pMac, WNI_CFG_11D_ENABLED, &val) != eSIR_SUCCESS)
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700447 pe_err("cfg get 11d enabled failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800448 psessionEntry->lim11dEnabled = (val) ? 1 : 0;
449
450 if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val) != eSIR_SUCCESS) {
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700451 pe_err("cfg get assoc sta limit failed");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800452 }
453 pMac->lim.gLimAssocStaLimit = (uint16_t) val;
454
Srinivas Girigowdad0a72f92017-03-26 15:41:14 -0700455 pe_debug("Updated Lim shadow state based on CFG");
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800456}