mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Introduce rate limiting in PE debug
Introduce debugging rate limiting functionality in PE by using QDF abstraction and use it for the logs which are not needed to be printed very often Change-Id: I9ff5924786519da52917a6c0f14d9c8beabcca53 CRs-Fixed: 2087172
This commit is contained in:
parent
151376c3bf
commit
c13cfaf10f
3 changed files with 36 additions and 7 deletions
|
|
@ -46,6 +46,29 @@
|
|||
#define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
|
||||
#define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x"
|
||||
|
||||
#define pe_log_rate_limited(rate, level, args...) \
|
||||
QDF_TRACE_RATE_LIMITED(rate, QDF_MODULE_ID_PE, level, ## args)
|
||||
#define pe_log_rate_limited_fl(rate, level, format, args...) \
|
||||
pe_log_rate_limited(rate, level, FL(format), ## args)
|
||||
#define pe_alert_rate_limited(rate, format, args...) \
|
||||
pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_FATAL,\
|
||||
format, ## args)
|
||||
#define pe_err_rate_limited(rate, format, args...) \
|
||||
pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_ERROR,\
|
||||
format, ## args)
|
||||
#define pe_warn_rate_limited(rate, format, args...) \
|
||||
pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_WARN,\
|
||||
format, ## args)
|
||||
#define pe_notice_rate_limited(rate, format, args...) \
|
||||
pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_INFO,\
|
||||
format, ## args)
|
||||
#define pe_info_rate_limited(rate, format, args...) \
|
||||
pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_INFO,\
|
||||
format, ## args)
|
||||
#define pe_debug_rate_limited(rate, format, args...) \
|
||||
pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_DEBUG,\
|
||||
format, ## args)
|
||||
|
||||
#define pe_log(level, args...) QDF_TRACE(QDF_MODULE_ID_PE, level, ## args)
|
||||
#define pe_logfl(level, format, args...) pe_log(level, FL(format), ## args)
|
||||
|
||||
|
|
|
|||
|
|
@ -6697,7 +6697,7 @@ void lim_update_extcap_struct(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
|
||||
if (DOT11F_EID_EXTCAP != buf[0] || buf[1] > DOT11F_IE_EXTCAP_MAX_LEN) {
|
||||
pe_warn("Invalid IEs eid: %d elem_len: %d",
|
||||
pe_debug_rate_limited(30, "Invalid IEs eid: %d elem_len: %d",
|
||||
buf[0], buf[1]);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2146,7 +2146,8 @@ sir_convert_probe_req_frame2_struct(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
if (!pr.SuppRates.present) {
|
||||
pe_warn("Mandatory IE Supported Rates not present!");
|
||||
pe_debug_rate_limited(30,
|
||||
"Mandatory IE Supported Rates not present!");
|
||||
return eSIR_FAILURE;
|
||||
} else {
|
||||
pProbeReq->suppRatesPresent = 1;
|
||||
|
|
@ -2400,7 +2401,8 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
if (!pr->SuppRates.present) {
|
||||
pe_warn("Mandatory IE Supported Rates not present!");
|
||||
pe_debug_rate_limited(30,
|
||||
"Mandatory IE Supported Rates not present!");
|
||||
} else {
|
||||
pProbeResp->suppRatesPresent = 1;
|
||||
convert_supp_rates(pMac, &pProbeResp->supportedRates,
|
||||
|
|
@ -2981,7 +2983,8 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac,
|
|||
|
||||
if (!ar->SuppRates.present) {
|
||||
pAssocRsp->suppRatesPresent = 0;
|
||||
pe_warn("Mandatory IE Supported Rates not present!");
|
||||
pe_debug_rate_limited(30,
|
||||
"Mandatory IE Supported Rates not present!");
|
||||
} else {
|
||||
pAssocRsp->suppRatesPresent = 1;
|
||||
convert_supp_rates(pMac, &pAssocRsp->supportedRates,
|
||||
|
|
@ -3372,7 +3375,8 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
if (!pBies->SuppRates.present) {
|
||||
pe_warn("Mandatory IE Supported Rates not present!");
|
||||
pe_debug_rate_limited(30,
|
||||
"Mandatory IE Supported Rates not present!");
|
||||
} else {
|
||||
eseBcnReportMandatoryIe.suppRatesPresent = 1;
|
||||
convert_supp_rates(pMac, &eseBcnReportMandatoryIe.supportedRates,
|
||||
|
|
@ -3650,7 +3654,8 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
if (!pBies->SuppRates.present) {
|
||||
pe_warn("Mandatory IE Supported Rates not present!");
|
||||
pe_debug_rate_limited(30,
|
||||
"Mandatory IE Supported Rates not present!");
|
||||
} else {
|
||||
pBeaconStruct->suppRatesPresent = 1;
|
||||
convert_supp_rates(pMac, &pBeaconStruct->supportedRates,
|
||||
|
|
@ -3987,7 +3992,8 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
if (!pBeacon->SuppRates.present) {
|
||||
pe_warn("Mandatory IE Supported Rates not present!");
|
||||
pe_debug_rate_limited(30,
|
||||
"Mandatory IE Supported Rates not present!");
|
||||
} else {
|
||||
pBeaconStruct->suppRatesPresent = 1;
|
||||
convert_supp_rates(pMac, &pBeaconStruct->supportedRates,
|
||||
|
|
|
|||
Loading…
Reference in a new issue