Lines Matching refs:cm_id
62 struct iwcm_id_private *cm_id; member
106 list_add(&work->free_list, &work->cm_id->work_free_list); in put_work()
128 work->cm_id = cm_id_priv; in alloc_work_entries()
174 static void add_ref(struct iw_cm_id *cm_id) in add_ref() argument
177 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in add_ref()
181 static void rem_ref(struct iw_cm_id *cm_id) in rem_ref() argument
184 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in rem_ref()
192 static int cm_event_handler(struct iw_cm_id *cm_id, struct iw_cm_event *event);
259 int iw_cm_disconnect(struct iw_cm_id *cm_id, int abrupt) in iw_cm_disconnect() argument
266 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_cm_disconnect()
326 static void destroy_cm_id(struct iw_cm_id *cm_id) in destroy_cm_id() argument
332 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in destroy_cm_id()
346 ret = cm_id->device->iwcm->destroy_listen(cm_id); in destroy_cm_id()
369 cm_id->device->iwcm->reject(cm_id, NULL, 0); in destroy_cm_id()
393 void iw_destroy_cm_id(struct iw_cm_id *cm_id) in iw_destroy_cm_id() argument
397 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_destroy_cm_id()
400 destroy_cm_id(cm_id); in iw_destroy_cm_id()
414 int iw_cm_listen(struct iw_cm_id *cm_id, int backlog) in iw_cm_listen() argument
420 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_cm_listen()
431 ret = cm_id->device->iwcm->create_listen(cm_id, backlog); in iw_cm_listen()
450 int iw_cm_reject(struct iw_cm_id *cm_id, in iw_cm_reject() argument
458 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_cm_reject()
471 ret = cm_id->device->iwcm->reject(cm_id, private_data, in iw_cm_reject()
488 int iw_cm_accept(struct iw_cm_id *cm_id, in iw_cm_accept() argument
496 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_cm_accept()
507 qp = cm_id->device->iwcm->get_qp(cm_id->device, iw_param->qpn); in iw_cm_accept()
514 cm_id->device->iwcm->add_ref(qp); in iw_cm_accept()
518 ret = cm_id->device->iwcm->accept(cm_id, iw_param); in iw_cm_accept()
525 cm_id->device->iwcm->rem_ref(qp); in iw_cm_accept()
544 int iw_cm_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param) in iw_cm_connect() argument
551 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_cm_connect()
568 qp = cm_id->device->iwcm->get_qp(cm_id->device, iw_param->qpn); in iw_cm_connect()
575 cm_id->device->iwcm->add_ref(qp); in iw_cm_connect()
580 ret = cm_id->device->iwcm->connect(cm_id, iw_param); in iw_cm_connect()
584 cm_id->device->iwcm->rem_ref(qp); in iw_cm_connect()
617 struct iw_cm_id *cm_id; in cm_conn_req_handler() local
627 cm_id = iw_create_cm_id(listen_id_priv->id.device, in cm_conn_req_handler()
631 if (IS_ERR(cm_id)) in cm_conn_req_handler()
634 cm_id->provider_data = iw_event->provider_data; in cm_conn_req_handler()
635 cm_id->local_addr = iw_event->local_addr; in cm_conn_req_handler()
636 cm_id->remote_addr = iw_event->remote_addr; in cm_conn_req_handler()
638 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in cm_conn_req_handler()
648 iw_cm_reject(cm_id, NULL, 0); in cm_conn_req_handler()
649 iw_destroy_cm_id(cm_id); in cm_conn_req_handler()
656 iw_cm_reject(cm_id, NULL, 0); in cm_conn_req_handler()
657 iw_destroy_cm_id(cm_id); in cm_conn_req_handler()
662 ret = cm_id->cm_handler(cm_id, iw_event); in cm_conn_req_handler()
664 iw_cm_reject(cm_id, NULL, 0); in cm_conn_req_handler()
666 destroy_cm_id(cm_id); in cm_conn_req_handler()
850 struct iwcm_id_private *cm_id_priv = work->cm_id; in cm_work_handler()
903 static int cm_event_handler(struct iw_cm_id *cm_id, in cm_event_handler() argument
911 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in cm_event_handler()
921 work->cm_id = cm_id_priv; in cm_event_handler()
995 int iw_cm_init_qp_attr(struct iw_cm_id *cm_id, in iw_cm_init_qp_attr() argument
1002 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); in iw_cm_init_qp_attr()