Lines Matching refs:ctrl
186 struct capi_ctr *ctrl = &session->ctrl; in cmtp_recv_interopmsg() local
240 if (!info && ctrl) { in cmtp_recv_interopmsg()
241 memcpy(&ctrl->profile, in cmtp_recv_interopmsg()
245 capi_ctr_ready(ctrl); in cmtp_recv_interopmsg()
254 if (!info && ctrl) { in cmtp_recv_interopmsg()
258 memset(ctrl->manu, 0, CAPI_MANUFACTURER_LEN); in cmtp_recv_interopmsg()
259 strncpy(ctrl->manu, in cmtp_recv_interopmsg()
269 if (!info && ctrl) { in cmtp_recv_interopmsg()
270 ctrl->version.majorversion = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 16); in cmtp_recv_interopmsg()
271 ctrl->version.minorversion = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 20); in cmtp_recv_interopmsg()
272 ctrl->version.majormanuversion = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 24); in cmtp_recv_interopmsg()
273 ctrl->version.minormanuversion = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 28); in cmtp_recv_interopmsg()
282 if (!info && ctrl) { in cmtp_recv_interopmsg()
286 memset(ctrl->serial, 0, CAPI_SERIAL_LEN); in cmtp_recv_interopmsg()
287 strncpy(ctrl->serial, in cmtp_recv_interopmsg()
319 struct capi_ctr *ctrl = &session->ctrl; in cmtp_recv_capimsg() local
357 capi_ctr_handle_message(ctrl, appl, skb); in cmtp_recv_capimsg()
360 static int cmtp_load_firmware(struct capi_ctr *ctrl, capiloaddata *data) in cmtp_load_firmware() argument
362 BT_DBG("ctrl %p data %p", ctrl, data); in cmtp_load_firmware()
367 static void cmtp_reset_ctr(struct capi_ctr *ctrl) in cmtp_reset_ctr() argument
369 struct cmtp_session *session = ctrl->driverdata; in cmtp_reset_ctr()
371 BT_DBG("ctrl %p", ctrl); in cmtp_reset_ctr()
373 capi_ctr_down(ctrl); in cmtp_reset_ctr()
379 static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_params *rp) in cmtp_register_appl() argument
382 struct cmtp_session *session = ctrl->driverdata; in cmtp_register_appl()
389 ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen); in cmtp_register_appl()
398 nconn = ctrl->profile.nbchannel * -want; in cmtp_register_appl()
403 nconn = ctrl->profile.nbchannel; in cmtp_register_appl()
448 static void cmtp_release_appl(struct capi_ctr *ctrl, __u16 appl) in cmtp_release_appl() argument
450 struct cmtp_session *session = ctrl->driverdata; in cmtp_release_appl()
453 BT_DBG("ctrl %p appl %d", ctrl, appl); in cmtp_release_appl()
472 static u16 cmtp_send_message(struct capi_ctr *ctrl, struct sk_buff *skb) in cmtp_send_message() argument
474 struct cmtp_session *session = ctrl->driverdata; in cmtp_send_message()
479 BT_DBG("ctrl %p skb %p", ctrl, skb); in cmtp_send_message()
502 static char *cmtp_procinfo(struct capi_ctr *ctrl) in cmtp_procinfo() argument
509 struct capi_ctr *ctrl = m->private; in cmtp_proc_show() local
510 struct cmtp_session *session = ctrl->driverdata; in cmtp_proc_show()
513 seq_printf(m, "%s\n\n", cmtp_procinfo(ctrl)); in cmtp_proc_show()
550 session->ctrl.owner = THIS_MODULE; in cmtp_attach_device()
551 session->ctrl.driverdata = session; in cmtp_attach_device()
552 strcpy(session->ctrl.name, session->name); in cmtp_attach_device()
554 session->ctrl.driver_name = "cmtp"; in cmtp_attach_device()
555 session->ctrl.load_firmware = cmtp_load_firmware; in cmtp_attach_device()
556 session->ctrl.reset_ctr = cmtp_reset_ctr; in cmtp_attach_device()
557 session->ctrl.register_appl = cmtp_register_appl; in cmtp_attach_device()
558 session->ctrl.release_appl = cmtp_release_appl; in cmtp_attach_device()
559 session->ctrl.send_message = cmtp_send_message; in cmtp_attach_device()
561 session->ctrl.procinfo = cmtp_procinfo; in cmtp_attach_device()
562 session->ctrl.proc_show = cmtp_proc_show; in cmtp_attach_device()
564 if (attach_capi_ctr(&session->ctrl) < 0) { in cmtp_attach_device()
569 session->num = session->ctrl.cnr; in cmtp_attach_device()
594 detach_capi_ctr(&session->ctrl); in cmtp_detach_device()