Lines Matching defs:cm_id

63 	struct iwcm_id_private *cm_id;
85 * elements. The design pre-allocates them based on the cm_id type:
95 * One exception is when creating the cm_id for incoming connection requests.
97 * 1) in the event upcall, cm_event_handler(), for a listening cm_id. If
102 * If work elements cannot be allocated for the new connect request cm_id,
121 list_add(&work->free_list, &work->cm_id->work_free_list);
143 work->cm_id = cm_id_priv;
173 * Release a reference on cm_id. If the last reference is being
189 static void add_ref(struct iw_cm_id *cm_id)
192 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
196 static void rem_ref(struct iw_cm_id *cm_id)
201 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
204 * Test bit before deref in case the cm_id gets freed on another
214 static int cm_event_handler(struct iw_cm_id *cm_id, struct iw_cm_event *event);
281 int iw_cm_disconnect(struct iw_cm_id *cm_id, int abrupt)
288 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
348 static void destroy_cm_id(struct iw_cm_id *cm_id)
353 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
367 cm_id->device->iwcm->destroy_listen(cm_id);
390 cm_id->device->iwcm->reject(cm_id, NULL, 0);
411 * references to be released on the cm_id and then kfree the cm_id
414 void iw_destroy_cm_id(struct iw_cm_id *cm_id)
418 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
421 destroy_cm_id(cm_id);
435 int iw_cm_listen(struct iw_cm_id *cm_id, int backlog)
441 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
455 ret = cm_id->device->iwcm->create_listen(cm_id, backlog);
474 int iw_cm_reject(struct iw_cm_id *cm_id,
482 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
495 ret = cm_id->device->iwcm->reject(cm_id, private_data,
512 int iw_cm_accept(struct iw_cm_id *cm_id,
520 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
531 qp = cm_id->device->iwcm->get_qp(cm_id->device, iw_param->qpn);
538 cm_id->device->iwcm->add_ref(qp);
542 ret = cm_id->device->iwcm->accept(cm_id, iw_param);
549 cm_id->device->iwcm->rem_ref(qp);
568 int iw_cm_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
575 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
592 qp = cm_id->device->iwcm->get_qp(cm_id->device, iw_param->qpn);
599 cm_id->device->iwcm->add_ref(qp);
604 ret = cm_id->device->iwcm->connect(cm_id, iw_param);
608 cm_id->device->iwcm->rem_ref(qp);
641 struct iw_cm_id *cm_id;
651 cm_id = iw_create_cm_id(listen_id_priv->id.device,
654 /* If the cm_id could not be created, ignore the request */
655 if (IS_ERR(cm_id))
658 cm_id->provider_data = iw_event->provider_data;
659 cm_id->local_addr = iw_event->local_addr;
660 cm_id->remote_addr = iw_event->remote_addr;
662 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
672 iw_cm_reject(cm_id, NULL, 0);
673 iw_destroy_cm_id(cm_id);
680 iw_cm_reject(cm_id, NULL, 0);
681 iw_destroy_cm_id(cm_id);
686 ret = cm_id->cm_handler(cm_id, iw_event);
688 iw_cm_reject(cm_id, NULL, 0);
690 destroy_cm_id(cm_id);
800 * If in some other state, the cm_id was destroyed asynchronously.
862 * Process events on the work_list for the cm_id. If the callback
863 * function requests that the cm_id be deleted, a flag is set in the
864 * cm_id flags to indicate that when the last reference is
865 * removed, the cm_id is to be destroyed. This is necessary to
874 struct iwcm_id_private *cm_id_priv = work->cm_id;
919 * Each event holds a reference on the cm_id. Until the last posted
920 * event has been delivered and processed, the cm_id cannot be
927 static int cm_event_handler(struct iw_cm_id *cm_id,
935 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
945 work->cm_id = cm_id_priv;
1019 int iw_cm_init_qp_attr(struct iw_cm_id *cm_id,
1026 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);