Lines Matching refs:plat_priv

46 #define QMI_WLFW_TIMEOUT_MS		(plat_priv->ctrl_params.qmi_timeout)
150 static int cnss_wlfw_ind_register_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_ind_register_send_sync() argument
158 plat_priv->driver_state); in cnss_wlfw_ind_register_send_sync()
196 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_ind_register_send_sync()
204 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_ind_register_send_sync()
249 static void cnss_wlfw_host_cap_parse_mlo(struct cnss_plat_data *plat_priv, in cnss_wlfw_host_cap_parse_mlo() argument
252 if (plat_priv->device_id == KIWI_DEVICE_ID || in cnss_wlfw_host_cap_parse_mlo()
253 plat_priv->device_id == MANGO_DEVICE_ID || in cnss_wlfw_host_cap_parse_mlo()
254 plat_priv->device_id == PEACH_DEVICE_ID) { in cnss_wlfw_host_cap_parse_mlo()
278 static int cnss_wlfw_host_cap_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_host_cap_send_sync() argument
289 plat_priv->driver_state); in cnss_wlfw_host_cap_send_sync()
305 req->wake_msi = cnss_bus_get_wake_irq(plat_priv); in cnss_wlfw_host_cap_send_sync()
321 req->cal_done = plat_priv->cal_done; in cnss_wlfw_host_cap_send_sync()
322 cnss_pr_dbg("Calibration done is %d\n", plat_priv->cal_done); in cnss_wlfw_host_cap_send_sync()
324 if (plat_priv->sleep_clk) { in cnss_wlfw_host_cap_send_sync()
332 if (plat_priv->supported_link_speed) { in cnss_wlfw_host_cap_send_sync()
335 plat_priv->supported_link_speed; in cnss_wlfw_host_cap_send_sync()
337 plat_priv->supported_link_speed); in cnss_wlfw_host_cap_send_sync()
340 if (cnss_bus_is_smmu_s1_enabled(plat_priv) && in cnss_wlfw_host_cap_send_sync()
341 !cnss_bus_get_iova(plat_priv, &iova_start, &iova_size) && in cnss_wlfw_host_cap_send_sync()
342 !cnss_bus_get_iova_ipa(plat_priv, &iova_ipa_start, in cnss_wlfw_host_cap_send_sync()
354 cnss_wlfw_host_cap_parse_mlo(plat_priv, req); in cnss_wlfw_host_cap_send_sync()
356 ret = cnss_get_feature_list(plat_priv, &feature_list); in cnss_wlfw_host_cap_send_sync()
364 if (cnss_get_platform_name(plat_priv, req->platform_name, in cnss_wlfw_host_cap_send_sync()
368 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_host_cap_send_sync()
376 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_host_cap_send_sync()
412 int cnss_wlfw_respond_mem_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_respond_mem_send_sync() argument
417 struct cnss_fw_mem *fw_mem = plat_priv->fw_mem; in cnss_wlfw_respond_mem_send_sync()
421 plat_priv->driver_state); in cnss_wlfw_respond_mem_send_sync()
433 if (plat_priv->fw_mem_seg_len > QMI_WLFW_MAX_NUM_MEM_SEG_V01) { in cnss_wlfw_respond_mem_send_sync()
434 cnss_pr_err("Invalid seg len %u\n", plat_priv->fw_mem_seg_len); in cnss_wlfw_respond_mem_send_sync()
439 req->mem_seg_len = plat_priv->fw_mem_seg_len; in cnss_wlfw_respond_mem_send_sync()
463 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_respond_mem_send_sync()
471 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_respond_mem_send_sync()
507 int cnss_wlfw_tgt_cap_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_tgt_cap_send_sync() argument
516 plat_priv->driver_state); in cnss_wlfw_tgt_cap_send_sync()
528 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_tgt_cap_send_sync()
536 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_tgt_cap_send_sync()
562 plat_priv->chip_info.chip_id = resp->chip_info.chip_id; in cnss_wlfw_tgt_cap_send_sync()
563 plat_priv->chip_info.chip_family = resp->chip_info.chip_family; in cnss_wlfw_tgt_cap_send_sync()
566 plat_priv->board_info.board_id = resp->board_info.board_id; in cnss_wlfw_tgt_cap_send_sync()
568 plat_priv->board_info.board_id = 0xFF; in cnss_wlfw_tgt_cap_send_sync()
570 plat_priv->soc_info.soc_id = resp->soc_info.soc_id; in cnss_wlfw_tgt_cap_send_sync()
572 plat_priv->fw_version_info.fw_version = in cnss_wlfw_tgt_cap_send_sync()
576 strlcpy(plat_priv->fw_version_info.fw_build_timestamp, in cnss_wlfw_tgt_cap_send_sync()
582 strlcpy(plat_priv->fw_build_id, resp->fw_build_id, in cnss_wlfw_tgt_cap_send_sync()
587 plat_priv->cpr_info.voltage = resp->voltage_mv; in cnss_wlfw_tgt_cap_send_sync()
589 plat_priv->cpr_info.voltage); in cnss_wlfw_tgt_cap_send_sync()
590 cnss_update_cpr_info(plat_priv); in cnss_wlfw_tgt_cap_send_sync()
593 plat_priv->device_freq_hz = resp->time_freq_hz; in cnss_wlfw_tgt_cap_send_sync()
595 plat_priv->device_freq_hz); in cnss_wlfw_tgt_cap_send_sync()
598 plat_priv->otp_version = resp->otp_version; in cnss_wlfw_tgt_cap_send_sync()
601 plat_priv->dev_mem_info[i].start = in cnss_wlfw_tgt_cap_send_sync()
603 plat_priv->dev_mem_info[i].size = in cnss_wlfw_tgt_cap_send_sync()
606 i, plat_priv->dev_mem_info[i].start, in cnss_wlfw_tgt_cap_send_sync()
607 plat_priv->dev_mem_info[i].size); in cnss_wlfw_tgt_cap_send_sync()
611 plat_priv->fw_pcie_gen_switch = in cnss_wlfw_tgt_cap_send_sync()
613 plat_priv->fw_aux_uc_support = in cnss_wlfw_tgt_cap_send_sync()
616 plat_priv->fw_aux_uc_support); in cnss_wlfw_tgt_cap_send_sync()
617 plat_priv->fw_caps = resp->fw_caps; in cnss_wlfw_tgt_cap_send_sync()
623 plat_priv->hang_event_data_len = resp->hang_data_length; in cnss_wlfw_tgt_cap_send_sync()
625 plat_priv->hang_event_data_len = 0; in cnss_wlfw_tgt_cap_send_sync()
628 plat_priv->hang_data_addr_offset = resp->hang_data_addr_offset; in cnss_wlfw_tgt_cap_send_sync()
630 plat_priv->hang_data_addr_offset = 0; in cnss_wlfw_tgt_cap_send_sync()
633 plat_priv->hwid_bitmap = resp->hwid_bitmap; in cnss_wlfw_tgt_cap_send_sync()
636 cnss_aop_ol_cpr_cfg_setup(plat_priv, &resp->ol_cpr_cfg); in cnss_wlfw_tgt_cap_send_sync()
641 for (i = 0; i < plat_priv->on_chip_pmic_devices_count; i++) { in cnss_wlfw_tgt_cap_send_sync()
642 if (plat_priv->board_info.board_id == in cnss_wlfw_tgt_cap_send_sync()
643 plat_priv->on_chip_pmic_board_ids[i]) { in cnss_wlfw_tgt_cap_send_sync()
645 plat_priv->board_info.board_id); in cnss_wlfw_tgt_cap_send_sync()
646 ret = cnss_aop_send_msg(plat_priv, in cnss_wlfw_tgt_cap_send_sync()
655 plat_priv->serial_id = resp->serial_id; in cnss_wlfw_tgt_cap_send_sync()
662 plat_priv->chip_info.chip_id, in cnss_wlfw_tgt_cap_send_sync()
663 plat_priv->chip_info.chip_family, in cnss_wlfw_tgt_cap_send_sync()
664 plat_priv->board_info.board_id, plat_priv->soc_info.soc_id, in cnss_wlfw_tgt_cap_send_sync()
665 plat_priv->otp_version); in cnss_wlfw_tgt_cap_send_sync()
667 plat_priv->fw_version_info.fw_version, in cnss_wlfw_tgt_cap_send_sync()
668 plat_priv->fw_version_info.fw_build_timestamp, in cnss_wlfw_tgt_cap_send_sync()
669 plat_priv->fw_build_id, in cnss_wlfw_tgt_cap_send_sync()
670 plat_priv->hwid_bitmap); in cnss_wlfw_tgt_cap_send_sync()
672 plat_priv->hang_event_data_len, in cnss_wlfw_tgt_cap_send_sync()
673 plat_priv->hang_data_addr_offset); in cnss_wlfw_tgt_cap_send_sync()
701 static int cnss_get_bdf_file_name(struct cnss_plat_data *plat_priv, in cnss_get_bdf_file_name() argument
711 if (plat_priv->board_info.board_id == 0xFF) { in cnss_get_bdf_file_name()
712 if (plat_priv->chip_info.chip_id & CHIP_ID_GF_MASK) in cnss_get_bdf_file_name()
718 } else if (plat_priv->board_info.board_id < 0xFF) { in cnss_get_bdf_file_name()
719 if (plat_priv->chip_info.chip_id & CHIP_ID_GF_MASK) in cnss_get_bdf_file_name()
722 plat_priv->board_info.board_id); in cnss_get_bdf_file_name()
726 plat_priv->board_info.board_id); in cnss_get_bdf_file_name()
730 plat_priv->board_info.board_id >> 8 & 0xFF, in cnss_get_bdf_file_name()
731 plat_priv->board_info.board_id & 0xFF); in cnss_get_bdf_file_name()
735 if (plat_priv->board_info.board_id == 0xFF) { in cnss_get_bdf_file_name()
736 if (plat_priv->chip_info.chip_id & CHIP_ID_GF_MASK) in cnss_get_bdf_file_name()
742 } else if (plat_priv->board_info.board_id < 0xFF) { in cnss_get_bdf_file_name()
743 if (plat_priv->chip_info.chip_id & CHIP_ID_GF_MASK) in cnss_get_bdf_file_name()
746 plat_priv->board_info.board_id); in cnss_get_bdf_file_name()
750 plat_priv->board_info.board_id); in cnss_get_bdf_file_name()
754 plat_priv->board_info.board_id >> 8 & 0xFF, in cnss_get_bdf_file_name()
755 plat_priv->board_info.board_id & 0xFF); in cnss_get_bdf_file_name()
766 plat_priv->ctrl_params.bdf_type); in cnss_get_bdf_file_name()
772 cnss_bus_add_fw_prefix_name(plat_priv, filename, filename_tmp); in cnss_get_bdf_file_name()
777 int cnss_wlfw_bdf_dnld_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_bdf_dnld_send_sync() argument
790 bdf_type, cnss_bdf_type_to_str(bdf_type), plat_priv->driver_state); in cnss_wlfw_bdf_dnld_send_sync()
802 ret = cnss_get_bdf_file_name(plat_priv, bdf_type, in cnss_wlfw_bdf_dnld_send_sync()
809 ret = cnss_request_firmware_direct(plat_priv, &fw_entry, in cnss_wlfw_bdf_dnld_send_sync()
813 &plat_priv->plat_dev->dev); in cnss_wlfw_bdf_dnld_send_sync()
830 req->file_id = plat_priv->board_info.board_id; in cnss_wlfw_bdf_dnld_send_sync()
848 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_bdf_dnld_send_sync()
857 (&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_bdf_dnld_send_sync()
893 cnss_enable_int_pow_amp_vreg(plat_priv); in cnss_wlfw_bdf_dnld_send_sync()
895 plat_priv->cbc_file_download = in cnss_wlfw_bdf_dnld_send_sync()
899 plat_priv->cbc_file_download); in cnss_wlfw_bdf_dnld_send_sync()
909 test_bit(CNSS_IN_REBOOT, &plat_priv->driver_state) || in cnss_wlfw_bdf_dnld_send_sync()
917 int cnss_wlfw_tme_patch_dnld_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_tme_patch_dnld_send_sync() argument
923 struct cnss_fw_mem *tme_lite_mem = &plat_priv->tme_lite_mem; in cnss_wlfw_tme_patch_dnld_send_sync()
927 plat_priv->driver_state); in cnss_wlfw_tme_patch_dnld_send_sync()
929 if (plat_priv->device_id != PEACH_DEVICE_ID) in cnss_wlfw_tme_patch_dnld_send_sync()
952 req->addr = plat_priv->tme_lite_mem.pa; in cnss_wlfw_tme_patch_dnld_send_sync()
953 req->size = plat_priv->tme_lite_mem.size; in cnss_wlfw_tme_patch_dnld_send_sync()
955 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_tme_patch_dnld_send_sync()
963 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_tme_patch_dnld_send_sync()
998 int cnss_wlfw_tme_opt_file_dnld_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_tme_opt_file_dnld_send_sync() argument
1008 if (plat_priv->device_id != PEACH_DEVICE_ID) in cnss_wlfw_tme_opt_file_dnld_send_sync()
1012 plat_priv->driver_state); in cnss_wlfw_tme_opt_file_dnld_send_sync()
1025 tme_opt_file_mem = &plat_priv->tme_opt_file_mem[0]; in cnss_wlfw_tme_opt_file_dnld_send_sync()
1028 tme_opt_file_mem = &plat_priv->tme_opt_file_mem[1]; in cnss_wlfw_tme_opt_file_dnld_send_sync()
1031 tme_opt_file_mem = &plat_priv->tme_opt_file_mem[2]; in cnss_wlfw_tme_opt_file_dnld_send_sync()
1049 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_tme_opt_file_dnld_send_sync()
1057 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_tme_opt_file_dnld_send_sync()
1100 int cnss_wlfw_m3_dnld_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_m3_dnld_send_sync() argument
1105 struct cnss_fw_mem *m3_mem = &plat_priv->m3_mem; in cnss_wlfw_m3_dnld_send_sync()
1109 plat_priv->driver_state); in cnss_wlfw_m3_dnld_send_sync()
1130 req->addr = plat_priv->m3_mem.pa; in cnss_wlfw_m3_dnld_send_sync()
1131 req->size = plat_priv->m3_mem.size; in cnss_wlfw_m3_dnld_send_sync()
1133 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_m3_dnld_send_sync()
1141 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_m3_dnld_send_sync()
1177 int cnss_wlfw_aux_dnld_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_aux_dnld_send_sync() argument
1182 struct cnss_fw_mem *aux_mem = &plat_priv->aux_mem; in cnss_wlfw_aux_dnld_send_sync()
1186 plat_priv->driver_state); in cnss_wlfw_aux_dnld_send_sync()
1207 req->addr = plat_priv->aux_mem.pa; in cnss_wlfw_aux_dnld_send_sync()
1208 req->size = plat_priv->aux_mem.size; in cnss_wlfw_aux_dnld_send_sync()
1210 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_aux_dnld_send_sync()
1218 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_aux_dnld_send_sync()
1254 int cnss_wlfw_wlan_mac_req_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_wlan_mac_req_send_sync() argument
1262 if (!plat_priv || !mac || mac_len != QMI_WLFW_MAC_ADDR_SIZE_V01) in cnss_wlfw_wlan_mac_req_send_sync()
1265 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_wlan_mac_req_send_sync()
1275 mac, plat_priv->driver_state); in cnss_wlfw_wlan_mac_req_send_sync()
1279 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_wlan_mac_req_send_sync()
1307 int cnss_wlfw_qdss_data_send_sync(struct cnss_plat_data *plat_priv, char *file_name, in cnss_wlfw_qdss_data_send_sync() argument
1338 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_qdss_data_send_sync()
1348 (&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_qdss_data_send_sync()
1360 ret = qmi_txn_wait(&txn, plat_priv->ctrl_params.qmi_timeout); in cnss_wlfw_qdss_data_send_sync()
1432 void cnss_get_qdss_cfg_filename(struct cnss_plat_data *plat_priv, in cnss_get_qdss_cfg_filename() argument
1442 if (plat_priv->device_version.major_version == FW_V2_NUMBER) in cnss_get_qdss_cfg_filename()
1449 cnss_bus_add_fw_prefix_name(plat_priv, filename, filename_tmp); in cnss_get_qdss_cfg_filename()
1452 int cnss_wlfw_qdss_dnld_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_qdss_dnld_send_sync() argument
1464 plat_priv->driver_state); in cnss_wlfw_qdss_dnld_send_sync()
1476 cnss_get_qdss_cfg_filename(plat_priv, qdss_cfg_filename, in cnss_wlfw_qdss_dnld_send_sync()
1481 ret = cnss_request_firmware_direct(plat_priv, &fw_entry, in cnss_wlfw_qdss_dnld_send_sync()
1486 cnss_get_qdss_cfg_filename(plat_priv, qdss_cfg_filename, in cnss_wlfw_qdss_dnld_send_sync()
1491 ret = cnss_request_firmware_direct(plat_priv, &fw_entry, in cnss_wlfw_qdss_dnld_send_sync()
1523 (&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_qdss_dnld_send_sync()
1533 (&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_qdss_dnld_send_sync()
1544 ret = qmi_txn_wait(&txn, plat_priv->ctrl_params.qmi_timeout); in cnss_wlfw_qdss_dnld_send_sync()
1578 (struct cnss_plat_data *plat_priv, in wlfw_send_qdss_trace_mode_req() argument
1588 if (!plat_priv) in wlfw_send_qdss_trace_mode_req()
1606 tmp = plat_priv->hw_trc_override; in wlfw_send_qdss_trace_mode_req()
1616 rc = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in wlfw_send_qdss_trace_mode_req()
1624 rc = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in wlfw_send_qdss_trace_mode_req()
1634 rc = qmi_txn_wait(&txn, plat_priv->ctrl_params.qmi_timeout); in wlfw_send_qdss_trace_mode_req()
1656 int wlfw_qdss_trace_start(struct cnss_plat_data *plat_priv) in wlfw_qdss_trace_start() argument
1658 return wlfw_send_qdss_trace_mode_req(plat_priv, in wlfw_qdss_trace_start()
1662 int wlfw_qdss_trace_stop(struct cnss_plat_data *plat_priv, unsigned long long option) in wlfw_qdss_trace_stop() argument
1664 return wlfw_send_qdss_trace_mode_req(plat_priv, QMI_WLFW_QDSS_TRACE_OFF_V01, in wlfw_qdss_trace_stop()
1668 int cnss_wlfw_wlan_mode_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_wlan_mode_send_sync() argument
1676 if (!plat_priv) in cnss_wlfw_wlan_mode_send_sync()
1680 cnss_qmi_mode_to_str(mode), mode, plat_priv->driver_state); in cnss_wlfw_wlan_mode_send_sync()
1683 test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state)) { in cnss_wlfw_wlan_mode_send_sync()
1702 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_wlan_mode_send_sync()
1710 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_wlan_mode_send_sync()
1752 int cnss_wlfw_wlan_cfg_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_wlan_cfg_send_sync() argument
1762 if (!plat_priv) in cnss_wlfw_wlan_cfg_send_sync()
1766 plat_priv->driver_state); in cnss_wlfw_wlan_cfg_send_sync()
1806 if (plat_priv->device_id != KIWI_DEVICE_ID && in cnss_wlfw_wlan_cfg_send_sync()
1807 plat_priv->device_id != MANGO_DEVICE_ID && in cnss_wlfw_wlan_cfg_send_sync()
1808 plat_priv->device_id != PEACH_DEVICE_ID) { in cnss_wlfw_wlan_cfg_send_sync()
1809 if (plat_priv->device_id == QCN7605_DEVICE_ID && in cnss_wlfw_wlan_cfg_send_sync()
1845 plat_priv->num_shadow_regs_v3 = req->shadow_reg_v3_len; in cnss_wlfw_wlan_cfg_send_sync()
1848 plat_priv->num_shadow_regs_v3); in cnss_wlfw_wlan_cfg_send_sync()
1863 ret = cnss_bus_get_msi_assignment(plat_priv, in cnss_wlfw_wlan_cfg_send_sync()
1880 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_wlan_cfg_send_sync()
1888 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_wlan_cfg_send_sync()
1924 int cnss_wlfw_athdiag_read_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_athdiag_read_send_sync() argument
1933 if (!plat_priv) in cnss_wlfw_athdiag_read_send_sync()
1943 plat_priv->driver_state, offset, mem_type, data_len); in cnss_wlfw_athdiag_read_send_sync()
1959 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_athdiag_read_send_sync()
1967 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_athdiag_read_send_sync()
2011 int cnss_wlfw_athdiag_write_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_athdiag_write_send_sync() argument
2020 if (!plat_priv) in cnss_wlfw_athdiag_write_send_sync()
2030 plat_priv->driver_state, offset, mem_type, data_len, data); in cnss_wlfw_athdiag_write_send_sync()
2047 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_athdiag_write_send_sync()
2055 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_athdiag_write_send_sync()
2090 int cnss_wlfw_ini_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_ini_send_sync() argument
2098 if (!plat_priv) in cnss_wlfw_ini_send_sync()
2102 plat_priv->driver_state, fw_log_mode); in cnss_wlfw_ini_send_sync()
2117 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_ini_send_sync()
2125 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_ini_send_sync()
2160 int cnss_wlfw_send_pcie_gen_speed_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_send_pcie_gen_speed_sync() argument
2167 if (!plat_priv) in cnss_wlfw_send_pcie_gen_speed_sync()
2170 if (plat_priv->pcie_gen_speed == QMI_PCIE_GEN_SPEED_INVALID_V01 || in cnss_wlfw_send_pcie_gen_speed_sync()
2171 !plat_priv->fw_pcie_gen_switch) { in cnss_wlfw_send_pcie_gen_speed_sync()
2177 plat_priv->pcie_gen_speed, plat_priv->driver_state); in cnss_wlfw_send_pcie_gen_speed_sync()
2179 plat_priv->pcie_gen_speed; in cnss_wlfw_send_pcie_gen_speed_sync()
2181 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_send_pcie_gen_speed_sync()
2189 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_send_pcie_gen_speed_sync()
2208 plat_priv->pcie_gen_speed, resp.resp.result, in cnss_wlfw_send_pcie_gen_speed_sync()
2214 plat_priv->pcie_gen_speed = QMI_PCIE_GEN_SPEED_INVALID_V01; in cnss_wlfw_send_pcie_gen_speed_sync()
2218 int cnss_wlfw_antenna_switch_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_antenna_switch_send_sync() argument
2225 if (!plat_priv) in cnss_wlfw_antenna_switch_send_sync()
2229 plat_priv->driver_state); in cnss_wlfw_antenna_switch_send_sync()
2241 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_antenna_switch_send_sync()
2249 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_antenna_switch_send_sync()
2275 plat_priv->antenna = resp->antenna; in cnss_wlfw_antenna_switch_send_sync()
2290 int cnss_wlfw_antenna_grant_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_antenna_grant_send_sync() argument
2297 if (!plat_priv) in cnss_wlfw_antenna_grant_send_sync()
2301 plat_priv->driver_state, plat_priv->grant); in cnss_wlfw_antenna_grant_send_sync()
2314 req->grant = plat_priv->grant; in cnss_wlfw_antenna_grant_send_sync()
2316 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_antenna_grant_send_sync()
2324 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_antenna_grant_send_sync()
2359 int cnss_wlfw_qdss_trace_mem_info_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_qdss_trace_mem_info_send_sync() argument
2364 struct cnss_fw_mem *qdss_mem = plat_priv->qdss_mem; in cnss_wlfw_qdss_trace_mem_info_send_sync()
2369 plat_priv->driver_state); in cnss_wlfw_qdss_trace_mem_info_send_sync()
2381 if (plat_priv->qdss_mem_seg_len > QMI_WLFW_MAX_NUM_MEM_SEG_V01) { in cnss_wlfw_qdss_trace_mem_info_send_sync()
2382 cnss_pr_err("Invalid seg len %u\n", plat_priv->qdss_mem_seg_len); in cnss_wlfw_qdss_trace_mem_info_send_sync()
2387 req->mem_seg_len = plat_priv->qdss_mem_seg_len; in cnss_wlfw_qdss_trace_mem_info_send_sync()
2398 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_qdss_trace_mem_info_send_sync()
2406 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_qdss_trace_mem_info_send_sync()
2441 int cnss_wlfw_send_host_wfc_call_status(struct cnss_plat_data *plat_priv, in cnss_wlfw_send_host_wfc_call_status() argument
2449 if (!test_bit(CNSS_FW_READY, &plat_priv->driver_state)) { in cnss_wlfw_send_host_wfc_call_status()
2467 plat_priv->driver_state); in cnss_wlfw_send_host_wfc_call_status()
2469 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_send_host_wfc_call_status()
2478 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_send_host_wfc_call_status()
2510 (struct cnss_plat_data *plat_priv, in cnss_wlfw_wfc_call_status_send_sync() argument
2518 if (!test_bit(CNSS_FW_READY, &plat_priv->driver_state)) { in cnss_wlfw_wfc_call_status_send_sync()
2558 plat_priv->driver_state); in cnss_wlfw_wfc_call_status_send_sync()
2560 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_wfc_call_status_send_sync()
2568 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_wfc_call_status_send_sync()
2599 int cnss_wlfw_dynamic_feature_mask_send_sync(struct cnss_plat_data *plat_priv) in cnss_wlfw_dynamic_feature_mask_send_sync() argument
2607 plat_priv->dynamic_feature, in cnss_wlfw_dynamic_feature_mask_send_sync()
2608 plat_priv->driver_state); in cnss_wlfw_dynamic_feature_mask_send_sync()
2621 req->mask = plat_priv->dynamic_feature; in cnss_wlfw_dynamic_feature_mask_send_sync()
2623 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_dynamic_feature_mask_send_sync()
2632 (&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_dynamic_feature_mask_send_sync()
2663 int cnss_wlfw_get_info_send_sync(struct cnss_plat_data *plat_priv, int type, in cnss_wlfw_get_info_send_sync() argument
2672 type, cmd_len, plat_priv->driver_state); in cnss_wlfw_get_info_send_sync()
2691 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_get_info_send_sync()
2699 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_get_info_send_sync()
2734 unsigned int cnss_get_qmi_timeout(struct cnss_plat_data *plat_priv) in cnss_get_qmi_timeout() argument
2743 struct cnss_plat_data *plat_priv = in cnss_wlfw_request_mem_ind_cb() local
2760 plat_priv->fw_mem_seg_len = ind_msg->mem_seg_len; in cnss_wlfw_request_mem_ind_cb()
2761 for (i = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_wlfw_request_mem_ind_cb()
2764 plat_priv->fw_mem[i].type = ind_msg->mem_seg[i].type; in cnss_wlfw_request_mem_ind_cb()
2765 plat_priv->fw_mem[i].size = ind_msg->mem_seg[i].size; in cnss_wlfw_request_mem_ind_cb()
2766 if (!plat_priv->fw_mem[i].va && in cnss_wlfw_request_mem_ind_cb()
2767 plat_priv->fw_mem[i].type == CNSS_MEM_TYPE_DDR) in cnss_wlfw_request_mem_ind_cb()
2768 plat_priv->fw_mem[i].attrs |= in cnss_wlfw_request_mem_ind_cb()
2770 if (plat_priv->fw_mem[i].type == CNSS_MEM_CAL_V01) in cnss_wlfw_request_mem_ind_cb()
2771 plat_priv->cal_mem = &plat_priv->fw_mem[i]; in cnss_wlfw_request_mem_ind_cb()
2774 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_REQUEST_MEM, in cnss_wlfw_request_mem_ind_cb()
2782 struct cnss_plat_data *plat_priv = in cnss_wlfw_fw_mem_ready_ind_cb() local
2792 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_FW_MEM_READY, in cnss_wlfw_fw_mem_ready_ind_cb()
2806 struct cnss_plat_data *plat_priv = in cnss_wlfw_fw_ready_ind_cb() local
2815 if (plat_priv->device_id == QCA6390_DEVICE_ID || in cnss_wlfw_fw_ready_ind_cb()
2816 plat_priv->device_id == QCA6490_DEVICE_ID) { in cnss_wlfw_fw_ready_ind_cb()
2827 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_COLD_BOOT_CAL_DONE, in cnss_wlfw_fw_ready_ind_cb()
2835 struct cnss_plat_data *plat_priv = in cnss_wlfw_fw_init_done_ind_cb() local
2845 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_FW_READY, 0, NULL); in cnss_wlfw_fw_init_done_ind_cb()
2852 struct cnss_plat_data *plat_priv = in cnss_wlfw_pin_result_ind_cb() local
2864 plat_priv->pin_result.fw_pwr_pin_result = in cnss_wlfw_pin_result_ind_cb()
2867 plat_priv->pin_result.fw_phy_io_pin_result = in cnss_wlfw_pin_result_ind_cb()
2870 plat_priv->pin_result.fw_rf_pin_result = ind_msg->rf_pin_result; in cnss_wlfw_pin_result_ind_cb()
2877 int cnss_wlfw_cal_report_req_send_sync(struct cnss_plat_data *plat_priv, in cnss_wlfw_cal_report_req_send_sync() argument
2886 cal_file_download_size, plat_priv->driver_state); in cnss_wlfw_cal_report_req_send_sync()
2890 ret = qmi_txn_init(&plat_priv->qmi_wlfw, &txn, in cnss_wlfw_cal_report_req_send_sync()
2897 ret = qmi_send_request(&plat_priv->qmi_wlfw, NULL, &txn, in cnss_wlfw_cal_report_req_send_sync()
2927 struct cnss_plat_data *plat_priv = in cnss_wlfw_cal_done_ind_cb() local
2935 jiffies_to_msecs(jiffies - plat_priv->cal_time)); in cnss_wlfw_cal_done_ind_cb()
2941 plat_priv->cal_file_size = ind->cal_file_upload_size; in cnss_wlfw_cal_done_ind_cb()
2947 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_COLD_BOOT_CAL_DONE, in cnss_wlfw_cal_done_ind_cb()
2956 struct cnss_plat_data *plat_priv = in cnss_wlfw_qdss_trace_req_mem_ind_cb() local
2968 if (plat_priv->qdss_mem_seg_len) { in cnss_wlfw_qdss_trace_req_mem_ind_cb()
2970 plat_priv->qdss_mem_seg_len); in cnss_wlfw_qdss_trace_req_mem_ind_cb()
2979 plat_priv->qdss_mem_seg_len = ind_msg->mem_seg_len; in cnss_wlfw_qdss_trace_req_mem_ind_cb()
2980 for (i = 0; i < plat_priv->qdss_mem_seg_len; i++) { in cnss_wlfw_qdss_trace_req_mem_ind_cb()
2983 plat_priv->qdss_mem[i].type = ind_msg->mem_seg[i].type; in cnss_wlfw_qdss_trace_req_mem_ind_cb()
2984 plat_priv->qdss_mem[i].size = ind_msg->mem_seg[i].size; in cnss_wlfw_qdss_trace_req_mem_ind_cb()
2987 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_QDSS_TRACE_REQ_MEM, in cnss_wlfw_qdss_trace_req_mem_ind_cb()
3005 struct cnss_plat_data *plat_priv = in cnss_wlfw_fw_mem_file_save_ind_cb() local
3052 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_QDSS_TRACE_REQ_DATA, in cnss_wlfw_fw_mem_file_save_ind_cb()
3065 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_FW_MEM_FILE_SAVE, in cnss_wlfw_fw_mem_file_save_ind_cb()
3080 struct cnss_plat_data *plat_priv = in cnss_wlfw_qdss_trace_free_ind_cb() local
3083 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_QDSS_TRACE_FREE, in cnss_wlfw_qdss_trace_free_ind_cb()
3092 struct cnss_plat_data *plat_priv = in cnss_wlfw_respond_get_info_ind_cb() local
3107 if (plat_priv->get_info_cb_ctx && plat_priv->get_info_cb) in cnss_wlfw_respond_get_info_ind_cb()
3108 plat_priv->get_info_cb(plat_priv->get_info_cb_ctx, in cnss_wlfw_respond_get_info_ind_cb()
3118 struct cnss_plat_data *plat_priv = in cnss_wlfw_driver_async_data_ind_cb() local
3132 if (plat_priv->get_driver_async_data_ctx && in cnss_wlfw_driver_async_data_ind_cb()
3133 plat_priv->get_driver_async_data_cb) in cnss_wlfw_driver_async_data_ind_cb()
3134 plat_priv->get_driver_async_data_cb( in cnss_wlfw_driver_async_data_ind_cb()
3135 plat_priv->get_driver_async_data_ctx, ind_msg->type, in cnss_wlfw_driver_async_data_ind_cb()
3141 (struct cnss_plat_data *plat_priv, in cnss_ims_wfc_call_twt_cfg_send_sync() argument
3149 if (!test_bit(CNSS_IMS_CONNECTED, &plat_priv->driver_state)) { in cnss_ims_wfc_call_twt_cfg_send_sync()
3179 plat_priv->driver_state); in cnss_ims_wfc_call_twt_cfg_send_sync()
3182 qmi_txn_init(&plat_priv->ims_qmi, &txn, in cnss_ims_wfc_call_twt_cfg_send_sync()
3192 qmi_send_request(&plat_priv->ims_qmi, NULL, &txn, in cnss_ims_wfc_call_twt_cfg_send_sync()
3221 int cnss_process_twt_cfg_ind_event(struct cnss_plat_data *plat_priv, in cnss_process_twt_cfg_ind_event() argument
3227 ret = cnss_ims_wfc_call_twt_cfg_send_sync(plat_priv, ind_msg); in cnss_process_twt_cfg_ind_event()
3237 struct cnss_plat_data *plat_priv = in cnss_wlfw_process_twt_cfg_ind() local
3263 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_WLFW_TWT_CFG_IND, 0, in cnss_wlfw_process_twt_cfg_ind()
3362 static int cnss_wlfw_connect_to_server(struct cnss_plat_data *plat_priv, in cnss_wlfw_connect_to_server() argument
3366 struct qmi_handle *qmi_wlfw = &plat_priv->qmi_wlfw; in cnss_wlfw_connect_to_server()
3384 set_bit(CNSS_QMI_WLFW_CONNECTED, &plat_priv->driver_state); in cnss_wlfw_connect_to_server()
3387 plat_priv->driver_state); in cnss_wlfw_connect_to_server()
3398 int cnss_wlfw_server_arrive(struct cnss_plat_data *plat_priv, void *data) in cnss_wlfw_server_arrive() argument
3402 if (!plat_priv) in cnss_wlfw_server_arrive()
3405 if (test_bit(CNSS_QMI_WLFW_CONNECTED, &plat_priv->driver_state)) { in cnss_wlfw_server_arrive()
3413 ret = cnss_wlfw_connect_to_server(plat_priv, data); in cnss_wlfw_server_arrive()
3417 ret = cnss_wlfw_ind_register_send_sync(plat_priv); in cnss_wlfw_server_arrive()
3424 ret = cnss_wlfw_host_cap_send_sync(plat_priv); in cnss_wlfw_server_arrive()
3434 int cnss_wlfw_server_exit(struct cnss_plat_data *plat_priv) in cnss_wlfw_server_exit() argument
3438 if (!plat_priv) in cnss_wlfw_server_exit()
3441 clear_bit(CNSS_QMI_WLFW_CONNECTED, &plat_priv->driver_state); in cnss_wlfw_server_exit()
3444 plat_priv->driver_state); in cnss_wlfw_server_exit()
3446 cnss_qmi_deinit(plat_priv); in cnss_wlfw_server_exit()
3448 clear_bit(CNSS_QMI_DEL_SERVER, &plat_priv->driver_state); in cnss_wlfw_server_exit()
3450 ret = cnss_qmi_init(plat_priv); in cnss_wlfw_server_exit()
3461 struct cnss_plat_data *plat_priv = in wlfw_new_server() local
3465 if (plat_priv && test_bit(CNSS_QMI_DEL_SERVER, &plat_priv->driver_state)) { in wlfw_new_server()
3467 plat_priv->driver_state); in wlfw_new_server()
3481 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_SERVER_ARRIVE, in wlfw_new_server()
3490 struct cnss_plat_data *plat_priv = in wlfw_del_server() local
3493 if (plat_priv && test_bit(CNSS_QMI_DEL_SERVER, &plat_priv->driver_state)) { in wlfw_del_server()
3495 plat_priv->driver_state); in wlfw_del_server()
3501 if (plat_priv) { in wlfw_del_server()
3503 set_bit(CNSS_QMI_DEL_SERVER, &plat_priv->driver_state); in wlfw_del_server()
3506 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_SERVER_EXIT, in wlfw_del_server()
3515 static int cnss_qmi_add_lookup(struct cnss_plat_data *plat_priv) in cnss_qmi_add_lookup() argument
3522 if (cnss_is_dual_wlan_enabled() && plat_priv->qrtr_node_id != 0 && in cnss_qmi_add_lookup()
3523 plat_priv->wlfw_service_instance_id != 0) in cnss_qmi_add_lookup()
3524 id = plat_priv->wlfw_service_instance_id; in cnss_qmi_add_lookup()
3526 return qmi_add_lookup(&plat_priv->qmi_wlfw, WLFW_SERVICE_ID_V01, in cnss_qmi_add_lookup()
3530 int cnss_qmi_init(struct cnss_plat_data *plat_priv) in cnss_qmi_init() argument
3533 cnss_get_qrtr_info(plat_priv); in cnss_qmi_init()
3535 ret = qmi_handle_init(&plat_priv->qmi_wlfw, in cnss_qmi_init()
3544 ret = cnss_qmi_add_lookup(plat_priv); in cnss_qmi_init()
3552 void cnss_qmi_deinit(struct cnss_plat_data *plat_priv) in cnss_qmi_deinit() argument
3554 qmi_handle_release(&plat_priv->qmi_wlfw); in cnss_qmi_deinit()
3557 int cnss_qmi_get_dms_mac(struct cnss_plat_data *plat_priv) in cnss_qmi_get_dms_mac() argument
3564 if (!test_bit(CNSS_QMI_DMS_CONNECTED, &plat_priv->driver_state)) { in cnss_qmi_get_dms_mac()
3571 ret = qmi_txn_init(&plat_priv->qmi_dms, &txn, in cnss_qmi_get_dms_mac()
3579 ret = qmi_send_request(&plat_priv->qmi_dms, NULL, &txn, in cnss_qmi_get_dms_mac()
3605 plat_priv->dms.mac_valid = false; in cnss_qmi_get_dms_mac()
3608 plat_priv->dms.mac_valid = true; in cnss_qmi_get_dms_mac()
3609 memcpy(plat_priv->dms.mac, resp.mac_address, QMI_WLFW_MAC_ADDR_SIZE_V01); in cnss_qmi_get_dms_mac()
3610 cnss_pr_info("Received DMS MAC: [%pM]\n", plat_priv->dms.mac); in cnss_qmi_get_dms_mac()
3615 static int cnss_dms_connect_to_server(struct cnss_plat_data *plat_priv, in cnss_dms_connect_to_server() argument
3618 struct qmi_handle *qmi_dms = &plat_priv->qmi_dms; in cnss_dms_connect_to_server()
3634 set_bit(CNSS_QMI_DMS_CONNECTED, &plat_priv->driver_state); in cnss_dms_connect_to_server()
3636 plat_priv->driver_state); in cnss_dms_connect_to_server()
3644 struct cnss_plat_data *plat_priv = in dms_new_server() local
3650 return cnss_dms_connect_to_server(plat_priv, service->node, in dms_new_server()
3657 struct cnss_plat_data *plat_priv = cnss_get_plat_priv(NULL); in cnss_dms_server_exit_work() local
3659 cnss_dms_deinit(plat_priv); in cnss_dms_server_exit_work()
3662 clear_bit(CNSS_DMS_DEL_SERVER, &plat_priv->driver_state); in cnss_dms_server_exit_work()
3664 ret = cnss_dms_init(plat_priv); in cnss_dms_server_exit_work()
3674 struct cnss_plat_data *plat_priv = in dms_del_server() local
3677 if (!plat_priv) in dms_del_server()
3680 if (test_bit(CNSS_DMS_DEL_SERVER, &plat_priv->driver_state)) { in dms_del_server()
3682 plat_priv->driver_state); in dms_del_server()
3686 set_bit(CNSS_DMS_DEL_SERVER, &plat_priv->driver_state); in dms_del_server()
3687 clear_bit(CNSS_QMI_DMS_CONNECTED, &plat_priv->driver_state); in dms_del_server()
3689 plat_priv->driver_state); in dms_del_server()
3703 int cnss_dms_init(struct cnss_plat_data *plat_priv) in cnss_dms_init() argument
3707 ret = qmi_handle_init(&plat_priv->qmi_dms, DMS_QMI_MAX_MSG_LEN, in cnss_dms_init()
3714 ret = qmi_add_lookup(&plat_priv->qmi_dms, DMS_SERVICE_ID_V01, in cnss_dms_init()
3722 void cnss_dms_deinit(struct cnss_plat_data *plat_priv) in cnss_dms_deinit() argument
3724 set_bit(CNSS_DMS_DEL_SERVER, &plat_priv->driver_state); in cnss_dms_deinit()
3725 qmi_handle_release(&plat_priv->qmi_dms); in cnss_dms_deinit()
3728 int coex_antenna_switch_to_wlan_send_sync_msg(struct cnss_plat_data *plat_priv) in coex_antenna_switch_to_wlan_send_sync_msg() argument
3735 if (!plat_priv) in coex_antenna_switch_to_wlan_send_sync_msg()
3750 req->antenna = plat_priv->antenna; in coex_antenna_switch_to_wlan_send_sync_msg()
3752 ret = qmi_txn_init(&plat_priv->coex_qmi, &txn, in coex_antenna_switch_to_wlan_send_sync_msg()
3761 (&plat_priv->coex_qmi, NULL, &txn, in coex_antenna_switch_to_wlan_send_sync_msg()
3785 plat_priv->grant = resp->grant; in coex_antenna_switch_to_wlan_send_sync_msg()
3799 int coex_antenna_switch_to_mdm_send_sync_msg(struct cnss_plat_data *plat_priv) in coex_antenna_switch_to_mdm_send_sync_msg() argument
3806 if (!plat_priv) in coex_antenna_switch_to_mdm_send_sync_msg()
3821 req->antenna = plat_priv->antenna; in coex_antenna_switch_to_mdm_send_sync_msg()
3823 ret = qmi_txn_init(&plat_priv->coex_qmi, &txn, in coex_antenna_switch_to_mdm_send_sync_msg()
3832 (&plat_priv->coex_qmi, NULL, &txn, in coex_antenna_switch_to_mdm_send_sync_msg()
3865 int cnss_send_subsys_restart_level_msg(struct cnss_plat_data *plat_priv) in cnss_send_subsys_restart_level_msg() argument
3872 if (!plat_priv) in cnss_send_subsys_restart_level_msg()
3875 if (!test_bit(CNSS_FW_READY, &plat_priv->driver_state)) { in cnss_send_subsys_restart_level_msg()
3880 pcss_enabled = plat_priv->recovery_pcss_enabled; in cnss_send_subsys_restart_level_msg()
3886 ret = qmi_send_wait(&plat_priv->qmi_wlfw, &req, &resp, in cnss_send_subsys_restart_level_msg()
3901 struct cnss_plat_data *plat_priv = in coex_new_server() local
3918 set_bit(CNSS_COEX_CONNECTED, &plat_priv->driver_state); in coex_new_server()
3920 plat_priv->driver_state); in coex_new_server()
3927 struct cnss_plat_data *plat_priv = in coex_del_server() local
3932 clear_bit(CNSS_COEX_CONNECTED, &plat_priv->driver_state); in coex_del_server()
3940 int cnss_register_coex_service(struct cnss_plat_data *plat_priv) in cnss_register_coex_service() argument
3943 ret = qmi_handle_init(&plat_priv->coex_qmi, in cnss_register_coex_service()
3949 ret = qmi_add_lookup(&plat_priv->coex_qmi, COEX_SERVICE_ID_V01, in cnss_register_coex_service()
3954 void cnss_unregister_coex_service(struct cnss_plat_data *plat_priv) in cnss_unregister_coex_service() argument
3956 qmi_handle_release(&plat_priv->coex_qmi); in cnss_unregister_coex_service()
3960 int ims_subscribe_for_indication_send_async(struct cnss_plat_data *plat_priv) in ims_subscribe_for_indication_send_async() argument
3966 if (!plat_priv) in ims_subscribe_for_indication_send_async()
3978 txn = &plat_priv->txn; in ims_subscribe_for_indication_send_async()
3979 ret = qmi_txn_init(&plat_priv->ims_qmi, txn, NULL, NULL); in ims_subscribe_for_indication_send_async()
3987 (&plat_priv->ims_qmi, NULL, txn, in ims_subscribe_for_indication_send_async()
4029 int cnss_process_wfc_call_ind_event(struct cnss_plat_data *plat_priv, in cnss_process_wfc_call_ind_event() argument
4035 ret = cnss_wlfw_wfc_call_status_send_sync(plat_priv, ind_msg); in cnss_process_wfc_call_ind_event()
4045 struct cnss_plat_data *plat_priv = in cnss_ims_process_wfc_call_ind_cb() local
4071 cnss_driver_event_post(plat_priv, CNSS_DRIVER_EVENT_IMS_WFC_CALL_IND, in cnss_ims_process_wfc_call_ind_cb()
4100 struct cnss_plat_data *plat_priv = in ims_new_server() local
4117 set_bit(CNSS_IMS_CONNECTED, &plat_priv->driver_state); in ims_new_server()
4119 plat_priv->driver_state); in ims_new_server()
4121 ret = ims_subscribe_for_indication_send_async(plat_priv); in ims_new_server()
4128 struct cnss_plat_data *plat_priv = in ims_del_server() local
4133 clear_bit(CNSS_IMS_CONNECTED, &plat_priv->driver_state); in ims_del_server()
4141 int cnss_register_ims_service(struct cnss_plat_data *plat_priv) in cnss_register_ims_service() argument
4144 ret = qmi_handle_init(&plat_priv->ims_qmi, in cnss_register_ims_service()
4150 ret = qmi_add_lookup(&plat_priv->ims_qmi, IMSPRIVATE_SERVICE_ID_V01, in cnss_register_ims_service()
4155 void cnss_unregister_ims_service(struct cnss_plat_data *plat_priv) in cnss_unregister_ims_service() argument
4157 qmi_handle_release(&plat_priv->ims_qmi); in cnss_unregister_ims_service()