Loading drivers/net/wireless/cnss2/main.h +7 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,12 @@ struct cnss_recovery_work_t { enum cnss_recovery_reason reason; }; struct cnss_pin_connect_result { u32 fw_pwr_pin_result; u32 fw_phy_io_pin_result; u32 fw_rf_pin_result; }; struct cnss_plat_data { struct platform_device *plat_dev; void *bus_priv; Loading Loading @@ -147,6 +153,7 @@ struct cnss_plat_data { struct wlfw_fw_version_info_s_v01 fw_version_info; struct cnss_fw_mem fw_mem; struct cnss_fw_mem m3_mem; struct cnss_pin_connect_result pin_result; }; void *cnss_bus_dev_to_bus_priv(struct device *dev); Loading drivers/net/wireless/cnss2/qmi.c +35 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,38 @@ static int cnss_wlfw_request_mem_ind_hdlr(struct cnss_plat_data *plat_priv, return 0; } static int cnss_qmi_pin_result_ind_hdlr(struct cnss_plat_data *plat_priv, void *msg, unsigned int msg_len) { struct msg_desc ind_desc; struct wlfw_pin_connect_result_ind_msg_v01 ind_msg; int ret = 0; ind_desc.msg_id = QMI_WLFW_PIN_CONNECT_RESULT_IND_V01; ind_desc.max_msg_len = WLFW_PIN_CONNECT_RESULT_IND_MSG_V01_MAX_MSG_LEN; ind_desc.ei_array = wlfw_pin_connect_result_ind_msg_v01_ei; ret = qmi_kernel_decode(&ind_desc, &ind_msg, msg, msg_len); if (ret < 0) { cnss_pr_err("Failed to decode pin connect result indication, msg_len: %u, err = %d\n", msg_len, ret); return ret; } if (ind_msg.pwr_pin_result_valid) plat_priv->pin_result.fw_pwr_pin_result = ind_msg.pwr_pin_result; if (ind_msg.phy_io_pin_result_valid) plat_priv->pin_result.fw_phy_io_pin_result = ind_msg.phy_io_pin_result; if (ind_msg.rf_pin_result_valid) plat_priv->pin_result.fw_rf_pin_result = ind_msg.rf_pin_result; cnss_pr_dbg("Pin connect Result: pwr_pin: 0x%x phy_io_pin: 0x%x rf_io_pin: 0x%x\n", ind_msg.pwr_pin_result, ind_msg.phy_io_pin_result, ind_msg.rf_pin_result); return ret; } int cnss_wlfw_respond_mem_send_sync(struct cnss_plat_data *plat_priv) { struct wlfw_respond_mem_req_msg_v01 req; Loading Loading @@ -665,6 +697,9 @@ static void cnss_wlfw_clnt_ind(struct qmi_handle *handle, CNSS_DRIVER_EVENT_FW_READY, false, NULL); break; case QMI_WLFW_PIN_CONNECT_RESULT_IND_V01: cnss_qmi_pin_result_ind_hdlr(plat_priv, msg, msg_len); break; default: cnss_pr_err("Invalid QMI WLFW indication, msg_id: 0x%x\n", msg_id); Loading Loading
drivers/net/wireless/cnss2/main.h +7 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,12 @@ struct cnss_recovery_work_t { enum cnss_recovery_reason reason; }; struct cnss_pin_connect_result { u32 fw_pwr_pin_result; u32 fw_phy_io_pin_result; u32 fw_rf_pin_result; }; struct cnss_plat_data { struct platform_device *plat_dev; void *bus_priv; Loading Loading @@ -147,6 +153,7 @@ struct cnss_plat_data { struct wlfw_fw_version_info_s_v01 fw_version_info; struct cnss_fw_mem fw_mem; struct cnss_fw_mem m3_mem; struct cnss_pin_connect_result pin_result; }; void *cnss_bus_dev_to_bus_priv(struct device *dev); Loading
drivers/net/wireless/cnss2/qmi.c +35 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,38 @@ static int cnss_wlfw_request_mem_ind_hdlr(struct cnss_plat_data *plat_priv, return 0; } static int cnss_qmi_pin_result_ind_hdlr(struct cnss_plat_data *plat_priv, void *msg, unsigned int msg_len) { struct msg_desc ind_desc; struct wlfw_pin_connect_result_ind_msg_v01 ind_msg; int ret = 0; ind_desc.msg_id = QMI_WLFW_PIN_CONNECT_RESULT_IND_V01; ind_desc.max_msg_len = WLFW_PIN_CONNECT_RESULT_IND_MSG_V01_MAX_MSG_LEN; ind_desc.ei_array = wlfw_pin_connect_result_ind_msg_v01_ei; ret = qmi_kernel_decode(&ind_desc, &ind_msg, msg, msg_len); if (ret < 0) { cnss_pr_err("Failed to decode pin connect result indication, msg_len: %u, err = %d\n", msg_len, ret); return ret; } if (ind_msg.pwr_pin_result_valid) plat_priv->pin_result.fw_pwr_pin_result = ind_msg.pwr_pin_result; if (ind_msg.phy_io_pin_result_valid) plat_priv->pin_result.fw_phy_io_pin_result = ind_msg.phy_io_pin_result; if (ind_msg.rf_pin_result_valid) plat_priv->pin_result.fw_rf_pin_result = ind_msg.rf_pin_result; cnss_pr_dbg("Pin connect Result: pwr_pin: 0x%x phy_io_pin: 0x%x rf_io_pin: 0x%x\n", ind_msg.pwr_pin_result, ind_msg.phy_io_pin_result, ind_msg.rf_pin_result); return ret; } int cnss_wlfw_respond_mem_send_sync(struct cnss_plat_data *plat_priv) { struct wlfw_respond_mem_req_msg_v01 req; Loading Loading @@ -665,6 +697,9 @@ static void cnss_wlfw_clnt_ind(struct qmi_handle *handle, CNSS_DRIVER_EVENT_FW_READY, false, NULL); break; case QMI_WLFW_PIN_CONNECT_RESULT_IND_V01: cnss_qmi_pin_result_ind_hdlr(plat_priv, msg, msg_len); break; default: cnss_pr_err("Invalid QMI WLFW indication, msg_id: 0x%x\n", msg_id); Loading