From 36a60df68bd963dbb6f89077f79b2c3a14e62129 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 26 May 2020 14:07:37 -0700 Subject: [PATCH] qcacld-3.0: Fix dp_trace related compilation issues As part of this change I2e7caec268776a79d7166020c64af93fee2f8aec, the feature flag was not properly defined and there were some compilation issues. Hence, this change is fixing these issues. Also, add unit test ini check in fw unit test command. Change-Id: Ia8dfedec19d4d97c8c100321a0a012ee1a1b6a00 CRs-Fixed: 2695208 --- configs/default_defconfig | 2 -- core/hdd/src/wlan_hdd_sysfs_dp_trace.c | 9 +++++---- core/hdd/src/wlan_hdd_sysfs_unit_test.c | 5 +++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/configs/default_defconfig b/configs/default_defconfig index 71a69baff452..5cbf023fbced 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -196,9 +196,7 @@ ifeq ($(CONFIG_WLAN_SYSFS), y) CONFIG_WLAN_SYSFS_RTS_CTS := y CONFIG_WLAN_TXRX_FW_STATS := y CONFIG_WLAN_TXRX_STATS := y -ifeq ($(CONFIG_DP_TRACE), y) CONFIG_WLAN_SYSFS_DP_TRACE := y -endif CONFIG_WLAN_SYSFS_STATS := y CONFIG_WLAN_GET_RANGE_EXT := y ifeq ($(CONFIG_QCOM_TDLS), y) diff --git a/core/hdd/src/wlan_hdd_sysfs_dp_trace.c b/core/hdd/src/wlan_hdd_sysfs_dp_trace.c index f743d6e5511f..dfd133147803 100644 --- a/core/hdd/src/wlan_hdd_sysfs_dp_trace.c +++ b/core/hdd/src/wlan_hdd_sysfs_dp_trace.c @@ -190,7 +190,7 @@ static ssize_t hdd_sysfs_dump_dp_trace_store(struct kobject *kobj, osif_psoc_sync_op_stop(psoc_sync); - return err_size; + return errno_size; } static ssize_t @@ -227,7 +227,7 @@ static ssize_t hdd_sysfs_dump_dp_trace_show(struct kobject *kobj, osif_psoc_sync_op_stop(psoc_sync); - return err_size; + return errno_size; } static struct kobj_attribute dump_dp_trace_attribute = @@ -291,7 +291,7 @@ hdd_sysfs_clear_dp_trace_store(struct kobject *kobj, osif_psoc_sync_op_stop(psoc_sync); - return err_size; + return errno_size; } static struct kobj_attribute clear_dp_trace_attribute = @@ -332,6 +332,7 @@ hdd_sysfs_dp_trace_destroy(struct kobject *driver_kobject) hdd_err("could not get driver kobject!"); return; } - sysfs_remove_file(driver_kobject, &set_dp_trace_attribute.attr); sysfs_remove_file(driver_kobject, &clear_dp_trace_attribute.attr); + sysfs_remove_file(driver_kobject, &dump_dp_trace_attribute.attr); + sysfs_remove_file(driver_kobject, &set_dp_trace_attribute.attr); } diff --git a/core/hdd/src/wlan_hdd_sysfs_unit_test.c b/core/hdd/src/wlan_hdd_sysfs_unit_test.c index 2436b199805a..963000f1d266 100644 --- a/core/hdd/src/wlan_hdd_sysfs_unit_test.c +++ b/core/hdd/src/wlan_hdd_sysfs_unit_test.c @@ -56,6 +56,11 @@ static ssize_t __hdd_sysfs_unit_test_target_store( if (!wlan_hdd_validate_modules_state(hdd_ctx)) return -EINVAL; + if (!hdd_ctx->config->is_unit_test_framework_enabled) { + hdd_warn_rl("UT framework is disabled"); + return -EINVAL; + } + ret = hdd_sysfs_validate_and_copy_buf(buf_local, sizeof(buf_local), buf, count); if (ret) {