Lines Matching refs:ipa_qmi
80 static void ipa_server_init_complete(struct ipa_qmi *ipa_qmi) in ipa_server_init_complete() argument
82 struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_server_init_complete()
83 struct qmi_handle *qmi = &ipa_qmi->server_handle; in ipa_server_init_complete()
84 struct sockaddr_qrtr *sq = &ipa_qmi->modem_sq; in ipa_server_init_complete()
98 ipa_qmi->indication_sent = true; in ipa_server_init_complete()
102 static void ipa_qmi_indication(struct ipa_qmi *ipa_qmi) in ipa_qmi_indication() argument
104 if (!ipa_qmi->indication_requested) in ipa_qmi_indication()
107 if (ipa_qmi->indication_sent) in ipa_qmi_indication()
110 ipa_server_init_complete(ipa_qmi); in ipa_qmi_indication()
122 static void ipa_qmi_ready(struct ipa_qmi *ipa_qmi) in ipa_qmi_ready() argument
128 if (!ipa_qmi->modem_ready || !ipa_qmi->uc_ready) in ipa_qmi_ready()
132 ipa_qmi_indication(ipa_qmi); in ipa_qmi_ready()
135 if (ipa_qmi->initial_boot) { in ipa_qmi_ready()
136 if (!ipa_qmi->indication_sent) in ipa_qmi_ready()
140 ipa_qmi->initial_boot = false; in ipa_qmi_ready()
144 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_qmi_ready()
153 struct ipa_qmi *ipa_qmi; in ipa_server_bye() local
155 ipa_qmi = container_of(qmi, struct ipa_qmi, server_handle); in ipa_server_bye()
158 memset(&ipa_qmi->modem_sq, 0, sizeof(ipa_qmi->modem_sq)); in ipa_server_bye()
162 ipa_qmi->modem_ready = false; in ipa_server_bye()
163 ipa_qmi->indication_requested = false; in ipa_server_bye()
164 ipa_qmi->indication_sent = false; in ipa_server_bye()
181 struct ipa_qmi *ipa_qmi; in ipa_server_indication_register() local
185 ipa_qmi = container_of(qmi, struct ipa_qmi, server_handle); in ipa_server_indication_register()
186 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_server_indication_register()
195 ipa_qmi->indication_requested = true; in ipa_server_indication_register()
196 ipa_qmi_ready(ipa_qmi); /* We might be ready now */ in ipa_server_indication_register()
210 struct ipa_qmi *ipa_qmi; in ipa_server_driver_init_complete() local
214 ipa_qmi = container_of(qmi, struct ipa_qmi, server_handle); in ipa_server_driver_init_complete()
215 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_server_driver_init_complete()
224 ipa_qmi->uc_ready = true; in ipa_server_driver_init_complete()
225 ipa_qmi_ready(ipa_qmi); /* We might be ready now */ in ipa_server_driver_init_complete()
280 init_modem_driver_req(struct ipa_qmi *ipa_qmi) in init_modem_driver_req() argument
282 struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi); in init_modem_driver_req()
405 struct ipa_qmi *ipa_qmi; in ipa_client_init_driver_work() local
412 ipa_qmi = container_of(work, struct ipa_qmi, init_driver_work); in ipa_client_init_driver_work()
413 qmi = &ipa_qmi->client_handle; in ipa_client_init_driver_work()
415 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_client_init_driver_work()
425 req = init_modem_driver_req(ipa_qmi); in ipa_client_init_driver_work()
426 ret = qmi_send_request(qmi, &ipa_qmi->modem_sq, &txn, in ipa_client_init_driver_work()
435 ipa_qmi->modem_ready = true; in ipa_client_init_driver_work()
436 ipa_qmi_ready(ipa_qmi); /* We might be ready now */ in ipa_client_init_driver_work()
450 struct ipa_qmi *ipa_qmi; in ipa_client_new_server() local
452 ipa_qmi = container_of(qmi, struct ipa_qmi, client_handle); in ipa_client_new_server()
454 ipa_qmi->modem_sq.sq_family = AF_QIPCRTR; in ipa_client_new_server()
455 ipa_qmi->modem_sq.sq_node = svc->node; in ipa_client_new_server()
456 ipa_qmi->modem_sq.sq_port = svc->port; in ipa_client_new_server()
458 schedule_work(&ipa_qmi->init_driver_work); in ipa_client_new_server()
470 struct ipa_qmi *ipa_qmi = &ipa->qmi; in ipa_qmi_setup() local
473 ipa_qmi->initial_boot = true; in ipa_qmi_setup()
481 ret = qmi_handle_init(&ipa_qmi->server_handle, in ipa_qmi_setup()
487 ret = qmi_add_server(&ipa_qmi->server_handle, IPA_HOST_SERVICE_SVC_ID, in ipa_qmi_setup()
495 ret = qmi_handle_init(&ipa_qmi->client_handle, in ipa_qmi_setup()
502 INIT_WORK(&ipa_qmi->init_driver_work, ipa_client_init_driver_work); in ipa_qmi_setup()
504 ret = qmi_add_lookup(&ipa_qmi->client_handle, IPA_MODEM_SERVICE_SVC_ID, in ipa_qmi_setup()
513 qmi_handle_release(&ipa_qmi->client_handle); in ipa_qmi_setup()
514 memset(&ipa_qmi->client_handle, 0, sizeof(ipa_qmi->client_handle)); in ipa_qmi_setup()
517 qmi_handle_release(&ipa_qmi->server_handle); in ipa_qmi_setup()
518 memset(&ipa_qmi->server_handle, 0, sizeof(ipa_qmi->server_handle)); in ipa_qmi_setup()