Lines Matching refs:svc

36 	struct qmi_service *svc;  in qmi_recv_new_server()  local
46 svc = kzalloc(sizeof(*svc), GFP_KERNEL); in qmi_recv_new_server()
47 if (!svc) in qmi_recv_new_server()
50 svc->service = service; in qmi_recv_new_server()
51 svc->version = instance & 0xff; in qmi_recv_new_server()
52 svc->instance = instance >> 8; in qmi_recv_new_server()
53 svc->node = node; in qmi_recv_new_server()
54 svc->port = port; in qmi_recv_new_server()
56 ret = ops->new_server(qmi, svc); in qmi_recv_new_server()
58 kfree(svc); in qmi_recv_new_server()
60 list_add(&svc->list_node, &qmi->lookup_results); in qmi_recv_new_server()
76 struct qmi_service *svc; in qmi_recv_del_server() local
79 list_for_each_entry_safe(svc, tmp, &qmi->lookup_results, list_node) { in qmi_recv_del_server()
80 if (node != -1 && svc->node != node) in qmi_recv_del_server()
82 if (port != -1 && svc->port != port) in qmi_recv_del_server()
86 ops->del_server(qmi, svc); in qmi_recv_del_server()
88 list_del(&svc->list_node); in qmi_recv_del_server()
89 kfree(svc); in qmi_recv_del_server()
164 static void qmi_send_new_lookup(struct qmi_handle *qmi, struct qmi_service *svc) in qmi_send_new_lookup() argument
174 pkt.server.service = cpu_to_le32(svc->service); in qmi_send_new_lookup()
175 pkt.server.instance = cpu_to_le32(svc->version | svc->instance << 8); in qmi_send_new_lookup()
209 struct qmi_service *svc; in qmi_add_lookup() local
211 svc = kzalloc(sizeof(*svc), GFP_KERNEL); in qmi_add_lookup()
212 if (!svc) in qmi_add_lookup()
215 svc->service = service; in qmi_add_lookup()
216 svc->version = version; in qmi_add_lookup()
217 svc->instance = instance; in qmi_add_lookup()
219 list_add(&svc->list_node, &qmi->lookups); in qmi_add_lookup()
221 qmi_send_new_lookup(qmi, svc); in qmi_add_lookup()
227 static void qmi_send_new_server(struct qmi_handle *qmi, struct qmi_service *svc) in qmi_send_new_server() argument
237 pkt.server.service = cpu_to_le32(svc->service); in qmi_send_new_server()
238 pkt.server.instance = cpu_to_le32(svc->version | svc->instance << 8); in qmi_send_new_server()
273 struct qmi_service *svc; in qmi_add_server() local
275 svc = kzalloc(sizeof(*svc), GFP_KERNEL); in qmi_add_server()
276 if (!svc) in qmi_add_server()
279 svc->service = service; in qmi_add_server()
280 svc->version = version; in qmi_add_server()
281 svc->instance = instance; in qmi_add_server()
283 list_add(&svc->list_node, &qmi->services); in qmi_add_server()
285 qmi_send_new_server(qmi, svc); in qmi_add_server()
442 struct qmi_service *svc; in qmi_handle_net_reset() local
464 list_for_each_entry(svc, &qmi->lookups, list_node) in qmi_handle_net_reset()
465 qmi_send_new_lookup(qmi, svc); in qmi_handle_net_reset()
467 list_for_each_entry(svc, &qmi->services, list_node) in qmi_handle_net_reset()
468 qmi_send_new_server(qmi, svc); in qmi_handle_net_reset()
687 struct qmi_service *svc, *tmp; in qmi_handle_release() local
706 list_for_each_entry_safe(svc, tmp, &qmi->lookups, list_node) { in qmi_handle_release()
707 list_del(&svc->list_node); in qmi_handle_release()
708 kfree(svc); in qmi_handle_release()
712 list_for_each_entry_safe(svc, tmp, &qmi->services, list_node) { in qmi_handle_release()
713 list_del(&svc->list_node); in qmi_handle_release()
714 kfree(svc); in qmi_handle_release()