Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bcea930 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Add OTP version in target capability message"

parents 3ec55856 e45cbd6f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ struct cnss_plat_data {
	struct wlfw_rf_board_info board_info;
	struct wlfw_soc_info soc_info;
	struct wlfw_fw_version_info fw_version_info;
	u32 otp_version;
	u32 fw_mem_seg_len;
	struct cnss_fw_mem fw_mem[QMI_WLFW_MAX_NUM_MEM_SEG];
	struct cnss_fw_mem m3_mem;
+5 −2
Original line number Diff line number Diff line
@@ -389,13 +389,16 @@ int cnss_wlfw_tgt_cap_send_sync(struct cnss_plat_data *plat_priv)
			resp->fw_version_info.fw_build_timestamp,
			QMI_WLFW_MAX_TIMESTAMP_LEN + 1);
	}
	if (resp->otp_version_valid)
		plat_priv->otp_version = resp->otp_version;

	cnss_pr_dbg("Target capability: chip_id: 0x%x, chip_family: 0x%x, board_id: 0x%x, soc_id: 0x%x, fw_version: 0x%x, fw_build_timestamp: %s",
	cnss_pr_dbg("Target capability: chip_id: 0x%x, chip_family: 0x%x, board_id: 0x%x, soc_id: 0x%x, fw_version: 0x%x, fw_build_timestamp: %s, otp_version: 0x%x\n",
		    plat_priv->chip_info.chip_id,
		    plat_priv->chip_info.chip_family,
		    plat_priv->board_info.board_id, plat_priv->soc_info.soc_id,
		    plat_priv->fw_version_info.fw_version,
		    plat_priv->fw_version_info.fw_build_timestamp);
		    plat_priv->fw_version_info.fw_build_timestamp,
		    plat_priv->otp_version);

	kfree(req);
	kfree(resp);
+18 −0
Original line number Diff line number Diff line
@@ -1256,6 +1256,24 @@ struct qmi_elem_info wlfw_cap_resp_msg_v01_ei[] = {
		.offset         = offsetof(struct wlfw_cap_resp_msg_v01,
					   time_freq_hz),
	},
	{
		.data_type      = QMI_OPT_FLAG,
		.elem_len       = 1,
		.elem_size      = sizeof(u8),
		.array_type       = NO_ARRAY,
		.tlv_type       = 0x18,
		.offset         = offsetof(struct wlfw_cap_resp_msg_v01,
					   otp_version_valid),
	},
	{
		.data_type      = QMI_UNSIGNED_4_BYTE,
		.elem_len       = 1,
		.elem_size      = sizeof(u32),
		.array_type       = NO_ARRAY,
		.tlv_type       = 0x18,
		.offset         = offsetof(struct wlfw_cap_resp_msg_v01,
					   otp_version),
	},
	{
		.data_type      = QMI_EOTI,
		.array_type       = NO_ARRAY,
+3 −1
Original line number Diff line number Diff line
@@ -384,9 +384,11 @@ struct wlfw_cap_resp_msg_v01 {
	u32 voltage_mv;
	u8 time_freq_hz_valid;
	u32 time_freq_hz;
	u8 otp_version_valid;
	u32 otp_version;
};

#define WLFW_CAP_RESP_MSG_V01_MAX_MSG_LEN 221
#define WLFW_CAP_RESP_MSG_V01_MAX_MSG_LEN 228
extern struct qmi_elem_info wlfw_cap_resp_msg_v01_ei[];

struct wlfw_bdf_download_req_msg_v01 {