diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 7595215afb..882055520c 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -188,6 +188,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_OPTIMIZE_CA_EVENT);
gen->fw_timeout_crash =
cfg_get(psoc, CFG_CRASH_FW_TIMEOUT);
+ gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG);
mlme_init_pmf_cfg(psoc, gen);
mlme_init_lpass_support_cfg(psoc, gen);
}
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h
index 667f855064..691be467b5 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h
@@ -443,7 +443,37 @@
CFG_VALUE_OR_DEFAULT, \
"ITO Repeat Count")
+/*
+ *
+ * gEnableDebugLog - Enable/Disable the Connection related logs
+ * @Min: 0
+ * @Max: 0xFF
+ * @Default: 0x0F
+ *
+ * This ini is used to enable/disable the connection related logs
+ * 0x1 - Enable mgmt pkt logs (excpet probe req/rsp, beacons).
+ * 0x2 - Enable EAPOL pkt logs.
+ * 0x4 - Enable DHCP pkt logs.
+ * 0x8 - Enable mgmt action frames logs.
+ * 0x0 - Disable all the above connection related logs.
+ * The default value of 0x0F will enable all the above logs
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_ENABLE_DEBUG_PACKET_LOG CFG_INI_UINT( \
+ "gEnableDebugLog", \
+ 0, 0xFF, 0x0F, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Enable debug log")
+
#define CFG_GENERIC_ALL \
+ CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \
CFG(CFG_RTT3_ENABLE) \
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index ccc2015048..0243a343d3 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -628,6 +628,7 @@ struct wlan_mlme_chainmask {
* @fatal_event_trigger: Enable/Disable Fatal Events Trigger
* @optimize_ca_event: Enable/Disable Optimization of CA events
* @fw_timeout_crash: Enable/Disable FW Timeout Crash *
+ * @debug_packet_log: Debug packet log flags
*/
struct wlan_mlme_generic {
enum band_info band_capability;
@@ -649,6 +650,7 @@ struct wlan_mlme_generic {
bool fatal_event_trigger;
bool optimize_ca_event;
bool fw_timeout_crash;
+ uint8_t debug_packet_log;
};
/*
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 456e0cf175..7abf1b458b 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -4751,35 +4751,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_FW_LOG_MAX (CFG_ENABLE_FW_LOG_DIAG)
#define CFG_ENABLE_FW_LOG_DEFAULT (CFG_ENABLE_FW_LOG_WMI)
-/*
- *
- * gEnableDebugLog - Enable/Disable the Connection related logs
- * @Min: 0
- * @Max: 0xFF
- * @Default: 0x0F
- *
- * This ini is used to enable/disable the connection related logs
- * 0x1 - Enable mgmt pkt logs (excpet probe req/rsp, beacons).
- * 0x2 - Enable EAPOL pkt logs.
- * 0x4 - Enable DHCP pkt logs.
- * 0x8 - Enable mgmt action frames logs.
- * 0x0 - Disable all the above connection related logs.
- * The default value of 0x0F will enable all the above logs
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ENABLE_DEBUG_CONNECT_ISSUE "gEnableDebugLog"
-#define CFG_ENABLE_DEBUG_CONNECT_ISSUE_MIN (0)
-#define CFG_ENABLE_DEBUG_CONNECT_ISSUE_MAX (0xFF)
-#define CFG_ENABLE_DEBUG_CONNECT_ISSUE_DEFAULT (0x0F)
-
/* SAR Thermal limit values for 2g and 5g */
#define CFG_SET_TXPOWER_LIMIT2G_NAME "TxPower2g"
@@ -9224,7 +9195,6 @@ struct hdd_config {
uint8_t enableDFSMasterCap;
uint32_t TxPower2g;
uint32_t TxPower5g;
- uint32_t gEnableDebugLog;
bool fDfsPhyerrFilterOffload;
uint8_t gSapPreferredChanLocation;
uint8_t gDisableDfsJapanW53;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 6826c20c7a..3c15cd97ba 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -2006,13 +2006,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_SET_TXPOWER_LIMIT5G_MIN,
CFG_SET_TXPOWER_LIMIT5G_MAX),
- REG_VARIABLE(CFG_ENABLE_DEBUG_CONNECT_ISSUE, WLAN_PARAM_Integer,
- struct hdd_config, gEnableDebugLog,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_DEBUG_CONNECT_ISSUE_DEFAULT,
- CFG_ENABLE_DEBUG_CONNECT_ISSUE_MIN,
- CFG_ENABLE_DEBUG_CONNECT_ISSUE_MAX),
-
REG_VARIABLE(CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME,
WLAN_PARAM_Integer,
struct hdd_config, fDfsPhyerrFilterOffload,
@@ -5308,8 +5301,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
/* Update maximum interfaces information */
smeConfig->csrConfig.max_intf_count = hdd_ctx->max_intf_count;
- smeConfig->csrConfig.fEnableDebugLog = hdd_ctx->config->gEnableDebugLog;
-
smeConfig->csrConfig.enableSelfRecovery =
hdd_ctx->config->enableSelfRecovery;
smeConfig->csrConfig.conc_custom_rule1 =
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index ec318444cb..47eeb580ce 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -5061,13 +5061,9 @@ static int __iw_setint_getnone(struct net_device *dev,
}
case WE_SET_DEBUG_LOG:
{
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-
if (!mac_handle)
return -EINVAL;
-
- hdd_ctx->config->gEnableDebugLog = set_value;
sme_update_connect_debug(mac_handle, set_value);
break;
}
diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h
index 4ab9caf91f..2192807ab1 100644
--- a/core/mac/inc/ani_global.h
+++ b/core/mac/inc/ani_global.h
@@ -867,7 +867,6 @@ typedef struct sAniSirGlobal {
bool pmf_offload;
bool is_fils_roaming_supported;
uint8_t f_prefer_non_dfs_on_radar;
- uint32_t fEnableDebugLog;
uint32_t f_sta_miracast_mcc_rest_time_val;
#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
csr_readyToExtWoWCallback readyToExtWoWCallback;
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index ebcc04eda9..53e70f23b9 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -1188,7 +1188,7 @@ lim_handle80211_frames(tpAniSirGlobal pMac, struct scheduler_msg *limMsg,
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR, pHdr,
WMA_GET_RX_MPDU_HEADER_LEN(pRxPacketInfo));
#endif
- if (pMac->fEnableDebugLog & 0x1) {
+ if (pMac->mlme_cfg->gen.debug_packet_log & 0x1) {
if ((fc.type == SIR_MAC_MGMT_FRAME) &&
(fc.subType != SIR_MAC_MGMT_PROBE_REQ) &&
(fc.subType != SIR_MAC_MGMT_PROBE_RSP) &&
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 589447af51..c68c37922f 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1182,7 +1182,6 @@ typedef struct tagCsrConfigParam {
uint8_t max_scan_count;
int8_t first_scan_bucket_threshold;
- uint8_t fEnableDebugLog;
uint8_t max_intf_count;
bool enableSelfRecovery;
uint32_t f_sta_miracast_mcc_rest_time_val;
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index a73ad43bb0..51f5ec436e 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -10676,7 +10676,7 @@ QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value)
QDF_STATUS status = QDF_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- pMac->fEnableDebugLog = set_value;
+ pMac->mlme_cfg->gen.debug_packet_log = set_value;
return status;
}
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 41ee2b3f24..6d45e01434 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -3068,8 +3068,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.scan_adaptive_dwell_mode_nc =
pParam->scan_adaptive_dwell_mode_nc;
- pMac->fEnableDebugLog = pParam->fEnableDebugLog;
-
/* update interface configuration */
pMac->sme.max_intf_count = pParam->max_intf_count;
@@ -3329,7 +3327,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->is_ps_enabled = pMac->sme.ps_global_info.ps_enabled;
pParam->auto_bmps_timer_val =
pMac->sme.ps_global_info.auto_bmps_timer_val;
- pParam->fEnableDebugLog = pMac->fEnableDebugLog;
pParam->f_sta_miracast_mcc_rest_time_val =
pMac->f_sta_miracast_mcc_rest_time_val;
pParam->enableHtSmps = pMac->roam.configParam.enableHtSmps;
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index c9a81a0669..3e3c2bf9df 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -2735,7 +2735,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
} else {
chanfreq = 0;
}
- if (pMac->fEnableDebugLog & 0x1) {
+ if (pMac->mlme_cfg->gen.debug_packet_log & 0x1) {
if ((pFc->type == SIR_MAC_MGMT_FRAME) &&
(pFc->subType != SIR_MAC_MGMT_PROBE_REQ) &&
(pFc->subType != SIR_MAC_MGMT_PROBE_RSP)) {