From 64d1d783407c72a28a2b0b0de96c9cca9750c8dc Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Fri, 10 Jul 2020 10:57:18 -0700 Subject: [PATCH] qcacld-3.0: Rename file name and function name for sysfs 'fw_mode_config' Rename file name and modify function names to keep it inline with sysfs attribute name 'fw_mode_config' Change-Id: Ia389fa8807bbd0e58de58c503d9f3bbbef9ec707 CRs-Fixed: 2731064 --- Kbuild | 6 ++-- configs/default_defconfig | 2 +- core/hdd/src/wlan_hdd_sysfs.c | 6 ++-- ..._cfg.c => wlan_hdd_sysfs_fw_mode_config.c} | 28 +++++++++---------- ..._cfg.h => wlan_hdd_sysfs_fw_mode_config.h} | 24 ++++++++-------- 5 files changed, 33 insertions(+), 33 deletions(-) rename core/hdd/src/{wlan_hdd_sysfs_set_fw_mode_cfg.c => wlan_hdd_sysfs_fw_mode_config.c} (83%) rename core/hdd/src/{wlan_hdd_sysfs_set_fw_mode_cfg.h => wlan_hdd_sysfs_fw_mode_config.h} (63%) diff --git a/Kbuild b/Kbuild index 3548d8141e48..4c23c014bc39 100644 --- a/Kbuild +++ b/Kbuild @@ -263,8 +263,8 @@ HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs.o ifeq ($(CONFIG_WLAN_SYSFS_CHANNEL), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_channel.o endif -ifeq ($(CONFIG_WLAN_SET_FW_MODE_CFG), y) -HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_set_fw_mode_cfg.o +ifeq ($(CONFIG_WLAN_SYSFS_FW_MODE_CFG), y) +HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_fw_mode_config.o endif ifeq ($(CONFIG_WLAN_REASSOC), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_reassoc.o @@ -2638,7 +2638,7 @@ endif endif cppflags-$(CONFIG_UNIT_TEST) += -DWLAN_UNIT_TEST cppflags-$(CONFIG_WLAN_DEBUG_CRASH_INJECT) += -DCONFIG_WLAN_DEBUG_CRASH_INJECT -cppflags-$(CONFIG_WLAN_SET_FW_MODE_CFG) += -DCONFIG_WLAN_SET_FW_MODE_CFG +cppflags-$(CONFIG_WLAN_SYSFS_FW_MODE_CFG) += -DCONFIG_WLAN_SYSFS_FW_MODE_CFG cppflags-$(CONFIG_WLAN_REASSOC) += -DCONFIG_WLAN_REASSOC cppflags-$(CONFIG_WLAN_SCAN_DISABLE) += -DCONFIG_WLAN_SCAN_DISABLE cppflags-$(CONFIG_WLAN_WOW_ITO) += -DCONFIG_WLAN_WOW_ITO diff --git a/configs/default_defconfig b/configs/default_defconfig index 33b0a2131bf3..8747d7f8cedf 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -197,7 +197,7 @@ CONFIG_WLAN_SYSFS := y ifeq ($(CONFIG_WLAN_SYSFS), y) CONFIG_WLAN_SYSFS_STA_INFO := y CONFIG_WLAN_SYSFS_CHANNEL := y - CONFIG_WLAN_SET_FW_MODE_CFG := y + CONFIG_WLAN_SYSFS_FW_MODE_CFG := y CONFIG_WLAN_SYSFS_MEM_STATS := y CONFIG_WLAN_REASSOC := y CONFIG_WLAN_SYSFS_CONNECT_INFO := y diff --git a/core/hdd/src/wlan_hdd_sysfs.c b/core/hdd/src/wlan_hdd_sysfs.c index 8277530ce02a..ee8355c6ad0d 100644 --- a/core/hdd/src/wlan_hdd_sysfs.c +++ b/core/hdd/src/wlan_hdd_sysfs.c @@ -39,7 +39,7 @@ #include "osif_sync.h" #include "wlan_hdd_sysfs_sta_info.h" #include "wlan_hdd_sysfs_channel.h" -#include +#include #include #include #include "wlan_hdd_sysfs_crash_inject.h" @@ -772,7 +772,7 @@ void hdd_create_sysfs_files(struct hdd_context *hdd_ctx) hdd_sysfs_mem_stats_create(wlan_kobject); if (QDF_GLOBAL_MISSION_MODE == hdd_get_conparam()) { hdd_sysfs_create_powerstats_interface(); - hdd_sysfs_set_fw_mode_cfg_create(driver_kobject); + hdd_sysfs_fw_mode_config_create(driver_kobject); hdd_sysfs_scan_disable_create(driver_kobject); hdd_sysfs_wow_ito_create(driver_kobject); hdd_sysfs_set_wlan_dbg_create(driver_kobject); @@ -801,7 +801,7 @@ void hdd_destroy_sysfs_files(void) hdd_sysfs_set_wlan_dbg_destroy(driver_kobject); hdd_sysfs_wow_ito_destroy(driver_kobject); hdd_sysfs_scan_disable_destroy(driver_kobject); - hdd_sysfs_set_fw_mode_cfg_destroy(driver_kobject); + hdd_sysfs_fw_mode_config_destroy(driver_kobject); hdd_sysfs_destroy_powerstats_interface(); } hdd_sysfs_mem_stats_destroy(wlan_kobject); diff --git a/core/hdd/src/wlan_hdd_sysfs_set_fw_mode_cfg.c b/core/hdd/src/wlan_hdd_sysfs_fw_mode_config.c similarity index 83% rename from core/hdd/src/wlan_hdd_sysfs_set_fw_mode_cfg.c rename to core/hdd/src/wlan_hdd_sysfs_fw_mode_config.c index b952d365251f..d9b0f46baa73 100644 --- a/core/hdd/src/wlan_hdd_sysfs_set_fw_mode_cfg.c +++ b/core/hdd/src/wlan_hdd_sysfs_fw_mode_config.c @@ -17,20 +17,20 @@ */ /** - * DOC: wlan_hdd_sysfs_set_fw_mode_cfg.c + * DOC: wlan_hdd_sysfs_fw_mode_config.c * - * implementation for creating sysfs file fw_mode_config + * Implementation for creating sysfs file fw_mode_config */ #include #include "osif_psoc_sync.h" #include -#include +#include #include "wlan_policy_mgr_ucfg.h" static ssize_t -__wlan_hdd_store_set_fw_mode_cfg_sysfs(struct hdd_context *hdd_ctx, - struct kobj_attribute *attr, +__wlan_hdd_store_fw_mode_config_sysfs(struct hdd_context *hdd_ctx, + struct kobj_attribute *attr, const char *buf, size_t count) { @@ -90,10 +90,10 @@ __wlan_hdd_store_set_fw_mode_cfg_sysfs(struct hdd_context *hdd_ctx, } static ssize_t -wlan_hdd_store_set_fw_mode_cfg_sysfs(struct kobject *kobj, - struct kobj_attribute *attr, - const char *buf, - size_t count) +wlan_hdd_store_fw_mode_config_sysfs(struct kobject *kobj, + struct kobj_attribute *attr, + const char *buf, + size_t count) { struct osif_psoc_sync *psoc_sync; struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); @@ -109,8 +109,8 @@ wlan_hdd_store_set_fw_mode_cfg_sysfs(struct kobject *kobj, if (errno_size) return errno_size; - errno_size = __wlan_hdd_store_set_fw_mode_cfg_sysfs(hdd_ctx, attr, - buf, count); + errno_size = __wlan_hdd_store_fw_mode_config_sysfs(hdd_ctx, attr, + buf, count); osif_psoc_sync_op_stop(psoc_sync); @@ -119,9 +119,9 @@ wlan_hdd_store_set_fw_mode_cfg_sysfs(struct kobject *kobj, static struct kobj_attribute set_fw_mode_cfg_attribute = __ATTR(fw_mode_config, 0220, NULL, - wlan_hdd_store_set_fw_mode_cfg_sysfs); + wlan_hdd_store_fw_mode_config_sysfs); -int hdd_sysfs_set_fw_mode_cfg_create(struct kobject *driver_kobject) +int hdd_sysfs_fw_mode_config_create(struct kobject *driver_kobject) { int error; @@ -139,7 +139,7 @@ int hdd_sysfs_set_fw_mode_cfg_create(struct kobject *driver_kobject) } void -hdd_sysfs_set_fw_mode_cfg_destroy(struct kobject *driver_kobject) +hdd_sysfs_fw_mode_config_destroy(struct kobject *driver_kobject) { if (!driver_kobject) { hdd_err("could not get driver kobject!"); diff --git a/core/hdd/src/wlan_hdd_sysfs_set_fw_mode_cfg.h b/core/hdd/src/wlan_hdd_sysfs_fw_mode_config.h similarity index 63% rename from core/hdd/src/wlan_hdd_sysfs_set_fw_mode_cfg.h rename to core/hdd/src/wlan_hdd_sysfs_fw_mode_config.h index e5a15036dafa..9d649745b4ce 100644 --- a/core/hdd/src/wlan_hdd_sysfs_set_fw_mode_cfg.h +++ b/core/hdd/src/wlan_hdd_sysfs_fw_mode_config.h @@ -17,17 +17,17 @@ */ /** - * DOC: wlan_hdd_sysfs_set_fw_mode_cfg.h + * DOC: wlan_hdd_sysfs_fw_mode_config.h * - * implementation for creating sysfs file fw_mode_config + * Implementation for creating sysfs file fw_mode_config */ -#ifndef _WLAN_HDD_SYSFS_SET_FW_MODE_CFG_H -#define _WLAN_HDD_SYSFS_SET_FW_MODE_CFG_H +#ifndef _WLAN_HDD_SYSFS_FW_MODE_CONFIG_H +#define _WLAN_HDD_SYSFS_FW_MODE_CONFIG_H -#if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_SET_FW_MODE_CFG) +#if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_SYSFS_FW_MODE_CFG) /** - * hdd_sysfs_set_fw_mode_cfg_create() - API to create fw_mode_config sysfs file + * hdd_sysfs_fw_mode_config_create() - API to create fw_mode_config sysfs file * @driver_kobject: sysfs driver kobject * * file path: /sys/kernel/wifi/fw_mode_config @@ -37,26 +37,26 @@ * * Return: 0 on success and errno on failure */ -int hdd_sysfs_set_fw_mode_cfg_create(struct kobject *driver_kobject); +int hdd_sysfs_fw_mode_config_create(struct kobject *driver_kobject); /** - * hdd_sysfs_set_fw_mode_cfg_destroy() - + * hdd_sysfs_fw_mode_config_destroy() - * API to destroy fw_mode_config sysfs file * * Return: none */ void -hdd_sysfs_set_fw_mode_cfg_destroy(struct kobject *driver_kobject); +hdd_sysfs_fw_mode_config_destroy(struct kobject *driver_kobject); #else static inline int -hdd_sysfs_set_fw_mode_cfg_create(struct kobject *driver_kobject) +hdd_sysfs_fw_mode_config_create(struct kobject *driver_kobject) { return 0; } static inline void -hdd_sysfs_set_fw_mode_cfg_destroy(struct kobject *driver_kobject) +hdd_sysfs_fw_mode_config_destroy(struct kobject *driver_kobject) { } #endif -#endif /* #ifndef _WLAN_HDD_SYSFS_SET_FW_MODE_CFG_H */ +#endif /* #ifndef _WLAN_HDD_SYSFS_FW_MODE_CONFIG_H */