linux/drivers/net/wireless/ath/ath12k/qmi.h

/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#ifndef ATH12K_QMI_H
#define ATH12K_QMI_H

#include <linux/mutex.h>
#include <linux/soc/qcom/qmi.h>

#define ATH12K_HOST_VERSION_STRING
#define ATH12K_QMI_WLANFW_TIMEOUT_MS
#define ATH12K_QMI_MAX_BDF_FILE_NAME_SIZE
#define ATH12K_QMI_CALDB_ADDRESS
#define ATH12K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01
#define ATH12K_QMI_WLFW_SERVICE_ID_V01
#define ATH12K_QMI_WLFW_SERVICE_VERS_V01
#define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01
#define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_WCN7850

#define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9274
#define ATH12K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01
#define ATH12K_QMI_RESP_LEN_MAX
#define ATH12K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01
#define ATH12K_QMI_CALDB_SIZE
#define ATH12K_QMI_BDF_EXT_STR_LENGTH
#define ATH12K_QMI_FW_MEM_REQ_SEGMENT_CNT
#define ATH12K_QMI_WLFW_MAX_DEV_MEM_NUM_V01
#define ATH12K_QMI_DEVMEM_CMEM_INDEX

#define QMI_WLFW_REQUEST_MEM_IND_V01
#define QMI_WLFW_FW_MEM_READY_IND_V01
#define QMI_WLFW_FW_READY_IND_V01

#define QMI_WLANFW_MAX_DATA_SIZE_V01
#define ATH12K_FIRMWARE_MODE_OFF
#define ATH12K_QMI_TARGET_MEM_MODE_DEFAULT

#define ATH12K_BOARD_ID_DEFAULT

struct ath12k_base;

enum ath12k_qmi_file_type {};

enum ath12k_qmi_bdf_type {};

enum ath12k_qmi_event_type {};

struct ath12k_qmi_driver_event {};

struct ath12k_qmi_ce_cfg {};

struct ath12k_qmi_event_msg {};

struct target_mem_chunk {};

struct target_info {};

struct m3_mem_region {};

struct dev_mem_info {};

struct ath12k_qmi {};

#define QMI_WLANFW_HOST_CAP_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_HOST_CAP_REQ_V01
#define QMI_WLANFW_HOST_CAP_RESP_MSG_V01_MAX_LEN
#define QMI_WLFW_HOST_CAP_RESP_V01
#define QMI_WLFW_MAX_NUM_GPIO_V01
#define QMI_WLANFW_MAX_PLATFORM_NAME_LEN_V01
#define QMI_WLANFW_MAX_HOST_DDR_RANGE_SIZE_V01

struct qmi_wlanfw_host_ddr_range {};

enum ath12k_qmi_target_mem {};

enum qmi_wlanfw_host_build_type {};

#define QMI_WLFW_MAX_NUM_MLO_CHIPS_V01
#define QMI_WLFW_MAX_NUM_MLO_LINKS_PER_CHIP_V01

struct wlfw_host_mlo_chip_info_s_v01 {};

enum ath12k_qmi_cnss_feature {};

struct qmi_wlanfw_host_cap_req_msg_v01 {};

struct qmi_wlanfw_host_cap_resp_msg_v01 {};

#define QMI_WLANFW_PHY_CAP_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_PHY_CAP_REQ_V01
#define QMI_WLANFW_PHY_CAP_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_PHY_CAP_RESP_V01

struct qmi_wlanfw_phy_cap_req_msg_v01 {};

struct qmi_wlanfw_phy_cap_resp_msg_v01 {};

#define QMI_WLANFW_IND_REGISTER_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_IND_REGISTER_REQ_V01
#define QMI_WLANFW_IND_REGISTER_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_IND_REGISTER_RESP_V01
#define QMI_WLANFW_CLIENT_ID

struct qmi_wlanfw_ind_register_req_msg_v01 {};

struct qmi_wlanfw_ind_register_resp_msg_v01 {};

#define QMI_WLANFW_REQUEST_MEM_IND_MSG_V01_MAX_LEN
#define QMI_WLANFW_RESPOND_MEM_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_RESPOND_MEM_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_REQUEST_MEM_IND_V01
#define QMI_WLANFW_RESPOND_MEM_REQ_V01
#define QMI_WLANFW_RESPOND_MEM_RESP_V01
#define QMI_WLANFW_MAX_NUM_MEM_CFG_V01
#define QMI_WLANFW_MAX_STR_LEN_V01

struct qmi_wlanfw_mem_cfg_s_v01 {};

enum qmi_wlanfw_mem_type_enum_v01 {};

struct qmi_wlanfw_mem_seg_s_v01 {};

struct qmi_wlanfw_request_mem_ind_msg_v01 {};

struct qmi_wlanfw_mem_seg_resp_s_v01 {};

struct qmi_wlanfw_respond_mem_req_msg_v01 {};

struct qmi_wlanfw_respond_mem_resp_msg_v01 {};

struct qmi_wlanfw_fw_mem_ready_ind_msg_v01 {};

struct qmi_wlanfw_fw_ready_ind_msg_v01 {};

#define QMI_WLANFW_CAP_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_CAP_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_CAP_REQ_V01
#define QMI_WLANFW_CAP_RESP_V01

enum qmi_wlanfw_pipedir_enum_v01 {};

struct qmi_wlanfw_ce_tgt_pipe_cfg_s_v01 {};

struct qmi_wlanfw_ce_svc_pipe_cfg_s_v01 {};

struct qmi_wlanfw_shadow_reg_cfg_s_v01 {};

struct qmi_wlanfw_shadow_reg_v3_cfg_s_v01 {};

struct qmi_wlanfw_memory_region_info_s_v01 {};

struct qmi_wlanfw_rf_chip_info_s_v01 {};

struct qmi_wlanfw_rf_board_info_s_v01 {};

struct qmi_wlanfw_soc_info_s_v01 {};

struct qmi_wlanfw_fw_version_info_s_v01 {};

struct qmi_wlanfw_dev_mem_info_s_v01 {};

enum qmi_wlanfw_cal_temp_id_enum_v01 {};

enum qmi_wlanfw_rd_card_chain_cap_v01 {};

struct qmi_wlanfw_cap_resp_msg_v01 {};

struct qmi_wlanfw_cap_req_msg_v01 {};

#define QMI_WLANFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_BDF_DOWNLOAD_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_BDF_DOWNLOAD_RESP_V01
#define QMI_WLANFW_BDF_DOWNLOAD_REQ_V01
/* TODO: Need to check with MCL and FW team that data can be pointer and
 * can be last element in structure
 */
struct qmi_wlanfw_bdf_download_req_msg_v01 {};

struct qmi_wlanfw_bdf_download_resp_msg_v01 {};

#define QMI_WLANFW_M3_INFO_REQ_MSG_V01_MAX_MSG_LEN
#define QMI_WLANFW_M3_INFO_RESP_MSG_V01_MAX_MSG_LEN
#define QMI_WLANFW_M3_INFO_RESP_V01
#define QMI_WLANFW_M3_INFO_REQ_V01

struct qmi_wlanfw_m3_info_req_msg_v01 {};

struct qmi_wlanfw_m3_info_resp_msg_v01 {};

#define QMI_WLANFW_WLAN_MODE_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_MODE_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_CFG_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_CFG_RESP_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_MODE_REQ_V01
#define QMI_WLANFW_WLAN_MODE_RESP_V01
#define QMI_WLANFW_WLAN_CFG_REQ_V01
#define QMI_WLANFW_WLAN_CFG_RESP_V01
#define QMI_WLANFW_MAX_STR_LEN_V01
#define QMI_WLANFW_MAX_NUM_CE_V01
#define QMI_WLANFW_MAX_NUM_SVC_V01
#define QMI_WLANFW_MAX_NUM_SHADOW_REG_V01
#define QMI_WLANFW_MAX_NUM_SHADOW_REG_V3_V01

struct qmi_wlanfw_wlan_mode_req_msg_v01 {};

struct qmi_wlanfw_wlan_mode_resp_msg_v01 {};

struct qmi_wlanfw_wlan_cfg_req_msg_v01 {};

struct qmi_wlanfw_wlan_cfg_resp_msg_v01 {};

#define ATH12K_QMI_WLANFW_WLAN_INI_REQ_V01
#define ATH12K_QMI_WLANFW_WLAN_INI_RESP_V01
#define QMI_WLANFW_WLAN_INI_REQ_MSG_V01_MAX_LEN
#define QMI_WLANFW_WLAN_INI_RESP_MSG_V01_MAX_LEN

struct qmi_wlanfw_wlan_ini_req_msg_v01 {};

struct qmi_wlanfw_wlan_ini_resp_msg_v01 {};

int ath12k_qmi_firmware_start(struct ath12k_base *ab,
			      u32 mode);
void ath12k_qmi_firmware_stop(struct ath12k_base *ab);
void ath12k_qmi_deinit_service(struct ath12k_base *ab);
int ath12k_qmi_init_service(struct ath12k_base *ab);
void ath12k_qmi_free_resource(struct ath12k_base *ab);

#endif