Lines Matching refs:ret

271 	int ret = 0;  in icnss_driver_event_post()  local
297 event->ret = ICNSS_EVENT_PENDING; in icnss_driver_event_post()
313 ret = wait_for_completion_interruptible(&event->complete); in icnss_driver_event_post()
316 icnss_driver_event_to_str(type), type, priv->state, ret, in icnss_driver_event_post()
317 event->ret); in icnss_driver_event_post()
320 if (ret == -ERESTARTSYS && event->ret == ICNSS_EVENT_PENDING) { in icnss_driver_event_post()
323 ret = -EINTR; in icnss_driver_event_post()
328 ret = event->ret; in icnss_driver_event_post()
333 return ret; in icnss_driver_event_post()
343 int ret = 0; in icnss_soc_wake_event_post() local
369 event->ret = ICNSS_EVENT_PENDING; in icnss_soc_wake_event_post()
385 ret = wait_for_completion_interruptible(&event->complete); in icnss_soc_wake_event_post()
389 type, priv->state, ret, event->ret); in icnss_soc_wake_event_post()
392 if (ret == -ERESTARTSYS && event->ret == ICNSS_EVENT_PENDING) { in icnss_soc_wake_event_post()
395 ret = -EINTR; in icnss_soc_wake_event_post()
400 ret = event->ret; in icnss_soc_wake_event_post()
405 return ret; in icnss_soc_wake_event_post()
491 int ret; in icnss_send_smp2p() local
499 ret = qcom_smem_state_update_bits( in icnss_send_smp2p()
503 if (ret) in icnss_send_smp2p()
505 ret, icnss_smp2p_str[smp2p_entry]); in icnss_send_smp2p()
507 return ret; in icnss_send_smp2p()
526 ret = qcom_smem_state_update_bits( in icnss_send_smp2p()
530 if (ret) { in icnss_send_smp2p()
531 icnss_pr_smp2p("Error in SMP2P send ret: %d, %s\n", ret, in icnss_send_smp2p()
547 return ret; in icnss_send_smp2p()
604 int irq = 0, ret = 0; in register_fw_error_notifications() local
618 ret = irq = of_irq_get_byname(dev_node, in register_fw_error_notifications()
620 if (ret < 0) { in register_fw_error_notifications()
627 ret = devm_request_threaded_irq(dev, irq, NULL, fw_error_fatal_handler, in register_fw_error_notifications()
630 if (ret < 0) { in register_fw_error_notifications()
632 irq, ret); in register_fw_error_notifications()
643 int irq = 0, ret = 0; in register_early_crash_notifications() local
657 ret = irq = of_irq_get_byname(dev_node, in register_early_crash_notifications()
659 if (ret < 0) { in register_early_crash_notifications()
666 ret = devm_request_threaded_irq(dev, irq, NULL, in register_early_crash_notifications()
670 if (ret < 0) { in register_early_crash_notifications()
672 irq, ret); in register_early_crash_notifications()
683 int ret; in icnss_get_temperature() local
685 ret = of_property_read_string(priv->pdev->dev.of_node, in icnss_get_temperature()
688 if (ret) in icnss_get_temperature()
689 return ret; in icnss_get_temperature()
699 ret = thermal_zone_get_temp(thermal_dev, temp); in icnss_get_temperature()
700 if (ret) in icnss_get_temperature()
701 icnss_pr_err("Fail to get temperature. ret: %d", ret); in icnss_get_temperature()
703 return ret; in icnss_get_temperature()
720 int irq = 0, ret = 0; in register_soc_wake_notif() local
734 ret = irq = of_irq_get_byname(dev_node, in register_soc_wake_notif()
736 if (ret < 0) { in register_soc_wake_notif()
743 ret = devm_request_threaded_irq(dev, irq, NULL, in register_soc_wake_notif()
748 if (ret < 0) { in register_soc_wake_notif()
750 irq, ret); in register_soc_wake_notif()
778 int ret = 0; in icnss_setup_dms_mac() local
780 ret = icnss_qmi_get_dms_mac(priv); in icnss_setup_dms_mac()
781 if (ret == 0 && priv->dms.mac_valid) in icnss_setup_dms_mac()
792 ret = icnss_qmi_get_dms_mac(priv); in icnss_setup_dms_mac()
793 if (ret != -EAGAIN) in icnss_setup_dms_mac()
805 ret = in icnss_setup_dms_mac()
808 return ret; in icnss_setup_dms_mac()
904 int ret = 0; in icnss_driver_event_server_arrive() local
917 ret = icnss_wait_for_slate_complete(priv); in icnss_driver_event_server_arrive()
918 if (ret == -EINVAL) { in icnss_driver_event_server_arrive()
920 return ret; in icnss_driver_event_server_arrive()
931 ret = icnss_connect_to_fw_server(priv, data); in icnss_driver_event_server_arrive()
932 if (ret) in icnss_driver_event_server_arrive()
938 ret = icnss_hw_power_on(priv); in icnss_driver_event_server_arrive()
939 if (ret) in icnss_driver_event_server_arrive()
943 ret = wlfw_ind_register_send_sync_msg(priv); in icnss_driver_event_server_arrive()
944 if (ret < 0) { in icnss_driver_event_server_arrive()
945 if (ret == -EALREADY) { in icnss_driver_event_server_arrive()
946 ret = 0; in icnss_driver_event_server_arrive()
956 ret = wlfw_wlan_hw_init_cfg_msg(priv, rf_subtype); in icnss_driver_event_server_arrive()
957 if (ret < 0) in icnss_driver_event_server_arrive()
959 ret); in icnss_driver_event_server_arrive()
974 ret = wlfw_host_cap_send_sync(priv); in icnss_driver_event_server_arrive()
975 if (ret < 0) in icnss_driver_event_server_arrive()
982 ret = -EINVAL; in icnss_driver_event_server_arrive()
986 ret = wlfw_msa_mem_info_send_sync_msg(priv); in icnss_driver_event_server_arrive()
987 if (ret < 0) { in icnss_driver_event_server_arrive()
992 ret = wlfw_msa_ready_send_sync_msg(priv); in icnss_driver_event_server_arrive()
993 if (ret < 0) { in icnss_driver_event_server_arrive()
1002 ret = wlfw_cap_send_sync_msg(priv); in icnss_driver_event_server_arrive()
1003 if (ret < 0) { in icnss_driver_event_server_arrive()
1009 ret = icnss_power_on_chain1_reg(priv); in icnss_driver_event_server_arrive()
1010 if (ret) { in icnss_driver_event_server_arrive()
1018 ret = icnss_hw_power_on(priv); in icnss_driver_event_server_arrive()
1019 if (ret) in icnss_driver_event_server_arrive()
1022 ret = wlfw_device_info_send_msg(priv); in icnss_driver_event_server_arrive()
1023 if (ret < 0) { in icnss_driver_event_server_arrive()
1055 ret = icnss_wlfw_bdf_dnld_send_sync(priv, in icnss_driver_event_server_arrive()
1057 if (ret < 0) in icnss_driver_event_server_arrive()
1062 ret = icnss_wlfw_qdss_dnld_send_sync(priv); in icnss_driver_event_server_arrive()
1063 if (ret < 0) in icnss_driver_event_server_arrive()
1065 ret); in icnss_driver_event_server_arrive()
1082 ret = wlfw_cal_report_req(priv); in icnss_driver_event_server_arrive()
1083 if (ret < 0) in icnss_driver_event_server_arrive()
1100 return ret; in icnss_driver_event_server_arrive()
1107 return ret; in icnss_driver_event_server_arrive()
1127 int ret = 0; in icnss_call_driver_probe() local
1142 ret = priv->ops->probe(&priv->pdev->dev); in icnss_call_driver_probe()
1144 if (ret != -EPROBE_DEFER) in icnss_call_driver_probe()
1147 if (ret < 0) { in icnss_call_driver_probe()
1149 ret, priv->state, probe_cnt); in icnss_call_driver_probe()
1161 return ret; in icnss_call_driver_probe()
1186 int ret = 0; in icnss_pd_restart_complete() local
1217 ret = priv->ops->reinit(&priv->pdev->dev); in icnss_pd_restart_complete()
1218 if (ret < 0) { in icnss_pd_restart_complete()
1220 ret, priv->state); in icnss_pd_restart_complete()
1238 return ret; in icnss_pd_restart_complete()
1244 int ret = 0; in icnss_driver_event_fw_ready_ind() local
1264 ret = -ENODEV; in icnss_driver_event_fw_ready_ind()
1272 ret = icnss_pd_restart_complete(priv); in icnss_driver_event_fw_ready_ind()
1276 ret = icnss_call_driver_probe(priv); in icnss_driver_event_fw_ready_ind()
1282 return ret; in icnss_driver_event_fw_ready_ind()
1287 int ret = 0; in icnss_driver_event_fw_init_done() local
1295 ret = icnss_wlfw_qdss_dnld_send_sync(priv); in icnss_driver_event_fw_init_done()
1296 if (ret < 0) in icnss_driver_event_fw_init_done()
1298 ret); in icnss_driver_event_fw_init_done()
1304 ret = wlfw_wlan_mode_send_sync_msg(priv, in icnss_driver_event_fw_init_done()
1310 return ret; in icnss_driver_event_fw_init_done()
1372 int ret = 0; in icnss_qdss_trace_req_mem_hdlr() local
1374 ret = icnss_alloc_qdss_mem(priv); in icnss_qdss_trace_req_mem_hdlr()
1375 if (ret < 0) in icnss_qdss_trace_req_mem_hdlr()
1376 return ret; in icnss_qdss_trace_req_mem_hdlr()
1416 int ret = 0; in icnss_qdss_trace_save_hdlr() local
1430 ret = icnss_genl_send_msg(qdss_mem[i].va, in icnss_qdss_trace_save_hdlr()
1434 if (ret < 0) { in icnss_qdss_trace_save_hdlr()
1436 ret); in icnss_qdss_trace_save_hdlr()
1449 ret = -EINVAL; in icnss_qdss_trace_save_hdlr()
1452 ret = icnss_genl_send_msg(va, ICNSS_GENL_MSG_TYPE_QDSS, in icnss_qdss_trace_save_hdlr()
1454 if (ret < 0) { in icnss_qdss_trace_save_hdlr()
1456 ret); in icnss_qdss_trace_save_hdlr()
1463 return ret; in icnss_qdss_trace_save_hdlr()
1482 int ret = 0; in icnss_qdss_trace_req_data_hdlr() local
1491 ret = icnss_wlfw_qdss_data_send_sync(priv, event_data->file_name, in icnss_qdss_trace_req_data_hdlr()
1495 return ret; in icnss_qdss_trace_req_data_hdlr()
1500 int ret = 0; in icnss_event_soc_wake_request() local
1511 ret = icnss_send_smp2p(priv, ICNSS_SOC_WAKE_REQ, in icnss_event_soc_wake_request()
1513 if (!ret) in icnss_event_soc_wake_request()
1516 return ret; in icnss_event_soc_wake_request()
1521 int ret = 0; in icnss_event_soc_wake_release() local
1532 ret = icnss_send_smp2p(priv, ICNSS_SOC_WAKE_REL, in icnss_event_soc_wake_release()
1534 return ret; in icnss_event_soc_wake_release()
1540 int ret = 0; in icnss_driver_event_register_driver() local
1563 ret = icnss_hw_power_on(priv); in icnss_driver_event_register_driver()
1564 if (ret) in icnss_driver_event_register_driver()
1569 ret = priv->ops->probe(&priv->pdev->dev); in icnss_driver_event_register_driver()
1571 if (ret != -EPROBE_DEFER) in icnss_driver_event_register_driver()
1574 if (ret) { in icnss_driver_event_register_driver()
1576 ret, priv->state, probe_cnt); in icnss_driver_event_register_driver()
1589 return ret; in icnss_driver_event_register_driver()
1668 int ret = 0xFF; in icnss_send_hang_event_data() local
1671 ret = icnss_update_hang_event_data(priv, &hang_data); in icnss_send_hang_event_data()
1672 if (ret) in icnss_send_hang_event_data()
1678 if (!ret) { in icnss_send_hang_event_data()
1756 int ret = 0; in icnss_driver_event_idle_shutdown() local
1764 ret = -EBUSY; in icnss_driver_event_idle_shutdown()
1769 ret = priv->ops->idle_shutdown(&priv->pdev->dev); in icnss_driver_event_idle_shutdown()
1773 return ret; in icnss_driver_event_idle_shutdown()
1779 int ret = 0; in icnss_driver_event_idle_restart() local
1787 ret = -EBUSY; in icnss_driver_event_idle_restart()
1792 ret = priv->ops->idle_restart(&priv->pdev->dev); in icnss_driver_event_idle_restart()
1796 return ret; in icnss_driver_event_idle_restart()
1811 int i, status = 0, ret = 0; in icnss_m3_dump_upload_req_hdlr() local
1816 return ret; in icnss_m3_dump_upload_req_hdlr()
1824 return ret; in icnss_m3_dump_upload_req_hdlr()
1836 ret = -ENOMEM; in icnss_m3_dump_upload_req_hdlr()
1848 ret = qcom_dump(&head, priv->m3_dump_phyareg->dev); in icnss_m3_dump_upload_req_hdlr()
1851 ret = qcom_dump(&head, priv->m3_dump_phydbg->dev); in icnss_m3_dump_upload_req_hdlr()
1854 ret = qcom_dump(&head, priv->m3_dump_wmac0reg->dev); in icnss_m3_dump_upload_req_hdlr()
1857 ret = qcom_dump(&head, priv->m3_dump_wcssdbg->dev); in icnss_m3_dump_upload_req_hdlr()
1860 ret = qcom_dump(&head, priv->m3_dump_phyapdmem->dev); in icnss_m3_dump_upload_req_hdlr()
1867 if (ret) { in icnss_m3_dump_upload_req_hdlr()
1868 status = ret; in icnss_m3_dump_upload_req_hdlr()
1870 event_data->m3_segment[i].name, ret); in icnss_m3_dump_upload_req_hdlr()
1878 return ret; in icnss_m3_dump_upload_req_hdlr()
1883 int ret = 0; in icnss_subsys_restart_level() local
1892 ret = wlfw_subsys_restart_level_msg(priv, event_data->restart_level); in icnss_subsys_restart_level()
1896 return ret; in icnss_subsys_restart_level()
1901 int ret; in icnss_wpss_self_recovery() local
1905 ret = rproc_boot(priv->rproc); in icnss_wpss_self_recovery()
1906 if (ret) { in icnss_wpss_self_recovery()
1907 icnss_pr_err("Failed to self recover wpss rproc, ret: %d", ret); in icnss_wpss_self_recovery()
1918 int ret; in icnss_driver_event_work() local
1937 ret = icnss_driver_event_server_arrive(priv, in icnss_driver_event_work()
1941 ret = icnss_driver_event_server_exit(priv); in icnss_driver_event_work()
1944 ret = icnss_driver_event_fw_ready_ind(priv, in icnss_driver_event_work()
1948 ret = icnss_driver_event_register_driver(priv, in icnss_driver_event_work()
1952 ret = icnss_driver_event_unregister_driver(priv, in icnss_driver_event_work()
1956 ret = icnss_driver_event_pd_service_down(priv, in icnss_driver_event_work()
1960 ret = icnss_driver_event_early_crash_ind(priv, in icnss_driver_event_work()
1964 ret = icnss_driver_event_idle_shutdown(priv, in icnss_driver_event_work()
1968 ret = icnss_driver_event_idle_restart(priv, in icnss_driver_event_work()
1972 ret = icnss_driver_event_fw_init_done(priv, in icnss_driver_event_work()
1976 ret = icnss_qdss_trace_req_mem_hdlr(priv); in icnss_driver_event_work()
1979 ret = icnss_qdss_trace_save_hdlr(priv, in icnss_driver_event_work()
1983 ret = icnss_qdss_trace_free_hdlr(priv); in icnss_driver_event_work()
1986 ret = icnss_m3_dump_upload_req_hdlr(priv, event->data); in icnss_driver_event_work()
1989 ret = icnss_qdss_trace_req_data_hdlr(priv, in icnss_driver_event_work()
1993 ret = icnss_subsys_restart_level(priv, event->data); in icnss_driver_event_work()
1996 ret = icnss_process_wfc_call_ind_event(priv, in icnss_driver_event_work()
2000 ret = icnss_process_twt_cfg_ind_event(priv, in icnss_driver_event_work()
2013 event->sync ? "-sync" : "", event->type, ret, in icnss_driver_event_work()
2018 event->ret = ret; in icnss_driver_event_work()
2039 int ret; in icnss_soc_wake_msg_work() local
2058 ret = icnss_event_soc_wake_request(priv, in icnss_soc_wake_msg_work()
2062 ret = icnss_event_soc_wake_release(priv, in icnss_soc_wake_msg_work()
2075 event->sync ? "-sync" : "", event->type, ret, in icnss_soc_wake_msg_work()
2080 event->ret = ret; in icnss_soc_wake_msg_work()
2097 int ret = 0; in icnss_msa0_ramdump() local
2104 return ret; in icnss_msa0_ramdump()
2108 return ret; in icnss_msa0_ramdump()
2124 ret = qcom_dump(&head, msa0_dump_dev->dev); in icnss_msa0_ramdump()
2125 if (ret) { in icnss_msa0_ramdump()
2126 icnss_pr_err("Failed to dump msa0, err = %d\n", ret); in icnss_msa0_ramdump()
2127 return ret; in icnss_msa0_ramdump()
2131 return ret; in icnss_msa0_ramdump()
2138 int ret = 0; in icnss_update_state_send_modem_shutdown() local
2161 ret = wlfw_send_modem_shutdown_msg(priv); in icnss_update_state_send_modem_shutdown()
2162 if (ret < 0) in icnss_update_state_send_modem_shutdown()
2164 ret); in icnss_update_state_send_modem_shutdown()
2375 int ret = 0; in icnss_wpss_early_ssr_register_notifier() local
2384 ret = PTR_ERR(priv->wpss_early_notify_handler); in icnss_wpss_early_ssr_register_notifier()
2385 icnss_pr_err("WPSS register early notifier failed: %d\n", ret); in icnss_wpss_early_ssr_register_notifier()
2388 return ret; in icnss_wpss_early_ssr_register_notifier()
2393 int ret = 0; in icnss_wpss_ssr_register_notifier() local
2406 ret = PTR_ERR(priv->wpss_notify_handler); in icnss_wpss_ssr_register_notifier()
2407 icnss_pr_err("WPSS register notifier failed: %d\n", ret); in icnss_wpss_ssr_register_notifier()
2412 return ret; in icnss_wpss_ssr_register_notifier()
2440 int ret = 0; in icnss_register_slate_event_notifier() local
2447 ret = priv->seb_handle ? PTR_ERR(priv->seb_handle) : -EINVAL; in icnss_register_slate_event_notifier()
2449 ret); in icnss_register_slate_event_notifier()
2452 return ret; in icnss_register_slate_event_notifier()
2457 int ret = 0; in icnss_unregister_slate_event_notifier() local
2459 ret = seb_unregister_for_slate_event(priv->seb_handle, &priv->seb_nb); in icnss_unregister_slate_event_notifier()
2460 if (ret < 0) in icnss_unregister_slate_event_notifier()
2461 icnss_pr_err("Slate event unregister failed: %d\n", ret); in icnss_unregister_slate_event_notifier()
2463 return ret; in icnss_unregister_slate_event_notifier()
2472 int ret = 0; in icnss_slate_notifier_nb() local
2492 ret = icnss_trigger_recovery(&priv->pdev->dev); in icnss_slate_notifier_nb()
2493 if (ret < 0) { in icnss_slate_notifier_nb()
2495 ret, priv->state); in icnss_slate_notifier_nb()
2506 int ret = 0; in icnss_slate_ssr_register_notifier() local
2514 ret = PTR_ERR(priv->slate_notify_handler); in icnss_slate_ssr_register_notifier()
2515 icnss_pr_err("SLATE register notifier failed: %d\n", ret); in icnss_slate_ssr_register_notifier()
2520 return ret; in icnss_slate_ssr_register_notifier()
2558 int ret = 0; in icnss_modem_ssr_register_notifier() local
2571 ret = PTR_ERR(priv->modem_notify_handler); in icnss_modem_ssr_register_notifier()
2572 icnss_pr_err("Modem register notifier failed: %d\n", ret); in icnss_modem_ssr_register_notifier()
2577 return ret; in icnss_modem_ssr_register_notifier()
2721 int ret = 0; in icnss_ramdump_devnode_init() local
2729 ret = PTR_ERR(priv->icnss_ramdump_class); in icnss_ramdump_devnode_init()
2730 icnss_pr_err("%s:Class create failed for ramdump devices (%d)\n", __func__, ret); in icnss_ramdump_devnode_init()
2731 return ret; in icnss_ramdump_devnode_init()
2734 ret = alloc_chrdev_region(&priv->icnss_ramdump_dev, 0, RAMDUMP_NUM_DEVICES, in icnss_ramdump_devnode_init()
2736 if (ret < 0) { in icnss_ramdump_devnode_init()
2744 return ret; in icnss_ramdump_devnode_init()
2749 int ret = 0; in icnss_create_ramdump_device() local
2767 ret = -ENODEV; in icnss_create_ramdump_device()
2776 ret = PTR_ERR(ramdump_info->dev); in icnss_create_ramdump_device()
2778 ramdump_info->name, ret); in icnss_create_ramdump_device()
2787 return ERR_PTR(ret); in icnss_create_ramdump_device()
2792 int ret = 0; in icnss_register_ramdump_devices() local
2799 ret = icnss_ramdump_devnode_init(priv); in icnss_register_ramdump_devices()
2800 if (ret) in icnss_register_ramdump_devices()
2801 return ret; in icnss_register_ramdump_devices()
2868 int ret; in icnss_enable_recovery() local
2880 ret = icnss_register_ramdump_devices(priv); in icnss_enable_recovery()
2881 if (ret) in icnss_enable_recovery()
2882 return ret; in icnss_enable_recovery()
2904 ret = icnss_pd_restart_enable(priv); in icnss_enable_recovery()
2906 if (ret) in icnss_enable_recovery()
2907 return ret; in icnss_enable_recovery()
2948 int ret = 0; in icnss_tcdev_set_cur_state() local
2961 ret = penv->ops->set_therm_cdev_state(dev, thermal_state, in icnss_tcdev_set_cur_state()
2963 if (!ret) in icnss_tcdev_set_cur_state()
2966 if (ret) { in icnss_tcdev_set_cur_state()
2968 ret, icnss_tcdev->tcdev_id); in icnss_tcdev_set_cur_state()
2969 return ret; in icnss_tcdev_set_cur_state()
2988 int ret = 0; in icnss_thermal_cdev_register() local
3014 ret = PTR_ERR(icnss_tcdev->tcdev); in icnss_thermal_cdev_register()
3016 ret, icnss_tcdev->tcdev_id); in icnss_thermal_cdev_register()
3025 ret = -EOPNOTSUPP; in icnss_thermal_cdev_register()
3028 return ret; in icnss_thermal_cdev_register()
3077 int ret; in icnss_qmi_send() local
3088 ret = icnss_wlfw_get_info_send_sync(priv, type, cmd, cmd_len); in icnss_qmi_send()
3089 if (ret) { in icnss_qmi_send()
3094 return ret; in icnss_qmi_send()
3101 int ret = 0; in __icnss_register_driver() local
3105 ret = -ENODEV; in __icnss_register_driver()
3113 ret = -EEXIST; in __icnss_register_driver()
3129 ret = -EINVAL; in __icnss_register_driver()
3133 ret = icnss_driver_event_post(priv, ICNSS_DRIVER_EVENT_REGISTER_DRIVER, in __icnss_register_driver()
3136 if (ret == -EINTR) in __icnss_register_driver()
3137 ret = 0; in __icnss_register_driver()
3140 return ret; in __icnss_register_driver()
3146 int ret; in icnss_unregister_driver() local
3150 ret = -ENODEV; in icnss_unregister_driver()
3158 ret = -ENOENT; in icnss_unregister_driver()
3162 ret = icnss_driver_event_post(priv, in icnss_unregister_driver()
3166 return ret; in icnss_unregister_driver()
3264 int ret = 0; in icnss_ce_request_irq() local
3270 ret = -ENODEV; in icnss_ce_request_irq()
3278 ret = -EINVAL; in icnss_ce_request_irq()
3287 ret = -EEXIST; in icnss_ce_request_irq()
3291 ret = request_irq(irq, handler, flags, name, ctx); in icnss_ce_request_irq()
3292 if (ret) { in icnss_ce_request_irq()
3294 irq, ce_id, ret); in icnss_ce_request_irq()
3304 return ret; in icnss_ce_request_irq()
3310 int ret = 0; in icnss_ce_free_irq() local
3315 ret = -ENODEV; in icnss_ce_free_irq()
3323 ret = -EINVAL; in icnss_ce_free_irq()
3331 ret = -EEXIST; in icnss_ce_free_irq()
3340 return ret; in icnss_ce_free_irq()
3445 int ret; in icnss_set_fw_log_mode() local
3467 ret = wlfw_ini_send_sync_msg(priv, fw_log_mode); in icnss_set_fw_log_mode()
3468 if (ret) in icnss_set_fw_log_mode()
3470 ret, fw_log_mode); in icnss_set_fw_log_mode()
3471 return ret; in icnss_set_fw_log_mode()
3581 int ret = 0; in icnss_athdiag_read() local
3594 ret = -EINVAL; in icnss_athdiag_read()
3602 ret = -EINVAL; in icnss_athdiag_read()
3606 ret = wlfw_athdiag_read_send_sync_msg(priv, offset, mem_type, in icnss_athdiag_read()
3609 return ret; in icnss_athdiag_read()
3617 int ret = 0; in icnss_athdiag_write() local
3630 ret = -EINVAL; in icnss_athdiag_write()
3638 ret = -EINVAL; in icnss_athdiag_write()
3642 ret = wlfw_athdiag_write_send_sync_msg(priv, offset, mem_type, in icnss_athdiag_write()
3645 return ret; in icnss_athdiag_write()
3654 int temp = 0, ret = 0; in icnss_wlan_enable() local
3684 ret = icnss_send_wlan_enable_to_fw(priv, config, mode, host_version); in icnss_wlan_enable()
3689 return ret; in icnss_wlan_enable()
3782 int ret = 0; in icnss_smmu_map() local
3816 ret = icnss_iommu_map(priv->iommu_domain, iova, in icnss_smmu_map()
3819 if (ret) { in icnss_smmu_map()
3820 icnss_pr_err("PA to IOVA mapping failed, ret %d\n", ret); in icnss_smmu_map()
3821 return ret; in icnss_smmu_map()
3885 int ret = 0; in icnss_trigger_recovery() local
3890 ret = -EINVAL; in icnss_trigger_recovery()
3897 ret = -EPERM; in icnss_trigger_recovery()
3903 ret = icnss_send_smp2p(priv, ICNSS_TRIGGER_SSR, in icnss_trigger_recovery()
3905 if (!ret) in icnss_trigger_recovery()
3907 return ret; in icnss_trigger_recovery()
3913 ret = -EOPNOTSUPP; in icnss_trigger_recovery()
3920 ret = pdr_restart_pd(priv->pdr_handle, priv->pdr_service); in icnss_trigger_recovery()
3922 if (!ret) in icnss_trigger_recovery()
3926 return ret; in icnss_trigger_recovery()
4032 int ret = 0; in icnss_create_shutdown_sysfs() local
4044 ret = sysfs_create_file(icnss_kobject, &icnss_sysfs_attribute.attr); in icnss_create_shutdown_sysfs()
4045 if (ret) { in icnss_create_shutdown_sysfs()
4046 icnss_pr_err("Unable to create icnss sysfs file err:%d", ret); in icnss_create_shutdown_sysfs()
4047 return ret; in icnss_create_shutdown_sysfs()
4050 return ret; in icnss_create_shutdown_sysfs()
4118 int ret; in icnss_wpss_load() local
4132 ret = rproc_boot(priv->rproc); in icnss_wpss_load()
4133 if (ret) { in icnss_wpss_load()
4134 icnss_pr_err("Failed to boot wpss rproc, ret: %d", ret); in icnss_wpss_load()
4209 int ret; in icnss_create_sysfs_link() local
4211 ret = sysfs_create_link(kernel_kobj, &dev->kobj, "icnss"); in icnss_create_sysfs_link()
4212 if (ret) { in icnss_create_sysfs_link()
4214 ret); in icnss_create_sysfs_link()
4220 return ret; in icnss_create_sysfs_link()
4263 int ret = 0; in icnss_sysfs_create() local
4265 ret = devm_device_add_group(&priv->pdev->dev, in icnss_sysfs_create()
4267 if (ret) { in icnss_sysfs_create()
4269 ret); in icnss_sysfs_create()
4275 ret = icnss_create_shutdown_sysfs(priv); in icnss_sysfs_create()
4276 if (ret) in icnss_sysfs_create()
4283 return ret; in icnss_sysfs_create()
4295 int ret = 0, i = 0, irq = 0; in icnss_resource_parse() local
4301 ret = icnss_get_vreg(priv); in icnss_resource_parse()
4302 if (ret) { in icnss_resource_parse()
4303 icnss_pr_err("Failed to get vreg, err = %d\n", ret); in icnss_resource_parse()
4307 ret = icnss_get_clk(priv); in icnss_resource_parse()
4308 if (ret) { in icnss_resource_parse()
4309 icnss_pr_err("Failed to get clocks, err = %d\n", ret); in icnss_resource_parse()
4314 ret = icnss_get_psf_info(priv); in icnss_resource_parse()
4315 if (ret < 0) in icnss_resource_parse()
4325 ret = -EINVAL; in icnss_resource_parse()
4335 ret = -EINVAL; in icnss_resource_parse()
4346 ret = -ENODEV; in icnss_resource_parse()
4376 ret = -EINVAL; in icnss_resource_parse()
4387 ret = -ENOMEM; in icnss_resource_parse()
4394 ret = of_property_read_u32_index(dev->of_node, in icnss_resource_parse()
4398 if (ret) { in icnss_resource_parse()
4412 ret = -ENODEV; in icnss_resource_parse()
4427 return ret; in icnss_resource_parse()
4432 int ret = 0; in icnss_msa_dt_parse() local
4445 ret = -EINVAL; in icnss_msa_dt_parse()
4453 ret = -EINVAL; in icnss_msa_dt_parse()
4465 ret = -EINVAL; in icnss_msa_dt_parse()
4470 ret = of_property_read_u32(dev->of_node, "qcom,wlan-msa-memory", in icnss_msa_dt_parse()
4472 if (ret || priv->msa_mem_size == 0) { in icnss_msa_dt_parse()
4474 priv->msa_mem_size, ret); in icnss_msa_dt_parse()
4483 ret = -ENOMEM; in icnss_msa_dt_parse()
4496 return ret; in icnss_msa_dt_parse()
4529 int ret = 0; in icnss_smmu_dt_parse() local
4536 ret = of_property_read_u32_array(dev->of_node, in icnss_smmu_dt_parse()
4541 if (ret) { in icnss_smmu_dt_parse()
4553 ret = of_property_read_string(dev->of_node, "qcom,iommu-dma", in icnss_smmu_dt_parse()
4555 if (!ret && !strcmp("fastmap", iommu_dma_type)) { in icnss_smmu_dt_parse()
4765 int ret = 0; in icnss_probe() local
4779 ret = -ENODEV; in icnss_probe()
4807 ret = icnss_resource_parse(priv); in icnss_probe()
4808 if (ret) in icnss_probe()
4811 ret = icnss_msa_dt_parse(priv); in icnss_probe()
4812 if (ret) in icnss_probe()
4815 ret = icnss_smmu_dt_parse(priv); in icnss_probe()
4816 if (ret) in icnss_probe()
4828 ret = -EFAULT; in icnss_probe()
4838 ret = icnss_register_fw_service(priv); in icnss_probe()
4839 if (ret < 0) { in icnss_probe()
4840 icnss_pr_err("fw service registration failed: %d\n", ret); in icnss_probe()
4851 ret = device_init_wakeup(&priv->pdev->dev, true); in icnss_probe()
4852 if (ret) in icnss_probe()
4854 ret); in icnss_probe()
4866 ret = -EFAULT; in icnss_probe()
4873 ret = icnss_genl_init(); in icnss_probe()
4874 if (ret < 0) in icnss_probe()
4875 icnss_pr_err("ICNSS genl init failed %d\n", ret); in icnss_probe()
4886 ret = icnss_dms_init(priv); in icnss_probe()
4887 if (ret) in icnss_probe()
4888 icnss_pr_err("ICNSS DMS init failed %d\n", ret); in icnss_probe()
4924 return ret; in icnss_probe()
5053 int ret = 0; in icnss_pm_suspend() local
5068 ret = priv->ops->pm_suspend(dev); in icnss_pm_suspend()
5070 if (ret == 0) { in icnss_pm_suspend()
5077 ret = icnss_send_smp2p(priv, ICNSS_POWER_SAVE_ENTER, in icnss_pm_suspend()
5085 return ret; in icnss_pm_suspend()
5091 int ret = 0; in icnss_pm_resume() local
5106 ret = priv->ops->pm_resume(dev); in icnss_pm_resume()
5109 if (ret == 0) { in icnss_pm_resume()
5115 return ret; in icnss_pm_resume()
5121 int ret = 0; in icnss_pm_suspend_noirq() local
5135 ret = priv->ops->suspend_noirq(dev); in icnss_pm_suspend_noirq()
5138 if (ret == 0) { in icnss_pm_suspend_noirq()
5144 return ret; in icnss_pm_suspend_noirq()
5150 int ret = 0; in icnss_pm_resume_noirq() local
5164 ret = priv->ops->resume_noirq(dev); in icnss_pm_resume_noirq()
5167 if (ret == 0) { in icnss_pm_resume_noirq()
5173 return ret; in icnss_pm_resume_noirq()
5179 int ret = 0; in icnss_pm_runtime_suspend() local
5197 ret = priv->ops->runtime_suspend(dev); in icnss_pm_runtime_suspend()
5198 if (!ret) { in icnss_pm_runtime_suspend()
5203 ret = icnss_send_smp2p(priv, ICNSS_POWER_SAVE_ENTER, in icnss_pm_runtime_suspend()
5207 return ret; in icnss_pm_runtime_suspend()
5213 int ret = 0; in icnss_pm_runtime_resume() local
5232 ret = priv->ops->runtime_resume(dev); in icnss_pm_runtime_resume()
5235 return ret; in icnss_pm_runtime_resume()