From 5ff0375477e936bdde26fc092f49749cc90ce38e Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Fri, 11 Jan 2019 17:26:47 +0530 Subject: [PATCH] qcacld-3.0: Enable beacon reception stats only if sys is enabled In some platforms sysfs entry is not enabled, beacon reception stats which is dependent on sysfs is not correctly protected under sysfs definition this can lead to symbol missing error in these platforms. WARNING: "hdd_sysfs_destroy_adapter_root_obj" WARNING: "hdd_sysfs_create_adapter_root_obj" Also when the CONFIG_MOBILE_ROUTER is disabled there is an skip_acs_scan_timer leak. skip_acs_scan_timer is initialized in the ACTIVE_DOMAIN, move it to the INIT_DOMAIN to resolve the timer leak. Change-Id: I75fb97aa69d7f84ead4a8b693123162d9940d78c CRs-Fixed: 2379766 --- configs/default_defconfig | 4 ++-- core/hdd/src/wlan_hdd_main.c | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/configs/default_defconfig b/configs/default_defconfig index d9855103c637..d02b4b611d46 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -103,6 +103,8 @@ ifneq ($(CONFIG_MOBILE_ROUTER), y) CONFIG_QCOM_TDLS := y CONFIG_WLAN_SYSFS := y +#Enable Beacon Reception Stats +CONFIG_FEATURE_BECN_STATS := y endif CONFIG_QCACLD_FEATURE_GREEN_AP := y @@ -725,5 +727,3 @@ ifeq ($(CONFIG_CMN_VDEV_MLME_SM), y) #Enable STATE MACHINE HISTORY CONFIG_SM_ENG_HIST := n endif -#Enable Beacon Reception Stats -CONFIG_FEATURE_BECN_STATS := y diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 26818a2e02d5..f212d4168b95 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11895,6 +11895,16 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx) hdd_driver_memdump_init(); hdd_bus_bandwidth_init(hdd_ctx); +#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE + status = qdf_mc_timer_init(&hdd_ctx->skip_acs_scan_timer, + QDF_TIMER_TYPE_SW, + hdd_skip_acs_scan_timer_handler, + hdd_ctx); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("Failed to init ACS Skip timer"); + qdf_spinlock_create(&hdd_ctx->acs_skip_lock); +#endif + errno = hdd_wlan_start_modules(hdd_ctx, false); if (errno) { hdd_err("Failed to start modules; errno:%d", errno); @@ -11937,17 +11947,6 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx) wlan_hdd_update_11n_mode(hdd_ctx->config); -#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE - status = qdf_mc_timer_init(&hdd_ctx->skip_acs_scan_timer, - QDF_TIMER_TYPE_SW, - hdd_skip_acs_scan_timer_handler, - hdd_ctx); - if (QDF_IS_STATUS_ERROR(status)) - hdd_err("Failed to init ACS Skip timer"); - - qdf_spinlock_create(&hdd_ctx->acs_skip_lock); -#endif - hdd_lpass_notify_wlan_version(hdd_ctx); errno = hdd_register_notifiers(hdd_ctx);