qcacmn: Use abstraction APIs for kernel APIs
Use non-inline OS-abstraction APIs to avoid direct usage of kernel API's. Use non-inline OS-abstraction APIs instead of OS APIs. Change-Id: Ie4acfedc63a0e0e8ecbe358db711148db92bd8b6
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -1711,7 +1711,7 @@ struct iot_sim_dbgfs_file iot_sim_dbgfs_files[IOT_SIM_DEBUGFS_FILE_NUM] = {
|
|||||||
static QDF_STATUS
|
static QDF_STATUS
|
||||||
iot_sim_debugfs_deinit(struct iot_sim_context *isc)
|
iot_sim_debugfs_deinit(struct iot_sim_context *isc)
|
||||||
{
|
{
|
||||||
debugfs_remove_recursive(isc->iot_sim_dbgfs_ctx.iot_sim_dir_de);
|
qdf_debugfs_remove_dir_recursive(isc->iot_sim_dbgfs_ctx.iot_sim_dir_de);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -1791,7 +1791,7 @@ iot_sim_debugfs_init(struct iot_sim_context *isc)
|
|||||||
qdf_mem_zero(buf, sizeof(buf));
|
qdf_mem_zero(buf, sizeof(buf));
|
||||||
snprintf(buf, sizeof(buf), "iot_sim_pdev%u", pdev_id);
|
snprintf(buf, sizeof(buf), "iot_sim_pdev%u", pdev_id);
|
||||||
|
|
||||||
dbgfs_dir = debugfs_create_dir(buf, NULL);
|
dbgfs_dir = qdf_debugfs_create_dir(buf, NULL);
|
||||||
isc->iot_sim_dbgfs_ctx.iot_sim_dir_de = dbgfs_dir;
|
isc->iot_sim_dbgfs_ctx.iot_sim_dir_de = dbgfs_dir;
|
||||||
|
|
||||||
if (!isc->iot_sim_dbgfs_ctx.iot_sim_dir_de) {
|
if (!isc->iot_sim_dbgfs_ctx.iot_sim_dir_de) {
|
||||||
@@ -1800,8 +1800,8 @@ iot_sim_debugfs_init(struct iot_sim_context *isc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < IOT_SIM_DEBUGFS_FILE_NUM; ++i) {
|
for (i = 0; i < IOT_SIM_DEBUGFS_FILE_NUM; ++i) {
|
||||||
de = debugfs_create_file(iot_sim_dbgfs_files[i].name,
|
de = qdf_debugfs_create_entry(iot_sim_dbgfs_files[i].name,
|
||||||
0644,
|
IOT_SIM_DBG_FILE_PERM,
|
||||||
dbgfs_dir, isc,
|
dbgfs_dir, isc,
|
||||||
iot_sim_dbgfs_files[i].ops);
|
iot_sim_dbgfs_files[i].ops);
|
||||||
|
|
||||||
@@ -1816,7 +1816,7 @@ iot_sim_debugfs_init(struct iot_sim_context *isc)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
debugfs_remove_recursive(dbgfs_dir);
|
qdf_debugfs_remove_dir_recursive(dbgfs_dir);
|
||||||
qdf_mem_set(isc->iot_sim_dbgfs_ctx.iot_sim_file_de,
|
qdf_mem_set(isc->iot_sim_dbgfs_ctx.iot_sim_file_de,
|
||||||
sizeof(isc->iot_sim_dbgfs_ctx.iot_sim_file_de), 0);
|
sizeof(isc->iot_sim_dbgfs_ctx.iot_sim_file_de), 0);
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -82,6 +82,11 @@
|
|||||||
#define FRAME_TYPE_IS_BEACON(type, subtype) ((type) == 0 && (subtype) == 8)
|
#define FRAME_TYPE_IS_BEACON(type, subtype) ((type) == 0 && (subtype) == 8)
|
||||||
#define FRAME_TYPE_IS_ACTION(type, subtype) ((type) == 0 && (subtype) == 13)
|
#define FRAME_TYPE_IS_ACTION(type, subtype) ((type) == 0 && (subtype) == 13)
|
||||||
|
|
||||||
|
#define IOT_SIM_DBG_FILE_PERM (QDF_FILE_USR_READ | \
|
||||||
|
QDF_FILE_USR_WRITE | \
|
||||||
|
QDF_FILE_GRP_READ | \
|
||||||
|
QDF_FILE_OTH_READ)
|
||||||
|
|
||||||
enum iot_sim_action_cat_type {
|
enum iot_sim_action_cat_type {
|
||||||
CAT_SPECTRUM,
|
CAT_SPECTRUM,
|
||||||
CAT_QOS,
|
CAT_QOS,
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
#define CLD_DEBUGFS_DIR "cld"
|
#define CLD_DEBUGFS_DIR "cld"
|
||||||
#endif
|
#endif
|
||||||
#define DEBUGFS_BLOCK_NAME "dbglog_block"
|
#define DEBUGFS_BLOCK_NAME "dbglog_block"
|
||||||
|
#define DEBUGFS_BLOCK_PERM QDF_FILE_USR_READ
|
||||||
|
|
||||||
#define ATH_MODULE_NAME fwlog
|
#define ATH_MODULE_NAME fwlog
|
||||||
#include <a_debug.h>
|
#include <a_debug.h>
|
||||||
@@ -4135,13 +4136,13 @@ static const struct file_operations fops_dbglog_block = {
|
|||||||
static void dbglog_debugfs_init(wmi_unified_t wmi_handle)
|
static void dbglog_debugfs_init(wmi_unified_t wmi_handle)
|
||||||
{
|
{
|
||||||
|
|
||||||
wmi_handle->debugfs_phy = debugfs_create_dir(CLD_DEBUGFS_DIR, NULL);
|
wmi_handle->debugfs_phy = qdf_debugfs_create_dir(CLD_DEBUGFS_DIR, NULL);
|
||||||
if (!wmi_handle->debugfs_phy) {
|
if (!wmi_handle->debugfs_phy) {
|
||||||
qdf_print("Failed to create WMI debug fs");
|
qdf_print("Failed to create WMI debug fs");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
debugfs_create_file(DEBUGFS_BLOCK_NAME, 0400,
|
qdf_debugfs_create_entry(DEBUGFS_BLOCK_NAME, DEBUGFS_BLOCK_PERM,
|
||||||
wmi_handle->debugfs_phy, &wmi_handle->dbglog,
|
wmi_handle->debugfs_phy, &wmi_handle->dbglog,
|
||||||
&fops_dbglog_block);
|
&fops_dbglog_block);
|
||||||
|
|
||||||
@@ -4150,7 +4151,7 @@ static void dbglog_debugfs_init(wmi_unified_t wmi_handle)
|
|||||||
|
|
||||||
static void dbglog_debugfs_remove(wmi_unified_t wmi_handle)
|
static void dbglog_debugfs_remove(wmi_unified_t wmi_handle)
|
||||||
{
|
{
|
||||||
debugfs_remove_recursive(wmi_handle->debugfs_phy);
|
qdf_debugfs_remove_dir_recursive(wmi_handle->debugfs_phy);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user