cnss-utils: Compile firmware service file independently

Wlan firmware service file need to compile independently and
linked to other modules to avoid error of compiling same file
twice.

Change-Id: If1be682d2ef21bd3a7839a9257d73479e437b7c0
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
This commit is contained in:
Sandeep Singh 2020-07-01 19:13:42 +05:30
commit cdcd29a2ca
10 changed files with 727 additions and 6127 deletions

View file

@ -20,6 +20,7 @@ config CNSS2_DEBUG
config CNSS2_QMI
bool "CNSS2 Platform Driver QMI support"
select CNSS_QMI_SVC
depends on CNSS2
help
CNSS2 platform driver uses QMI framework to communicate with WLAN
@ -85,4 +86,4 @@ config CNSS_QCA6490
This enables the changes from WLAN host driver that are specific to
CNSS QCA6490 chipset.
These changes are needed to support the new hardware architecture
for CNSS QCA6490 chipset.
for CNSS QCA6490 chipset.

View file

@ -2,10 +2,11 @@
obj-$(CONFIG_CNSS2) += cnss2.o
ccflags-y += -I$(srctree)/drivers/net/wireless/cnss_utils/
cnss2-y := main.o
cnss2-y += bus.o
cnss2-y += debug.o
cnss2-y += pci.o
cnss2-y += power.o
cnss2-y += genl.o
cnss2-$(CONFIG_CNSS2_QMI) += qmi.o wlan_firmware_service_v01.o coexistence_service_v01.o ip_multimedia_subsystem_private_service_v01.o device_management_service_v01.o
cnss2-$(CONFIG_CNSS2_QMI) += qmi.o coexistence_service_v01.o ip_multimedia_subsystem_private_service_v01.o device_management_service_v01.o

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5,4 +5,12 @@ config CNSS_UTILS
help
Add CNSS utilities support for the WLAN driver module.
This feature enables wlan driver to use CNSS utilities APIs to set
and get wlan related information.
and get wlan related information.
config CNSS_QMI_SVC
tristate "CNSS QMI SVC support"
help
Add CNSS QMI SVC support for the WLAN driver module.
This feature enable wlan driver to use CNSS QMI service APIs to set
and get wlan related information.

View file

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_CNSS_UTILS) += cnss_utils.o
obj-$(CONFIG_CNSS_QMI_SVC) += wlan_firmware_service_v01.o

View file

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2020, The Linux Foundation. All rights reserved. */
#ifndef WLAN_FIRMWARE_SERVICE_V01_H
#define WLAN_FIRMWARE_SERVICE_V01_H
@ -88,10 +88,6 @@
#define QMI_WLFW_XO_CAL_IND_V01 0x003D
#define QMI_WLFW_SHUTDOWN_RESP_V01 0x0043
#define QMI_WLFW_ATHDIAG_READ_REQ_V01 0x0030
#define QMI_WLFW_WLAN_CFG_REQ_V01 0x0023
#define QMI_WLFW_IND_REGISTER_RESP_V01 0x0020
#define QMI_WLFW_PCIE_GEN_SWITCH_REQ_V01 0x0053
#define QMI_WLFW_PCIE_GEN_SWITCH_RESP_V01 0x0053
#define QMI_WLFW_WFC_CALL_TWT_CONFIG_IND_V01 0x0051
#define QMI_WLFW_WLAN_MODE_RESP_V01 0x0022
#define QMI_WLFW_WFC_CALL_STATUS_REQ_V01 0x0049
@ -371,7 +367,6 @@ struct wlfw_ind_register_req_msg_v01 {
u8 qdss_mem_ready_enable_valid;
u8 qdss_mem_ready_enable;
};
#define WLFW_IND_REGISTER_REQ_MSG_V01_MAX_MSG_LEN 82
extern struct qmi_elem_info wlfw_ind_register_req_msg_v01_ei[];
@ -434,12 +429,10 @@ struct wlfw_wlan_cfg_req_msg_v01 {
struct wlfw_ce_svc_pipe_cfg_s_v01 svc_cfg[QMI_WLFW_MAX_NUM_SVC_V01];
u8 shadow_reg_valid;
u32 shadow_reg_len;
struct wlfw_shadow_reg_cfg_s_v01
shadow_reg[QMI_WLFW_MAX_NUM_SHADOW_REG_V01];
struct wlfw_shadow_reg_cfg_s_v01 shadow_reg[QMI_WLFW_MAX_NUM_SHADOW_REG_V01];
u8 shadow_reg_v2_valid;
u32 shadow_reg_v2_len;
struct wlfw_shadow_reg_v2_cfg_s_v01
shadow_reg_v2[QMI_WLFW_MAX_NUM_SHADOW_REG_V2_V01];
struct wlfw_shadow_reg_v2_cfg_s_v01 shadow_reg_v2[QMI_WLFW_MAX_NUM_SHADOW_REG_V2_V01];
u8 rri_over_ddr_cfg_valid;
struct wlfw_rri_over_ddr_cfg_s_v01 rri_over_ddr_cfg;
u8 msi_cfg_valid;
@ -488,7 +481,6 @@ struct wlfw_cap_resp_msg_v01 {
u8 rd_card_chain_cap_valid;
enum wlfw_rd_card_chain_cap_v01 rd_card_chain_cap;
};
#define WLFW_CAP_RESP_MSG_V01_MAX_MSG_LEN 253
extern struct qmi_elem_info wlfw_cap_resp_msg_v01_ei[];
@ -516,7 +508,6 @@ struct wlfw_bdf_download_resp_msg_v01 {
u8 host_bdf_data_valid;
u64 host_bdf_data;
};
#define WLFW_BDF_DOWNLOAD_RESP_MSG_V01_MAX_MSG_LEN 18
extern struct qmi_elem_info wlfw_bdf_download_resp_msg_v01_ei[];
@ -617,8 +608,7 @@ extern struct qmi_elem_info wlfw_msa_info_req_msg_v01_ei[];
struct wlfw_msa_info_resp_msg_v01 {
struct qmi_response_type_v01 resp;
u32 mem_region_info_len;
struct wlfw_memory_region_info_s_v01
mem_region_info[QMI_WLFW_MAX_NUM_MEMORY_REGIONS_V01];
struct wlfw_memory_region_info_s_v01 mem_region_info[QMI_WLFW_MAX_NUM_MEMORY_REGIONS_V01];
};
#define WLFW_MSA_INFO_RESP_MSG_V01_MAX_MSG_LEN 37
extern struct qmi_elem_info wlfw_msa_info_resp_msg_v01_ei[];
@ -738,8 +728,7 @@ struct wlfw_host_cap_req_msg_v01 {
u8 platform_name_valid;
char platform_name[QMI_WLFW_MAX_PLATFORM_NAME_LEN_V01 + 1];
u8 ddr_range_valid;
struct wlfw_host_ddr_range_s_v01
ddr_range[QMI_WLFW_MAX_HOST_DDR_RANGE_SIZE_V01];
struct wlfw_host_ddr_range_s_v01 ddr_range[QMI_WLFW_MAX_HOST_DDR_RANGE_SIZE_V01];
u8 host_build_type_valid;
enum wlfw_host_build_type_v01 host_build_type;
};
@ -1095,14 +1084,12 @@ struct wlfw_power_save_req_msg_v01 {
u8 power_save_mode_valid;
enum wlfw_power_save_mode_v01 power_save_mode;
};
#define WLFW_POWER_SAVE_REQ_MSG_V01_MAX_MSG_LEN 7
extern struct qmi_elem_info wlfw_power_save_req_msg_v01_ei[];
struct wlfw_power_save_resp_msg_v01 {
struct qmi_response_type_v01 resp;
};
#define WLFW_POWER_SAVE_RESP_MSG_V01_MAX_MSG_LEN 7
extern struct qmi_elem_info wlfw_power_save_resp_msg_v01_ei[];
@ -1120,28 +1107,24 @@ struct wlfw_wfc_call_twt_config_ind_msg_v01 {
u8 twt_sta_config_changed_valid;
u8 twt_sta_config_changed;
};
#define WLFW_WFC_CALL_TWT_CONFIG_IND_MSG_V01_MAX_MSG_LEN 35
extern struct qmi_elem_info wlfw_wfc_call_twt_config_ind_msg_v01_ei[];
struct wlfw_qdss_mem_ready_ind_msg_v01 {
char placeholder;
};
#define WLFW_QDSS_MEM_READY_IND_MSG_V01_MAX_MSG_LEN 0
extern struct qmi_elem_info wlfw_qdss_mem_ready_ind_msg_v01_ei[];
struct wlfw_pcie_gen_switch_req_msg_v01 {
enum wlfw_pcie_gen_speed_v01 pcie_speed;
};
#define WLFW_PCIE_GEN_SWITCH_REQ_MSG_V01_MAX_MSG_LEN 7
extern struct qmi_elem_info wlfw_pcie_gen_switch_req_msg_v01_ei[];
struct wlfw_pcie_gen_switch_resp_msg_v01 {
struct qmi_response_type_v01 resp;
};
#define WLFW_PCIE_GEN_SWITCH_RESP_MSG_V01_MAX_MSG_LEN 7
extern struct qmi_elem_info wlfw_pcie_gen_switch_resp_msg_v01_ei[];

View file

@ -20,6 +20,7 @@ config ICNSS2_DEBUG
config ICNSS2_QMI
bool "ICNSS2 Platform Driver QMI support"
depends on ICNSS2
select CNSS_QMI_SVC
help
Say 'Y' here to enable ICNSS QMI support. ICNSS driver will use
QMI framework to communicate with WLAN FW. It will send coldboot

View file

@ -2,8 +2,9 @@
obj-$(CONFIG_ICNSS2) += icnss2.o
ccflags-y += -I$(srctree)/drivers/net/wireless/cnss_utils/
icnss2-y := main.o
icnss2-y += debug.o
icnss2-y += power.o
icnss2-y += genl.o
icnss2-$(CONFIG_ICNSS2_QMI) += qmi.o wlan_firmware_service_v01.o
icnss2-$(CONFIG_ICNSS2_QMI) += qmi.o