Lines Matching refs:nlmsg_request
310 struct iwpm_nlmsg_request *nlmsg_request = NULL; in iwpm_get_nlmsg_request() local
313 nlmsg_request = kzalloc(sizeof(struct iwpm_nlmsg_request), gfp); in iwpm_get_nlmsg_request()
314 if (!nlmsg_request) in iwpm_get_nlmsg_request()
318 list_add_tail(&nlmsg_request->inprocess_list, &iwpm_nlmsg_req_list); in iwpm_get_nlmsg_request()
321 kref_init(&nlmsg_request->kref); in iwpm_get_nlmsg_request()
322 kref_get(&nlmsg_request->kref); in iwpm_get_nlmsg_request()
323 nlmsg_request->nlmsg_seq = nlmsg_seq; in iwpm_get_nlmsg_request()
324 nlmsg_request->nl_client = nl_client; in iwpm_get_nlmsg_request()
325 nlmsg_request->request_done = 0; in iwpm_get_nlmsg_request()
326 nlmsg_request->err_code = 0; in iwpm_get_nlmsg_request()
327 sema_init(&nlmsg_request->sem, 1); in iwpm_get_nlmsg_request()
328 down(&nlmsg_request->sem); in iwpm_get_nlmsg_request()
329 return nlmsg_request; in iwpm_get_nlmsg_request()
334 struct iwpm_nlmsg_request *nlmsg_request; in iwpm_free_nlmsg_request() local
337 nlmsg_request = container_of(kref, struct iwpm_nlmsg_request, kref); in iwpm_free_nlmsg_request()
340 list_del_init(&nlmsg_request->inprocess_list); in iwpm_free_nlmsg_request()
343 if (!nlmsg_request->request_done) in iwpm_free_nlmsg_request()
345 __func__, nlmsg_request->nlmsg_seq); in iwpm_free_nlmsg_request()
346 kfree(nlmsg_request); in iwpm_free_nlmsg_request()
351 struct iwpm_nlmsg_request *nlmsg_request; in iwpm_find_nlmsg_request() local
356 list_for_each_entry(nlmsg_request, &iwpm_nlmsg_req_list, in iwpm_find_nlmsg_request()
358 if (nlmsg_request->nlmsg_seq == echo_seq) { in iwpm_find_nlmsg_request()
359 found_request = nlmsg_request; in iwpm_find_nlmsg_request()
360 kref_get(&nlmsg_request->kref); in iwpm_find_nlmsg_request()
368 int iwpm_wait_complete_req(struct iwpm_nlmsg_request *nlmsg_request) in iwpm_wait_complete_req() argument
372 ret = down_timeout(&nlmsg_request->sem, IWPM_NL_TIMEOUT); in iwpm_wait_complete_req()
376 __func__, (IWPM_NL_TIMEOUT/HZ), nlmsg_request->nlmsg_seq); in iwpm_wait_complete_req()
378 ret = nlmsg_request->err_code; in iwpm_wait_complete_req()
380 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_wait_complete_req()