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
This commit is contained in:
Alan Chen 2020-05-26 14:07:37 -07:00 committed by nshrivas
parent 6f9314eebe
commit 36a60df68b
3 changed files with 10 additions and 6 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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) {