summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishank Aggarwal <naggar@codeaurora.org>2017-03-09 16:47:36 +0530
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-10 19:32:11 -0800
commit6f59f02c370a30b5d86a611ef5031a3928644273 (patch)
tree50a4f03ebbe35d91b49cce99c8e1703b61b8ad66
parent1ab6b5a96a07705b3c86be5b565b18fea6d256ab (diff)
qcacld-3.0: Reduce the log spam in lim_process_cfg_updates.c
Move the logs to appropriate log levels to reduce the log spam in lim_process_cfg_updates.c Change-Id: Ib21d3082f0e1e9c28186ff80fffe8c1aaaf6ab09 CRs-Fixed: 1093093
-rw-r--r--core/mac/src/pe/lim/lim_process_cfg_updates.c113
1 files changed, 44 insertions, 69 deletions
diff --git a/core/mac/src/pe/lim/lim_process_cfg_updates.c b/core/mac/src/pe/lim/lim_process_cfg_updates.c
index 7f4c16e2ac6f..ff368b600b55 100644
--- a/core/mac/src/pe/lim/lim_process_cfg_updates.c
+++ b/core/mac/src/pe/lim/lim_process_cfg_updates.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -53,10 +53,10 @@ static void lim_set_default_key_id_and_keys(tpAniSirGlobal pMac)
#ifdef FIXME_GEN6
uint32_t val;
uint32_t dkCfgId;
- PELOG1(lim_log(pMac, LOG1, FL("Setting default keys at SP"));)
+ lim_log(pMac, LOGD, FL("Setting default keys at SP"));
if (wlan_cfg_get_int(pMac, WNI_CFG_WEP_DEFAULT_KEYID,
&val) != eSIR_SUCCESS) {
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL("Unable to retrieve defaultKeyId from CFG"));
}
dkCfgId = limGetCfgIdOfDefaultKeyid(val);
@@ -79,7 +79,7 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
qdf_mem_set((void *)&pesessionEntry->cfgProtection,
sizeof(tCfgProtection), 0);
else {
- lim_log(pMac, LOG1,
+ lim_log(pMac, LOGD,
FL(" frm11a = %d, from11b = %d, frm11g = %d, "
"ht20 = %d, nongf = %d, lsigTxop = %d, "
"rifs = %d, obss = %d"),
@@ -95,7 +95,7 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
} else {
if (wlan_cfg_get_int(pMac, WNI_CFG_FORCE_POLICY_PROTECTION, &val)
!= eSIR_SUCCESS) {
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL
("reading WNI_CFG_FORCE_POLICY_PROTECTION cfg failed"));
return;
@@ -104,7 +104,8 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
if (wlan_cfg_get_int(pMac, WNI_CFG_PROTECTION_ENABLED, &val) !=
eSIR_SUCCESS) {
- lim_log(pMac, LOGP, FL("reading protection cfg failed"));
+ lim_log(pMac, LOGE,
+ FL("reading protection cfg failed"));
return;
}
@@ -159,9 +160,8 @@ void lim_handle_param_update(tpAniSirGlobal pMac, eUpdateIEsType cfgId)
tSirMsgQ msg = { 0 };
uint32_t status;
- PELOG3(lim_log
- (pMac, LOG3, FL("Handling CFG parameter id %X update"), cfgId);
- )
+ lim_log(pMac, LOGD, FL("Handling CFG parameter id %X update"), cfgId);
+
switch (cfgId) {
case eUPDATE_IE_PROBE_BCN:
{
@@ -169,10 +169,8 @@ void lim_handle_param_update(tpAniSirGlobal pMac, eUpdateIEsType cfgId)
status = lim_post_msg_api(pMac, &msg);
if (status != TX_SUCCESS)
- PELOGE(lim_log
- (pMac, LOGE,
- FL("Failed lim_post_msg_api %u"), status);
- )
+ lim_log(pMac, LOGE,
+ FL("Failed lim_post_msg_api %u"), status);
break;
}
default:
@@ -208,9 +206,8 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
uint16_t val16;
tSirMacHTParametersInfo *pAmpduParamInfo;
- PELOG3(lim_log
- (pMac, LOG3, FL("Handling CFG parameter id %X update"), cfgId);
- )
+ lim_log(pMac, LOGD, FL("Handling CFG parameter id %X update"), cfgId);
+
switch (cfgId) {
case WNI_CFG_WEP_DEFAULT_KEYID:
@@ -225,11 +222,9 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
case WNI_CFG_EXCLUDE_UNENCRYPTED:
if (wlan_cfg_get_int(pMac, WNI_CFG_EXCLUDE_UNENCRYPTED,
&val1) != eSIR_SUCCESS) {
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL("Unable to retrieve excludeUnencr from CFG"));
}
- lim_log(pMac, LOGE,
- FL("Unsupported CFG: WNI_CFG_EXCLUDE_UNENCRYPTED"));
break;
@@ -255,28 +250,22 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
status = lim_post_msg_api(pMac, &msg);
if (status != TX_SUCCESS)
- PELOGE(lim_log
- (pMac, LOGE,
- FL("Failed lim_post_msg_api %u"), status);
- )
+ lim_log(pMac, LOGE,
+ FL("Failed lim_post_msg_api %u"), status);
break;
}
case WNI_CFG_MPDU_DENSITY:
if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &val1) !=
eSIR_SUCCESS) {
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not retrieve HT AMPDU Param CFG"));
- )
+ lim_log(pMac, LOGE,
+ FL("could not retrieve HT AMPDU Param CFG"));
break;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_MPDU_DENSITY, &val2) !=
eSIR_SUCCESS) {
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not retrieve MPDU Density CFG"));
- )
+ lim_log(pMac, LOGE,
+ FL("could not retrieve MPDU Density CFG"));
break;
}
val16 = (uint16_t) val1;
@@ -285,27 +274,20 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
if (cfg_set_int
(pMac, WNI_CFG_HT_AMPDU_PARAMS,
*(uint8_t *) pAmpduParamInfo) != eSIR_SUCCESS)
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not update HT AMPDU Param CFG"));
- )
-
+ lim_log(pMac, LOGE,
+ FL("could not update HT AMPDU Param CFG"));
break;
case WNI_CFG_MAX_RX_AMPDU_FACTOR:
if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &val1) !=
eSIR_SUCCESS) {
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not retrieve HT AMPDU Param CFG"));
- )
+ lim_log(pMac, LOGE,
+ FL("could not retrieve HT AMPDU Param CFG"));
break;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_MAX_RX_AMPDU_FACTOR, &val2) !=
eSIR_SUCCESS) {
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not retrieve AMPDU Factor CFG"));
- )
+ lim_log(pMac, LOGE,
+ FL("could not retrieve AMPDU Factor CFG"));
break;
}
val16 = (uint16_t) val1;
@@ -314,19 +296,15 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
if (cfg_set_int
(pMac, WNI_CFG_HT_AMPDU_PARAMS,
*(uint8_t *) pAmpduParamInfo) != eSIR_SUCCESS)
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not update HT AMPDU Param CFG"));
- )
+ lim_log(pMac, LOGE,
+ FL("could not update HT AMPDU Param CFG"));
break;
case WNI_CFG_DOT11_MODE:
if (wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &val1) !=
eSIR_SUCCESS) {
- PELOGE(lim_log
- (pMac, LOGE,
- FL("could not retrieve Dot11 Mode CFG"));
- )
+ lim_log(pMac, LOGE,
+ FL("could not retrieve Dot11 Mode CFG"));
break;
}
break;
@@ -379,7 +357,7 @@ void lim_apply_configuration(tpAniSirGlobal pMac, tpPESession psessionEntry)
{
uint32_t val = 0, phyMode;
- PELOG2(lim_log(pMac, LOG2, FL("Applying config"));)
+ lim_log(pMac, LOGD, FL("Applying config"));
psessionEntry->limSentCapsChangeNtf = false;
@@ -402,10 +380,8 @@ void lim_apply_configuration(tpAniSirGlobal pMac, tpPESession psessionEntry)
as a part of join request for a BT-AMP station */
if (psessionEntry->statypeForBss == STA_ENTRY_SELF) {
- PELOG1(lim_log
- (pMac, LOG1,
- FL("Initializing BT-AMP beacon generation"));
- )
+ lim_log(pMac, LOGD,
+ FL("Initializing BT-AMP beacon generation"));
sch_set_beacon_interval(pMac, psessionEntry);
sch_set_fixed_beacon_fields(pMac, psessionEntry);
}
@@ -413,14 +389,13 @@ void lim_apply_configuration(tpAniSirGlobal pMac, tpPESession psessionEntry)
if (wlan_cfg_get_int(pMac, WNI_CFG_SCAN_IN_POWERSAVE, &val) !=
eSIR_SUCCESS) {
- lim_log(pMac, LOGP,
+ lim_log(pMac, LOGE,
FL("could not retrieve WNI_CFG_SCAN_IN_POWERSAVE"));
return;
}
- PELOG1(lim_log(pMac, LOG1, FL("pMac->lim.gScanInPowersave = %hu"),
+ lim_log(pMac, LOGD, FL("pMac->lim.gScanInPowersave = %hu"),
pMac->lim.gScanInPowersave);
- )
pMac->lim.gScanInPowersave = (uint8_t) val;
} /*** end lim_apply_configuration() ***/
@@ -449,7 +424,7 @@ static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry)
sir_copy_mac_addr(pMac->lim.gLimMyMacAddr, psessionEntry->selfMacAddr);
if (wlan_cfg_get_int(pMac, WNI_CFG_SHORT_PREAMBLE, &val) != eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("cfg get short preamble failed"));
+ lim_log(pMac, LOGE, FL("cfg get short preamble failed"));
psessionEntry->beaconParams.fShortPreamble = (val) ? 1 : 0;
/* In STA case this parameter is filled during the join request */
@@ -457,27 +432,27 @@ static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry)
LIM_IS_IBSS_ROLE(psessionEntry)) {
if (wlan_cfg_get_int(pMac, WNI_CFG_WME_ENABLED, &val) !=
eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("cfg get wme enabled failed"));
+ lim_log(pMac, LOGE, FL("cfg get wme enabled failed"));
psessionEntry->limWmeEnabled = (val) ? 1 : 0;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_WSM_ENABLED, &val) != eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("cfg get wsm enabled failed"));
+ lim_log(pMac, LOGE, FL("cfg get wsm enabled failed"));
psessionEntry->limWsmEnabled = (val) ? 1 : 0;
if ((!psessionEntry->limWmeEnabled) && (psessionEntry->limWsmEnabled)) {
- PELOGE(lim_log(pMac, LOGE, FL("Can't enable WSM without WME"));)
+ lim_log(pMac, LOGE, FL("Can't enable WSM without WME"));
psessionEntry->limWsmEnabled = 0;
}
/* In STA , this parameter is filled during the join request */
if (LIM_IS_AP_ROLE(psessionEntry) || LIM_IS_IBSS_ROLE(psessionEntry)) {
if (wlan_cfg_get_int(pMac, WNI_CFG_QOS_ENABLED, &val) !=
eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("cfg get qos enabled failed"));
+ lim_log(pMac, LOGE, FL("cfg get qos enabled failed"));
psessionEntry->limQosEnabled = (val) ? 1 : 0;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_HCF_ENABLED, &val) != eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("cfg get hcf enabled failed"));
+ lim_log(pMac, LOGE, FL("cfg get hcf enabled failed"));
psessionEntry->limHcfEnabled = (val) ? 1 : 0;
/* AP: WSM should enable HCF as well, for STA enable WSM only after */
@@ -486,13 +461,13 @@ static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry)
psessionEntry->limHcfEnabled = 1;
if (wlan_cfg_get_int(pMac, WNI_CFG_11D_ENABLED, &val) != eSIR_SUCCESS)
- lim_log(pMac, LOGP, FL("cfg get 11d enabled failed"));
+ lim_log(pMac, LOGE, FL("cfg get 11d enabled failed"));
psessionEntry->lim11dEnabled = (val) ? 1 : 0;
if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val) != eSIR_SUCCESS) {
- lim_log(pMac, LOGP, FL("cfg get assoc sta limit failed"));
+ lim_log(pMac, LOGE, FL("cfg get assoc sta limit failed"));
}
pMac->lim.gLimAssocStaLimit = (uint16_t) val;
- PELOG1(lim_log(pMac, LOG1, FL("Updated Lim shadow state based on CFG"));)
+ lim_log(pMac, LOGD, FL("Updated Lim shadow state based on CFG"));
}