Lines Matching refs:ret
86 int ret; in wlfw_msa_mem_info_send_sync_msg() local
113 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_msa_mem_info_send_sync_msg()
115 if (ret < 0) { in wlfw_msa_mem_info_send_sync_msg()
118 ret); in wlfw_msa_mem_info_send_sync_msg()
122 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_msa_mem_info_send_sync_msg()
126 if (ret < 0) { in wlfw_msa_mem_info_send_sync_msg()
128 icnss_qmi_fatal_err("Fail to send MSA Mem info req %d\n", ret); in wlfw_msa_mem_info_send_sync_msg()
132 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_msa_mem_info_send_sync_msg()
133 if (ret < 0) { in wlfw_msa_mem_info_send_sync_msg()
135 ret); in wlfw_msa_mem_info_send_sync_msg()
141 ret = -resp->resp.result; in wlfw_msa_mem_info_send_sync_msg()
152 ret = -EINVAL; in wlfw_msa_mem_info_send_sync_msg()
169 ret = -EINVAL; in wlfw_msa_mem_info_send_sync_msg()
195 return ret; in wlfw_msa_mem_info_send_sync_msg()
200 int ret; in wlfw_msa_ready_send_sync_msg() local
223 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_msa_ready_send_sync_msg()
225 if (ret < 0) { in wlfw_msa_ready_send_sync_msg()
228 ret); in wlfw_msa_ready_send_sync_msg()
232 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_msa_ready_send_sync_msg()
236 if (ret < 0) { in wlfw_msa_ready_send_sync_msg()
238 icnss_qmi_fatal_err("Fail to send MSA Mem Ready req %d\n", ret); in wlfw_msa_ready_send_sync_msg()
242 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_msa_ready_send_sync_msg()
243 if (ret < 0) { in wlfw_msa_ready_send_sync_msg()
246 ret); in wlfw_msa_ready_send_sync_msg()
252 ret = -resp->resp.result; in wlfw_msa_ready_send_sync_msg()
266 return ret; in wlfw_msa_ready_send_sync_msg()
271 int ret; in wlfw_device_info_send_msg() local
294 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_device_info_send_msg()
296 if (ret < 0) { in wlfw_device_info_send_msg()
299 ret); in wlfw_device_info_send_msg()
303 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_device_info_send_msg()
307 if (ret < 0) { in wlfw_device_info_send_msg()
309 icnss_qmi_fatal_err("Fail to send device info req %d\n", ret); in wlfw_device_info_send_msg()
313 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_device_info_send_msg()
314 if (ret < 0) { in wlfw_device_info_send_msg()
317 ret); in wlfw_device_info_send_msg()
323 ret = -resp->resp.result; in wlfw_device_info_send_msg()
336 ret = -EINVAL; in wlfw_device_info_send_msg()
342 ret = -EINVAL; in wlfw_device_info_send_msg()
365 return ret; in wlfw_device_info_send_msg()
371 int ret; in wlfw_power_save_send_msg() local
400 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_power_save_send_msg()
402 if (ret < 0) { in wlfw_power_save_send_msg()
404 ret); in wlfw_power_save_send_msg()
408 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_power_save_send_msg()
412 if (ret < 0) { in wlfw_power_save_send_msg()
415 ret); in wlfw_power_save_send_msg()
436 return ret; in wlfw_power_save_send_msg()
442 int ret; in wlfw_send_soc_wake_msg() local
470 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_send_soc_wake_msg()
473 if (ret < 0) { in wlfw_send_soc_wake_msg()
475 ret); in wlfw_send_soc_wake_msg()
479 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_send_soc_wake_msg()
483 if (ret < 0) { in wlfw_send_soc_wake_msg()
485 icnss_pr_err("Fail to send soc wake msg %d\n", ret); in wlfw_send_soc_wake_msg()
489 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_send_soc_wake_msg()
490 if (ret < 0) { in wlfw_send_soc_wake_msg()
492 ret); in wlfw_send_soc_wake_msg()
498 ret = -resp->resp.result; in wlfw_send_soc_wake_msg()
512 return ret; in wlfw_send_soc_wake_msg()
517 int ret; in wlfw_ind_register_send_sync_msg() local
573 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_ind_register_send_sync_msg()
575 if (ret < 0) { in wlfw_ind_register_send_sync_msg()
578 ret); in wlfw_ind_register_send_sync_msg()
582 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_ind_register_send_sync_msg()
586 if (ret < 0) { in wlfw_ind_register_send_sync_msg()
588 icnss_qmi_fatal_err("Fail to send Ind Register req %d\n", ret); in wlfw_ind_register_send_sync_msg()
592 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_ind_register_send_sync_msg()
593 if (ret < 0) { in wlfw_ind_register_send_sync_msg()
596 ret); in wlfw_ind_register_send_sync_msg()
602 ret = -resp->resp.result; in wlfw_ind_register_send_sync_msg()
610 ret = -EALREADY; in wlfw_ind_register_send_sync_msg()
625 return ret; in wlfw_ind_register_send_sync_msg()
630 int ret; in wlfw_cal_report_req() local
655 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_cal_report_req()
657 if (ret < 0) { in wlfw_cal_report_req()
659 ret); in wlfw_cal_report_req()
663 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_cal_report_req()
667 if (ret < 0) { in wlfw_cal_report_req()
669 icnss_qmi_fatal_err("Fail to send cal report req %d\n", ret); in wlfw_cal_report_req()
673 ret = qmi_txn_wait(&txn, in wlfw_cal_report_req()
676 if (ret < 0) { in wlfw_cal_report_req()
678 ret); in wlfw_cal_report_req()
683 ret = -resp->resp.result; in wlfw_cal_report_req()
693 return ret; in wlfw_cal_report_req()
698 int ret = 0, i = 0; in wlfw_cap_send_sync_msg() local
721 ret = qmi_txn_init(&priv->qmi, &txn, wlfw_cap_resp_msg_v01_ei, resp); in wlfw_cap_send_sync_msg()
722 if (ret < 0) { in wlfw_cap_send_sync_msg()
724 ret); in wlfw_cap_send_sync_msg()
728 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_cap_send_sync_msg()
732 if (ret < 0) { in wlfw_cap_send_sync_msg()
734 icnss_qmi_fatal_err("Fail to send Capability req %d\n", ret); in wlfw_cap_send_sync_msg()
738 ret = qmi_txn_wait(&txn, in wlfw_cap_send_sync_msg()
741 if (ret < 0) { in wlfw_cap_send_sync_msg()
743 ret); in wlfw_cap_send_sync_msg()
746 ret = -resp->resp.result; in wlfw_cap_send_sync_msg()
846 return ret; in wlfw_cap_send_sync_msg()
854 int ret = 0; in icnss_qmi_get_dms_mac() local
863 ret = qmi_txn_init(&priv->qmi_dms, &txn, in icnss_qmi_get_dms_mac()
865 if (ret < 0) { in icnss_qmi_get_dms_mac()
867 ret); in icnss_qmi_get_dms_mac()
871 ret = qmi_send_request(&priv->qmi_dms, NULL, &txn, in icnss_qmi_get_dms_mac()
875 if (ret < 0) { in icnss_qmi_get_dms_mac()
878 ret); in icnss_qmi_get_dms_mac()
881 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_qmi_get_dms_mac()
882 if (ret < 0) { in icnss_qmi_get_dms_mac()
884 ret); in icnss_qmi_get_dms_mac()
896 ret = -resp.resp.result; in icnss_qmi_get_dms_mac()
909 return ret; in icnss_qmi_get_dms_mac()
918 int ret; in icnss_wlfw_wlan_mac_req_send_sync() local
923 ret = qmi_txn_init(&priv->qmi, &txn, in icnss_wlfw_wlan_mac_req_send_sync()
925 if (ret < 0) { in icnss_wlfw_wlan_mac_req_send_sync()
927 ret); in icnss_wlfw_wlan_mac_req_send_sync()
928 ret = -EIO; in icnss_wlfw_wlan_mac_req_send_sync()
937 ret = qmi_send_request(&priv->qmi, NULL, &txn, in icnss_wlfw_wlan_mac_req_send_sync()
941 if (ret < 0) { in icnss_wlfw_wlan_mac_req_send_sync()
943 icnss_pr_err("Failed to send mac req, err: %d\n", ret); in icnss_wlfw_wlan_mac_req_send_sync()
944 ret = -EIO; in icnss_wlfw_wlan_mac_req_send_sync()
948 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_wlfw_wlan_mac_req_send_sync()
949 if (ret < 0) { in icnss_wlfw_wlan_mac_req_send_sync()
951 ret); in icnss_wlfw_wlan_mac_req_send_sync()
952 ret = -EIO; in icnss_wlfw_wlan_mac_req_send_sync()
959 ret = -resp.resp.result; in icnss_wlfw_wlan_mac_req_send_sync()
962 return ret; in icnss_wlfw_wlan_mac_req_send_sync()
970 int ret = 0; in icnss_dms_connect_to_server() local
976 ret = kernel_connect(qmi_dms->sock, (struct sockaddr *)&sq, in icnss_dms_connect_to_server()
978 if (ret < 0) { in icnss_dms_connect_to_server()
988 return ret; in icnss_dms_connect_to_server()
1022 int ret = 0; in icnss_dms_init() local
1024 ret = qmi_handle_init(&priv->qmi_dms, DMS_QMI_MAX_MSG_LEN, in icnss_dms_init()
1026 if (ret < 0) { in icnss_dms_init()
1027 icnss_pr_err("Failed to initialize DMS handle, err: %d\n", ret); in icnss_dms_init()
1031 ret = qmi_add_lookup(&priv->qmi_dms, DMS_SERVICE_ID_V01, in icnss_dms_init()
1033 if (ret < 0) in icnss_dms_init()
1034 icnss_pr_err("Failed to add DMS lookup, err: %d\n", ret); in icnss_dms_init()
1036 return ret; in icnss_dms_init()
1050 int ret = 0; in icnss_get_bdf_file_name() local
1093 ret = -EINVAL; in icnss_get_bdf_file_name()
1097 if (!ret) in icnss_get_bdf_file_name()
1100 return ret; in icnss_get_bdf_file_name()
1126 int ret = 0; in icnss_wlfw_bdf_dnld_send_sync() local
1141 ret = icnss_get_bdf_file_name(priv, bdf_type, in icnss_wlfw_bdf_dnld_send_sync()
1143 if (ret) in icnss_wlfw_bdf_dnld_send_sync()
1146 ret = firmware_request_nowarn(&fw_entry, filename, &priv->pdev->dev); in icnss_wlfw_bdf_dnld_send_sync()
1147 if (ret) { in icnss_wlfw_bdf_dnld_send_sync()
1149 icnss_bdf_type_to_str(bdf_type), filename, ret); in icnss_wlfw_bdf_dnld_send_sync()
1180 ret = qmi_txn_init(&priv->qmi, &txn, in icnss_wlfw_bdf_dnld_send_sync()
1182 if (ret < 0) { in icnss_wlfw_bdf_dnld_send_sync()
1184 icnss_bdf_type_to_str(bdf_type), ret); in icnss_wlfw_bdf_dnld_send_sync()
1188 ret = qmi_send_request in icnss_wlfw_bdf_dnld_send_sync()
1193 if (ret < 0) { in icnss_wlfw_bdf_dnld_send_sync()
1196 icnss_bdf_type_to_str(bdf_type), ret); in icnss_wlfw_bdf_dnld_send_sync()
1200 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_wlfw_bdf_dnld_send_sync()
1201 if (ret < 0) { in icnss_wlfw_bdf_dnld_send_sync()
1203 icnss_bdf_type_to_str(bdf_type), ret); in icnss_wlfw_bdf_dnld_send_sync()
1211 ret = -resp->resp.result; in icnss_wlfw_bdf_dnld_send_sync()
1233 return ret; in icnss_wlfw_bdf_dnld_send_sync()
1239 int ret = 0; in icnss_wlfw_qdss_data_send_sync() local
1260 ret = ENOMEM; in icnss_wlfw_qdss_data_send_sync()
1267 ret = qmi_txn_init(&priv->qmi, &txn, in icnss_wlfw_qdss_data_send_sync()
1270 if (ret < 0) { in icnss_wlfw_qdss_data_send_sync()
1272 ret); in icnss_wlfw_qdss_data_send_sync()
1276 ret = qmi_send_request in icnss_wlfw_qdss_data_send_sync()
1282 if (ret < 0) { in icnss_wlfw_qdss_data_send_sync()
1285 ret); in icnss_wlfw_qdss_data_send_sync()
1289 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_wlfw_qdss_data_send_sync()
1291 if (ret < 0) { in icnss_wlfw_qdss_data_send_sync()
1293 ret); in icnss_wlfw_qdss_data_send_sync()
1298 ret = -resp->resp.result; in icnss_wlfw_qdss_data_send_sync()
1301 ret = 0; in icnss_wlfw_qdss_data_send_sync()
1325 ret = -EINVAL; in icnss_wlfw_qdss_data_send_sync()
1335 ret = icnss_genl_send_msg(p_qdss_trace_data, in icnss_wlfw_qdss_data_send_sync()
1338 if (ret < 0) { in icnss_wlfw_qdss_data_send_sync()
1340 ret); in icnss_wlfw_qdss_data_send_sync()
1341 ret = -EINVAL; in icnss_wlfw_qdss_data_send_sync()
1347 ret = -EINVAL; in icnss_wlfw_qdss_data_send_sync()
1356 return ret; in icnss_wlfw_qdss_data_send_sync()
1368 int ret = 0; in icnss_wlfw_qdss_dnld_send_sync() local
1384 ret = firmware_request_nowarn(&fw_entry, filename, in icnss_wlfw_qdss_dnld_send_sync()
1386 if (ret) { in icnss_wlfw_qdss_dnld_send_sync()
1388 filename, ret); in icnss_wlfw_qdss_dnld_send_sync()
1414 ret = qmi_txn_init in icnss_wlfw_qdss_dnld_send_sync()
1418 if (ret < 0) { in icnss_wlfw_qdss_dnld_send_sync()
1420 ret); in icnss_wlfw_qdss_dnld_send_sync()
1424 ret = qmi_send_request in icnss_wlfw_qdss_dnld_send_sync()
1429 if (ret < 0) { in icnss_wlfw_qdss_dnld_send_sync()
1432 ret); in icnss_wlfw_qdss_dnld_send_sync()
1436 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_wlfw_qdss_dnld_send_sync()
1437 if (ret < 0) { in icnss_wlfw_qdss_dnld_send_sync()
1439 ret); in icnss_wlfw_qdss_dnld_send_sync()
1446 ret = -resp->resp.result; in icnss_wlfw_qdss_dnld_send_sync()
1466 return ret; in icnss_wlfw_qdss_dnld_send_sync()
1472 int ret; in wlfw_wlan_mode_send_sync_msg() local
1517 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_wlan_mode_send_sync_msg()
1519 if (ret < 0) { in wlfw_wlan_mode_send_sync_msg()
1520 icnss_qmi_fatal_err("Fail to init txn for Mode resp %d\n", ret); in wlfw_wlan_mode_send_sync_msg()
1524 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_wlan_mode_send_sync_msg()
1528 if (ret < 0) { in wlfw_wlan_mode_send_sync_msg()
1530 icnss_qmi_fatal_err("Fail to send Mode req %d\n", ret); in wlfw_wlan_mode_send_sync_msg()
1534 ret = qmi_txn_wait(&txn, in wlfw_wlan_mode_send_sync_msg()
1537 if (ret < 0) { in wlfw_wlan_mode_send_sync_msg()
1538 icnss_qmi_fatal_err("Mode resp wait failed with ret %d\n", ret); in wlfw_wlan_mode_send_sync_msg()
1544 ret = -resp->resp.result; in wlfw_wlan_mode_send_sync_msg()
1568 return ret; in wlfw_wlan_mode_send_sync_msg()
1662 int ret; in wlfw_wlan_cfg_send_sync_msg() local
1686 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_wlan_cfg_send_sync_msg()
1688 if (ret < 0) { in wlfw_wlan_cfg_send_sync_msg()
1690 ret); in wlfw_wlan_cfg_send_sync_msg()
1694 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_wlan_cfg_send_sync_msg()
1698 if (ret < 0) { in wlfw_wlan_cfg_send_sync_msg()
1700 icnss_qmi_fatal_err("Fail to send Config req %d\n", ret); in wlfw_wlan_cfg_send_sync_msg()
1704 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_wlan_cfg_send_sync_msg()
1705 if (ret < 0) { in wlfw_wlan_cfg_send_sync_msg()
1707 ret); in wlfw_wlan_cfg_send_sync_msg()
1713 ret = -resp->resp.result; in wlfw_wlan_cfg_send_sync_msg()
1727 return ret; in wlfw_wlan_cfg_send_sync_msg()
1732 int ret; in wlfw_send_modem_shutdown_msg() local
1759 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_send_modem_shutdown_msg()
1762 if (ret < 0) { in wlfw_send_modem_shutdown_msg()
1764 ret); in wlfw_send_modem_shutdown_msg()
1768 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_send_modem_shutdown_msg()
1772 if (ret < 0) { in wlfw_send_modem_shutdown_msg()
1774 icnss_pr_err("Fail to send Shutdown req %d\n", ret); in wlfw_send_modem_shutdown_msg()
1778 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_send_modem_shutdown_msg()
1779 if (ret < 0) { in wlfw_send_modem_shutdown_msg()
1781 ret); in wlfw_send_modem_shutdown_msg()
1786 ret = -resp->resp.result; in wlfw_send_modem_shutdown_msg()
1793 return ret; in wlfw_send_modem_shutdown_msg()
1798 int ret; in wlfw_ini_send_sync_msg() local
1824 ret = qmi_txn_init(&priv->qmi, &txn, wlfw_ini_resp_msg_v01_ei, resp); in wlfw_ini_send_sync_msg()
1825 if (ret < 0) { in wlfw_ini_send_sync_msg()
1826 icnss_qmi_fatal_err("Fail to init txn for INI resp %d\n", ret); in wlfw_ini_send_sync_msg()
1830 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_ini_send_sync_msg()
1834 if (ret < 0) { in wlfw_ini_send_sync_msg()
1836 icnss_qmi_fatal_err("Fail to send INI req %d\n", ret); in wlfw_ini_send_sync_msg()
1840 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_ini_send_sync_msg()
1841 if (ret < 0) { in wlfw_ini_send_sync_msg()
1842 icnss_qmi_fatal_err("INI resp wait failed with ret %d\n", ret); in wlfw_ini_send_sync_msg()
1848 ret = -resp->resp.result; in wlfw_ini_send_sync_msg()
1862 return ret; in wlfw_ini_send_sync_msg()
1869 int ret; in wlfw_athdiag_read_send_sync_msg() local
1894 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_athdiag_read_send_sync_msg()
1896 if (ret < 0) { in wlfw_athdiag_read_send_sync_msg()
1898 ret); in wlfw_athdiag_read_send_sync_msg()
1902 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_athdiag_read_send_sync_msg()
1906 if (ret < 0) { in wlfw_athdiag_read_send_sync_msg()
1908 icnss_pr_err("Fail to send Athdiag Read req %d\n", ret); in wlfw_athdiag_read_send_sync_msg()
1912 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_athdiag_read_send_sync_msg()
1913 if (ret < 0) { in wlfw_athdiag_read_send_sync_msg()
1915 ret); in wlfw_athdiag_read_send_sync_msg()
1920 ret = -resp->resp.result; in wlfw_athdiag_read_send_sync_msg()
1923 ret = 0; in wlfw_athdiag_read_send_sync_msg()
1929 ret = -EINVAL; in wlfw_athdiag_read_send_sync_msg()
1938 return ret; in wlfw_athdiag_read_send_sync_msg()
1945 int ret; in wlfw_athdiag_write_send_sync_msg() local
1971 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_athdiag_write_send_sync_msg()
1973 if (ret < 0) { in wlfw_athdiag_write_send_sync_msg()
1975 ret); in wlfw_athdiag_write_send_sync_msg()
1979 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_athdiag_write_send_sync_msg()
1983 if (ret < 0) { in wlfw_athdiag_write_send_sync_msg()
1985 icnss_pr_err("Fail to send Athdiag Write req %d\n", ret); in wlfw_athdiag_write_send_sync_msg()
1989 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_athdiag_write_send_sync_msg()
1990 if (ret < 0) { in wlfw_athdiag_write_send_sync_msg()
1992 ret); in wlfw_athdiag_write_send_sync_msg()
1997 ret = -resp->resp.result; in wlfw_athdiag_write_send_sync_msg()
2000 ret = 0; in wlfw_athdiag_write_send_sync_msg()
2006 return ret; in wlfw_athdiag_write_send_sync_msg()
2011 int ret; in wlfw_rejuvenate_ack_send_sync_msg() local
2034 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_rejuvenate_ack_send_sync_msg()
2036 if (ret < 0) { in wlfw_rejuvenate_ack_send_sync_msg()
2039 ret); in wlfw_rejuvenate_ack_send_sync_msg()
2043 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_rejuvenate_ack_send_sync_msg()
2047 if (ret < 0) { in wlfw_rejuvenate_ack_send_sync_msg()
2050 ret); in wlfw_rejuvenate_ack_send_sync_msg()
2054 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_rejuvenate_ack_send_sync_msg()
2055 if (ret < 0) { in wlfw_rejuvenate_ack_send_sync_msg()
2058 ret); in wlfw_rejuvenate_ack_send_sync_msg()
2064 ret = -resp->resp.result; in wlfw_rejuvenate_ack_send_sync_msg()
2078 return ret; in wlfw_rejuvenate_ack_send_sync_msg()
2084 int ret; in wlfw_dynamic_feature_mask_send_sync_msg() local
2119 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_dynamic_feature_mask_send_sync_msg()
2121 if (ret < 0) { in wlfw_dynamic_feature_mask_send_sync_msg()
2123 ret); in wlfw_dynamic_feature_mask_send_sync_msg()
2127 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_dynamic_feature_mask_send_sync_msg()
2131 if (ret < 0) { in wlfw_dynamic_feature_mask_send_sync_msg()
2133 icnss_pr_err("Fail to send Dynamic Feature Mask req %d\n", ret); in wlfw_dynamic_feature_mask_send_sync_msg()
2137 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_dynamic_feature_mask_send_sync_msg()
2138 if (ret < 0) { in wlfw_dynamic_feature_mask_send_sync_msg()
2140 ret); in wlfw_dynamic_feature_mask_send_sync_msg()
2145 ret = -resp->resp.result; in wlfw_dynamic_feature_mask_send_sync_msg()
2156 return ret; in wlfw_dynamic_feature_mask_send_sync_msg()
2185 int ret = 0; in wlfw_qdss_trace_mem_info_send_sync() local
2209 ret = -EINVAL; in wlfw_qdss_trace_mem_info_send_sync()
2223 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_qdss_trace_mem_info_send_sync()
2225 if (ret < 0) { in wlfw_qdss_trace_mem_info_send_sync()
2227 ret); in wlfw_qdss_trace_mem_info_send_sync()
2231 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_qdss_trace_mem_info_send_sync()
2235 if (ret < 0) { in wlfw_qdss_trace_mem_info_send_sync()
2238 ret); in wlfw_qdss_trace_mem_info_send_sync()
2242 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_qdss_trace_mem_info_send_sync()
2243 if (ret < 0) { in wlfw_qdss_trace_mem_info_send_sync()
2245 ret); in wlfw_qdss_trace_mem_info_send_sync()
2252 ret = -resp->resp.result; in wlfw_qdss_trace_mem_info_send_sync()
2263 return ret; in wlfw_qdss_trace_mem_info_send_sync()
2272 int ret = 0; in icnss_wlfw_m3_dump_upload_done_send_sync() local
2290 ret = qmi_txn_init(&priv->qmi, &txn, in icnss_wlfw_m3_dump_upload_done_send_sync()
2292 if (ret < 0) { in icnss_wlfw_m3_dump_upload_done_send_sync()
2294 ret); in icnss_wlfw_m3_dump_upload_done_send_sync()
2298 ret = qmi_send_request(&priv->qmi, NULL, &txn, in icnss_wlfw_m3_dump_upload_done_send_sync()
2302 if (ret < 0) { in icnss_wlfw_m3_dump_upload_done_send_sync()
2305 ret); in icnss_wlfw_m3_dump_upload_done_send_sync()
2309 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_wlfw_m3_dump_upload_done_send_sync()
2310 if (ret < 0) { in icnss_wlfw_m3_dump_upload_done_send_sync()
2312 ret); in icnss_wlfw_m3_dump_upload_done_send_sync()
2317 ret = -resp->resp.result; in icnss_wlfw_m3_dump_upload_done_send_sync()
2324 return ret; in icnss_wlfw_m3_dump_upload_done_send_sync()
2807 int ret = 0; in icnss_wlfw_wfc_call_status_send_sync() local
2852 ret = qmi_txn_init(&priv->qmi, &txn, in icnss_wlfw_wfc_call_status_send_sync()
2854 if (ret < 0) { in icnss_wlfw_wfc_call_status_send_sync()
2856 ret); in icnss_wlfw_wfc_call_status_send_sync()
2860 ret = qmi_send_request(&priv->qmi, NULL, &txn, in icnss_wlfw_wfc_call_status_send_sync()
2864 if (ret < 0) { in icnss_wlfw_wfc_call_status_send_sync()
2867 ret); in icnss_wlfw_wfc_call_status_send_sync()
2871 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_wlfw_wfc_call_status_send_sync()
2872 if (ret < 0) { in icnss_wlfw_wfc_call_status_send_sync()
2874 ret); in icnss_wlfw_wfc_call_status_send_sync()
2881 ret = -resp->resp.result; in icnss_wlfw_wfc_call_status_send_sync()
2884 ret = 0; in icnss_wlfw_wfc_call_status_send_sync()
2888 return ret; in icnss_wlfw_wfc_call_status_send_sync()
2898 int ret = 0; in icnss_ims_wfc_call_twt_cfg_send_sync() local
2932 ret = in icnss_ims_wfc_call_twt_cfg_send_sync()
2936 if (ret < 0) { in icnss_ims_wfc_call_twt_cfg_send_sync()
2938 ret); in icnss_ims_wfc_call_twt_cfg_send_sync()
2942 ret = in icnss_ims_wfc_call_twt_cfg_send_sync()
2947 if (ret < 0) { in icnss_ims_wfc_call_twt_cfg_send_sync()
2949 icnss_pr_err("CNSS->IMS: TWT_CFG_REQ: QMI Send Err: %d\n", ret); in icnss_ims_wfc_call_twt_cfg_send_sync()
2953 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_ims_wfc_call_twt_cfg_send_sync()
2954 if (ret < 0) { in icnss_ims_wfc_call_twt_cfg_send_sync()
2955 icnss_pr_err("IMS->CNSS: TWT_CFG_RSP: QMI Wait Err: %d\n", ret); in icnss_ims_wfc_call_twt_cfg_send_sync()
2962 ret = -resp->resp.result; in icnss_ims_wfc_call_twt_cfg_send_sync()
2965 ret = 0; in icnss_ims_wfc_call_twt_cfg_send_sync()
2969 return ret; in icnss_ims_wfc_call_twt_cfg_send_sync()
2975 int ret; in icnss_process_twt_cfg_ind_event() local
2978 ret = icnss_ims_wfc_call_twt_cfg_send_sync(priv, ind_msg); in icnss_process_twt_cfg_ind_event()
2980 return ret; in icnss_process_twt_cfg_ind_event()
3118 int ret = 0; in icnss_connect_to_fw_server() local
3121 ret = -ENODEV; in icnss_connect_to_fw_server()
3128 ret = kernel_connect(qmi->sock, (struct sockaddr *)&sq, sizeof(sq), 0); in icnss_connect_to_fw_server()
3129 if (ret < 0) { in icnss_connect_to_fw_server()
3142 return ret; in icnss_connect_to_fw_server()
3147 int ret; in icnss_clear_server() local
3159 ret = icnss_register_fw_service(priv); in icnss_clear_server()
3160 if (ret < 0) { in icnss_clear_server()
3227 int ret; in icnss_register_fw_service() local
3229 ret = qmi_handle_init(&priv->qmi, in icnss_register_fw_service()
3232 if (ret < 0) in icnss_register_fw_service()
3233 return ret; in icnss_register_fw_service()
3237 ret = qmi_add_lookup(&priv->qmi, WLFW_SERVICE_ID_V01, in icnss_register_fw_service()
3241 ret = qmi_add_lookup(&priv->qmi, WLFW_SERVICE_ID_V01, in icnss_register_fw_service()
3244 return ret; in icnss_register_fw_service()
3260 int ret; in icnss_send_wlan_enable_to_fw() local
3273 ret = -EINVAL; in icnss_send_wlan_enable_to_fw()
3340 ret = wlfw_wlan_cfg_send_sync_msg(priv, &req); in icnss_send_wlan_enable_to_fw()
3341 if (ret) in icnss_send_wlan_enable_to_fw()
3344 ret = wlfw_wlan_mode_send_sync_msg(priv, in icnss_send_wlan_enable_to_fw()
3348 ret = 0; in icnss_send_wlan_enable_to_fw()
3350 return ret; in icnss_send_wlan_enable_to_fw()
3379 int ret = 0; in wlfw_host_cap_send_sync() local
3439 ret = of_property_read_u32(priv->pdev->dev.of_node, "wlan-en-gpio", in wlfw_host_cap_send_sync()
3441 if (!ret) { in wlfw_host_cap_send_sync()
3449 ret = of_property_read_u32(priv->pdev->dev.of_node, "bt-en-gpio", in wlfw_host_cap_send_sync()
3451 if (!ret) { in wlfw_host_cap_send_sync()
3459 ret = of_property_read_u32(priv->pdev->dev.of_node, "host-sol-gpio", in wlfw_host_cap_send_sync()
3461 if (!ret) { in wlfw_host_cap_send_sync()
3469 ret = of_property_read_u32(priv->pdev->dev.of_node, "target-sol-gpio", in wlfw_host_cap_send_sync()
3471 if (!ret) { in wlfw_host_cap_send_sync()
3481 ret = qmi_txn_init(&priv->qmi, &txn, in wlfw_host_cap_send_sync()
3483 if (ret < 0) { in wlfw_host_cap_send_sync()
3485 ret); in wlfw_host_cap_send_sync()
3489 ret = qmi_send_request(&priv->qmi, NULL, &txn, in wlfw_host_cap_send_sync()
3493 if (ret < 0) { in wlfw_host_cap_send_sync()
3496 ret); in wlfw_host_cap_send_sync()
3500 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in wlfw_host_cap_send_sync()
3501 if (ret < 0) { in wlfw_host_cap_send_sync()
3503 ret); in wlfw_host_cap_send_sync()
3510 ret = -resp->resp.result; in wlfw_host_cap_send_sync()
3522 return ret; in wlfw_host_cap_send_sync()
3531 int ret = 0; in icnss_wlfw_get_info_send_sync() local
3554 ret = qmi_txn_init(&plat_priv->qmi, &txn, in icnss_wlfw_get_info_send_sync()
3556 if (ret < 0) { in icnss_wlfw_get_info_send_sync()
3558 ret); in icnss_wlfw_get_info_send_sync()
3562 ret = qmi_send_request(&plat_priv->qmi, NULL, &txn, in icnss_wlfw_get_info_send_sync()
3566 if (ret < 0) { in icnss_wlfw_get_info_send_sync()
3569 ret); in icnss_wlfw_get_info_send_sync()
3573 ret = qmi_txn_wait(&txn, plat_priv->ctrl_params.qmi_timeout); in icnss_wlfw_get_info_send_sync()
3574 if (ret < 0) { in icnss_wlfw_get_info_send_sync()
3576 ret); in icnss_wlfw_get_info_send_sync()
3583 ret = -resp->resp.result; in icnss_wlfw_get_info_send_sync()
3594 return ret; in icnss_wlfw_get_info_send_sync()
3599 int ret; in wlfw_subsys_restart_level_msg() local
3627 ret = qmi_txn_init(&penv->qmi, &txn, in wlfw_subsys_restart_level_msg()
3629 if (ret < 0) { in wlfw_subsys_restart_level_msg()
3631 ret); in wlfw_subsys_restart_level_msg()
3635 ret = qmi_send_request(&penv->qmi, NULL, &txn, in wlfw_subsys_restart_level_msg()
3639 if (ret < 0) { in wlfw_subsys_restart_level_msg()
3642 ret); in wlfw_subsys_restart_level_msg()
3646 ret = qmi_txn_wait(&txn, penv->ctrl_params.qmi_timeout); in wlfw_subsys_restart_level_msg()
3647 if (ret < 0) { in wlfw_subsys_restart_level_msg()
3649 ret); in wlfw_subsys_restart_level_msg()
3654 ret = -resp->resp.result; in wlfw_subsys_restart_level_msg()
3668 return ret; in wlfw_subsys_restart_level_msg()
3673 int ret; in icnss_send_vbatt_update() local
3698 ret = qmi_txn_init(&priv->qmi, &txn, wlfw_vbatt_resp_msg_v01_ei, resp); in icnss_send_vbatt_update()
3699 if (ret < 0) { in icnss_send_vbatt_update()
3701 ret); in icnss_send_vbatt_update()
3705 ret = qmi_send_request(&priv->qmi, NULL, &txn, in icnss_send_vbatt_update()
3709 if (ret < 0) { in icnss_send_vbatt_update()
3711 icnss_pr_err("Fail to send Vbatt message req %d\n", ret); in icnss_send_vbatt_update()
3715 ret = qmi_txn_wait(&txn, priv->ctrl_params.qmi_timeout); in icnss_send_vbatt_update()
3716 if (ret < 0) { in icnss_send_vbatt_update()
3718 ret); in icnss_send_vbatt_update()
3723 ret = -resp->resp.result; in icnss_send_vbatt_update()
3734 return ret; in icnss_send_vbatt_update()
3740 int ret; in wlfw_wlan_hw_init_cfg_msg() local
3763 ret = qmi_txn_init(&penv->qmi, &txn, in wlfw_wlan_hw_init_cfg_msg()
3765 if (ret < 0) { in wlfw_wlan_hw_init_cfg_msg()
3767 ret); in wlfw_wlan_hw_init_cfg_msg()
3771 ret = qmi_send_request(&penv->qmi, NULL, &txn, in wlfw_wlan_hw_init_cfg_msg()
3775 if (ret < 0) { in wlfw_wlan_hw_init_cfg_msg()
3777 icnss_pr_err("Fail to send hw init cfg %d\n", ret); in wlfw_wlan_hw_init_cfg_msg()
3781 ret = qmi_txn_wait(&txn, penv->ctrl_params.qmi_timeout); in wlfw_wlan_hw_init_cfg_msg()
3782 if (ret < 0) { in wlfw_wlan_hw_init_cfg_msg()
3784 ret); in wlfw_wlan_hw_init_cfg_msg()
3790 ret = -resp->resp.result; in wlfw_wlan_hw_init_cfg_msg()
3801 return ret; in wlfw_wlan_hw_init_cfg_msg()
3807 int ret; in ims_subscribe_for_indication_send_async() local
3824 ret = qmi_txn_init(&priv->ims_qmi, txn, NULL, NULL); in ims_subscribe_for_indication_send_async()
3825 if (ret < 0) { in ims_subscribe_for_indication_send_async()
3827 ret); in ims_subscribe_for_indication_send_async()
3831 ret = qmi_send_request in ims_subscribe_for_indication_send_async()
3836 if (ret < 0) { in ims_subscribe_for_indication_send_async()
3839 ret); in ims_subscribe_for_indication_send_async()
3848 return ret; in ims_subscribe_for_indication_send_async()
3877 int ret; in icnss_process_wfc_call_ind_event() local
3880 ret = icnss_wlfw_wfc_call_status_send_sync(priv, ind_msg); in icnss_process_wfc_call_ind_event()
3882 return ret; in icnss_process_wfc_call_ind_event()
3948 int ret = 0; in ims_new_server() local
3956 ret = kernel_connect(qmi->sock, (struct sockaddr *)&sq, sizeof(sq), 0); in ims_new_server()
3957 if (ret < 0) { in ims_new_server()
3959 return ret; in ims_new_server()
3966 ret = ims_subscribe_for_indication_send_async(priv); in ims_new_server()
3967 return ret; in ims_new_server()
3988 int ret; in icnss_register_ims_service() local
3990 ret = qmi_handle_init(&priv->ims_qmi, in icnss_register_ims_service()
3993 if (ret < 0) in icnss_register_ims_service()
3994 return ret; in icnss_register_ims_service()
3996 ret = qmi_add_lookup(&priv->ims_qmi, IMSPRIVATE_SERVICE_ID_V01, in icnss_register_ims_service()
3998 return ret; in icnss_register_ims_service()