capi.c (552c69b36ebd966186573b9c7a286b390935cce1) capi.c (2cd1f0ddbb5667f61e69089964209e8f716e9009)
1/*
2 CMTP implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2002-2003 Marcel Holtmann <marcel@holtmann.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License version 2 as
7 published by the Free Software Foundation;
8

--- 507 unchanged lines hidden (view full) ---

516
517 list_for_each_entry(app, &session->applications, list) {
518 seq_printf(m, "appl %d -> %d\n", app->appl, app->mapping);
519 }
520
521 return 0;
522}
523
1/*
2 CMTP implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2002-2003 Marcel Holtmann <marcel@holtmann.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License version 2 as
7 published by the Free Software Foundation;
8

--- 507 unchanged lines hidden (view full) ---

516
517 list_for_each_entry(app, &session->applications, list) {
518 seq_printf(m, "appl %d -> %d\n", app->appl, app->mapping);
519 }
520
521 return 0;
522}
523
524static int cmtp_proc_open(struct inode *inode, struct file *file)
525{
526 return single_open(file, cmtp_proc_show, PDE_DATA(inode));
527}
528
529static const struct file_operations cmtp_proc_fops = {
530 .open = cmtp_proc_open,
531 .read = seq_read,
532 .llseek = seq_lseek,
533 .release = single_release,
534};
535
536int cmtp_attach_device(struct cmtp_session *session)
537{
538 unsigned char buf[4];
539 long ret;
540
541 BT_DBG("session %p", session);
542
543 capimsg_setu32(buf, 0, 0);

--- 22 unchanged lines hidden (view full) ---

566 session->ctrl.driver_name = "cmtp";
567 session->ctrl.load_firmware = cmtp_load_firmware;
568 session->ctrl.reset_ctr = cmtp_reset_ctr;
569 session->ctrl.register_appl = cmtp_register_appl;
570 session->ctrl.release_appl = cmtp_release_appl;
571 session->ctrl.send_message = cmtp_send_message;
572
573 session->ctrl.procinfo = cmtp_procinfo;
524int cmtp_attach_device(struct cmtp_session *session)
525{
526 unsigned char buf[4];
527 long ret;
528
529 BT_DBG("session %p", session);
530
531 capimsg_setu32(buf, 0, 0);

--- 22 unchanged lines hidden (view full) ---

554 session->ctrl.driver_name = "cmtp";
555 session->ctrl.load_firmware = cmtp_load_firmware;
556 session->ctrl.reset_ctr = cmtp_reset_ctr;
557 session->ctrl.register_appl = cmtp_register_appl;
558 session->ctrl.release_appl = cmtp_release_appl;
559 session->ctrl.send_message = cmtp_send_message;
560
561 session->ctrl.procinfo = cmtp_procinfo;
574 session->ctrl.proc_fops = &cmtp_proc_fops;
562 session->ctrl.proc_show = cmtp_proc_show;
575
576 if (attach_capi_ctr(&session->ctrl) < 0) {
577 BT_ERR("Can't attach new controller");
578 return -EBUSY;
579 }
580
581 session->num = session->ctrl.cnr;
582

--- 25 unchanged lines hidden ---
563
564 if (attach_capi_ctr(&session->ctrl) < 0) {
565 BT_ERR("Can't attach new controller");
566 return -EBUSY;
567 }
568
569 session->num = session->ctrl.cnr;
570

--- 25 unchanged lines hidden ---