Lines Matching full:pds

68 	struct pdr_service *pds;  member
77 struct pdr_service *pds; in pdr_locator_new_server() local
90 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_locator_new_server()
91 if (pds->need_locator_lookup) in pdr_locator_new_server()
119 struct pdr_service *pds, in pdr_register_listener() argument
134 strscpy(req.service_path, pds->service_path, sizeof(req.service_path)); in pdr_register_listener()
136 ret = qmi_send_request(&pdr->notifier_hdl, &pds->addr, in pdr_register_listener()
149 pds->service_path, ret); in pdr_register_listener()
155 pds->service_path, resp.resp.error); in pdr_register_listener()
159 pds->state = resp.curr_state; in pdr_register_listener()
168 struct pdr_service *pds; in pdr_notifier_work() local
172 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_notifier_work()
173 if (pds->service_connected) { in pdr_notifier_work()
174 if (!pds->need_notifier_register) in pdr_notifier_work()
177 pds->need_notifier_register = false; in pdr_notifier_work()
178 ret = pdr_register_listener(pdr, pds, true); in pdr_notifier_work()
180 pds->state = SERVREG_SERVICE_STATE_DOWN; in pdr_notifier_work()
182 if (!pds->need_notifier_remove) in pdr_notifier_work()
185 pds->need_notifier_remove = false; in pdr_notifier_work()
186 pds->state = SERVREG_SERVICE_STATE_DOWN; in pdr_notifier_work()
190 pdr->status(pds->state, pds->service_path, pdr->priv); in pdr_notifier_work()
201 struct pdr_service *pds; in pdr_notifier_new_server() local
204 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_notifier_new_server()
205 if (pds->service == svc->service && in pdr_notifier_new_server()
206 pds->instance == svc->instance) { in pdr_notifier_new_server()
207 pds->service_connected = true; in pdr_notifier_new_server()
208 pds->need_notifier_register = true; in pdr_notifier_new_server()
209 pds->addr.sq_family = AF_QIPCRTR; in pdr_notifier_new_server()
210 pds->addr.sq_node = svc->node; in pdr_notifier_new_server()
211 pds->addr.sq_port = svc->port; in pdr_notifier_new_server()
225 struct pdr_service *pds; in pdr_notifier_del_server() local
228 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_notifier_del_server()
229 if (pds->service == svc->service && in pdr_notifier_del_server()
230 pds->instance == svc->instance) { in pdr_notifier_del_server()
231 pds->service_connected = false; in pdr_notifier_del_server()
232 pds->need_notifier_remove = true; in pdr_notifier_del_server()
233 pds->addr.sq_node = 0; in pdr_notifier_del_server()
234 pds->addr.sq_port = 0; in pdr_notifier_del_server()
246 static int pdr_send_indack_msg(struct pdr_handle *pdr, struct pdr_service *pds, in pdr_send_indack_msg() argument
260 strscpy(req.service_path, pds->service_path, sizeof(req.service_path)); in pdr_send_indack_msg()
262 ret = qmi_send_request(&pdr->notifier_hdl, &pds->addr, in pdr_send_indack_msg()
278 struct pdr_service *pds; in pdr_indack_work() local
281 pds = ind->pds; in pdr_indack_work()
284 pds->state = ind->curr_state; in pdr_indack_work()
285 pdr->status(pds->state, pds->service_path, pdr->priv); in pdr_indack_work()
289 pdr_send_indack_msg(pdr, pds, ind->transaction_id); in pdr_indack_work()
307 struct pdr_service *pds = NULL, *iter; in pdr_indication_cb() local
318 pds = iter; in pdr_indication_cb()
323 if (!pds) in pdr_indication_cb()
336 ind->pds = pds; in pdr_indication_cb()
397 static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds) in pdr_locate_service() argument
410 strscpy(req.service_name, pds->service_name, sizeof(req.service_name)); in pdr_locate_service()
426 if (!strcmp(entry->name, pds->service_path)) { in pdr_locate_service()
427 pds->service_data_valid = entry->service_data_valid; in pdr_locate_service()
428 pds->service_data = entry->service_data; in pdr_locate_service()
429 pds->instance = entry->instance; in pdr_locate_service()
449 struct pdr_service *pds, in pdr_notify_lookup_failure() argument
453 pds->service_name, err); in pdr_notify_lookup_failure()
458 list_del(&pds->node); in pdr_notify_lookup_failure()
459 pds->state = SERVREG_LOCATOR_ERR; in pdr_notify_lookup_failure()
461 pdr->status(pds->state, pds->service_path, pdr->priv); in pdr_notify_lookup_failure()
463 kfree(pds); in pdr_notify_lookup_failure()
470 struct pdr_service *pds, *tmp; in pdr_locator_work() local
483 list_for_each_entry_safe(pds, tmp, &pdr->lookups, node) { in pdr_locator_work()
484 if (!pds->need_locator_lookup) in pdr_locator_work()
487 ret = pdr_locate_service(pdr, pds); in pdr_locator_work()
489 pdr_notify_lookup_failure(pdr, pds, ret); in pdr_locator_work()
493 ret = qmi_add_lookup(&pdr->notifier_hdl, pds->service, 1, in pdr_locator_work()
494 pds->instance); in pdr_locator_work()
496 pdr_notify_lookup_failure(pdr, pds, ret); in pdr_locator_work()
500 pds->need_locator_lookup = false; in pdr_locator_work()
520 struct pdr_service *pds, *tmp; in pdr_add_lookup() local
530 pds = kzalloc(sizeof(*pds), GFP_KERNEL); in pdr_add_lookup()
531 if (!pds) in pdr_add_lookup()
534 pds->service = SERVREG_NOTIFIER_SERVICE; in pdr_add_lookup()
535 strscpy(pds->service_name, service_name, sizeof(pds->service_name)); in pdr_add_lookup()
536 strscpy(pds->service_path, service_path, sizeof(pds->service_path)); in pdr_add_lookup()
537 pds->need_locator_lookup = true; in pdr_add_lookup()
549 list_add(&pds->node, &pdr->lookups); in pdr_add_lookup()
554 return pds; in pdr_add_lookup()
556 kfree(pds); in pdr_add_lookup()
564 * @pds: PD service handle
570 int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds) in pdr_restart_pd() argument
579 if (IS_ERR_OR_NULL(pdr) || IS_ERR_OR_NULL(pds)) in pdr_restart_pd()
584 if (tmp != pds) in pdr_restart_pd()
587 if (!pds->service_connected) in pdr_restart_pd()
591 strscpy(req.service_path, pds->service_path, sizeof(req.service_path)); in pdr_restart_pd()
592 addr = pds->addr; in pdr_restart_pd()
646 * Initializes the PDR client handle to allow for tracking/restart of PDs.
730 struct pdr_service *pds, *tmp; in pdr_handle_release() local
736 list_for_each_entry_safe(pds, tmp, &pdr->lookups, node) { in pdr_handle_release()
737 list_del(&pds->node); in pdr_handle_release()
738 kfree(pds); in pdr_handle_release()