• Home
  • Raw
  • Download

Lines Matching full:pds

68 	struct pdr_service *pds;  member
113 struct pdr_service *pds, in pdr_register_listener() argument
128 strscpy(req.service_path, pds->service_path, sizeof(req.service_path)); in pdr_register_listener()
130 ret = qmi_send_request(&pdr->notifier_hdl, &pds->addr, in pdr_register_listener()
143 pds->service_path, ret); in pdr_register_listener()
149 pds->service_path, resp.resp.error); in pdr_register_listener()
153 pds->state = resp.curr_state; in pdr_register_listener()
162 struct pdr_service *pds; in pdr_notifier_work() local
166 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_notifier_work()
167 if (pds->service_connected) { in pdr_notifier_work()
168 if (!pds->need_notifier_register) in pdr_notifier_work()
171 pds->need_notifier_register = false; in pdr_notifier_work()
172 ret = pdr_register_listener(pdr, pds, true); in pdr_notifier_work()
174 pds->state = SERVREG_SERVICE_STATE_DOWN; in pdr_notifier_work()
176 if (!pds->need_notifier_remove) in pdr_notifier_work()
179 pds->need_notifier_remove = false; in pdr_notifier_work()
180 pds->state = SERVREG_SERVICE_STATE_DOWN; in pdr_notifier_work()
184 pdr->status(pds->state, pds->service_path, pdr->priv); in pdr_notifier_work()
195 struct pdr_service *pds; in pdr_notifier_new_server() local
198 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_notifier_new_server()
199 if (pds->service == svc->service && in pdr_notifier_new_server()
200 pds->instance == svc->instance) { in pdr_notifier_new_server()
201 pds->service_connected = true; in pdr_notifier_new_server()
202 pds->need_notifier_register = true; in pdr_notifier_new_server()
203 pds->addr.sq_family = AF_QIPCRTR; in pdr_notifier_new_server()
204 pds->addr.sq_node = svc->node; in pdr_notifier_new_server()
205 pds->addr.sq_port = svc->port; in pdr_notifier_new_server()
219 struct pdr_service *pds; in pdr_notifier_del_server() local
222 list_for_each_entry(pds, &pdr->lookups, node) { in pdr_notifier_del_server()
223 if (pds->service == svc->service && in pdr_notifier_del_server()
224 pds->instance == svc->instance) { in pdr_notifier_del_server()
225 pds->service_connected = false; in pdr_notifier_del_server()
226 pds->need_notifier_remove = true; in pdr_notifier_del_server()
227 pds->addr.sq_node = 0; in pdr_notifier_del_server()
228 pds->addr.sq_port = 0; in pdr_notifier_del_server()
240 static int pdr_send_indack_msg(struct pdr_handle *pdr, struct pdr_service *pds, in pdr_send_indack_msg() argument
254 strscpy(req.service_path, pds->service_path, sizeof(req.service_path)); in pdr_send_indack_msg()
256 ret = qmi_send_request(&pdr->notifier_hdl, &pds->addr, in pdr_send_indack_msg()
272 struct pdr_service *pds; in pdr_indack_work() local
275 pds = ind->pds; in pdr_indack_work()
278 pds->state = ind->curr_state; in pdr_indack_work()
279 pdr->status(pds->state, pds->service_path, pdr->priv); in pdr_indack_work()
283 pdr_send_indack_msg(pdr, pds, ind->transaction_id); in pdr_indack_work()
301 struct pdr_service *pds = NULL, *iter; in pdr_indication_cb() local
312 pds = iter; in pdr_indication_cb()
317 if (!pds) in pdr_indication_cb()
330 ind->pds = pds; in pdr_indication_cb()
391 static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds) in pdr_locate_service() argument
404 strscpy(req.service_name, pds->service_name, sizeof(req.service_name)); in pdr_locate_service()
420 if (!strcmp(entry->name, pds->service_path)) { in pdr_locate_service()
421 pds->service_data_valid = entry->service_data_valid; in pdr_locate_service()
422 pds->service_data = entry->service_data; in pdr_locate_service()
423 pds->instance = entry->instance; in pdr_locate_service()
443 struct pdr_service *pds, in pdr_notify_lookup_failure() argument
447 pds->service_name, err); in pdr_notify_lookup_failure()
452 list_del(&pds->node); in pdr_notify_lookup_failure()
453 pds->state = SERVREG_LOCATOR_ERR; in pdr_notify_lookup_failure()
455 pdr->status(pds->state, pds->service_path, pdr->priv); in pdr_notify_lookup_failure()
457 kfree(pds); in pdr_notify_lookup_failure()
464 struct pdr_service *pds, *tmp; in pdr_locator_work() local
477 list_for_each_entry_safe(pds, tmp, &pdr->lookups, node) { in pdr_locator_work()
478 if (!pds->need_locator_lookup) in pdr_locator_work()
481 ret = pdr_locate_service(pdr, pds); in pdr_locator_work()
483 pdr_notify_lookup_failure(pdr, pds, ret); in pdr_locator_work()
487 ret = qmi_add_lookup(&pdr->notifier_hdl, pds->service, 1, in pdr_locator_work()
488 pds->instance); in pdr_locator_work()
490 pdr_notify_lookup_failure(pdr, pds, ret); in pdr_locator_work()
494 pds->need_locator_lookup = false; in pdr_locator_work()
514 struct pdr_service *pds, *tmp; in pdr_add_lookup() local
524 pds = kzalloc(sizeof(*pds), GFP_KERNEL); in pdr_add_lookup()
525 if (!pds) in pdr_add_lookup()
528 pds->service = SERVREG_NOTIFIER_SERVICE; in pdr_add_lookup()
529 strscpy(pds->service_name, service_name, sizeof(pds->service_name)); in pdr_add_lookup()
530 strscpy(pds->service_path, service_path, sizeof(pds->service_path)); in pdr_add_lookup()
531 pds->need_locator_lookup = true; in pdr_add_lookup()
543 list_add(&pds->node, &pdr->lookups); in pdr_add_lookup()
548 return pds; in pdr_add_lookup()
550 kfree(pds); in pdr_add_lookup()
558 * @pds: PD service handle
564 int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds) in pdr_restart_pd() argument
573 if (IS_ERR_OR_NULL(pdr) || IS_ERR_OR_NULL(pds)) in pdr_restart_pd()
578 if (tmp != pds) in pdr_restart_pd()
581 if (!pds->service_connected) in pdr_restart_pd()
585 strscpy(req.service_path, pds->service_path, sizeof(req.service_path)); in pdr_restart_pd()
586 addr = pds->addr; in pdr_restart_pd()
640 * Initializes the PDR client handle to allow for tracking/restart of PDs.
724 struct pdr_service *pds, *tmp; in pdr_handle_release() local
730 list_for_each_entry_safe(pds, tmp, &pdr->lookups, node) { in pdr_handle_release()
731 list_del(&pds->node); in pdr_handle_release()
732 kfree(pds); in pdr_handle_release()