|
From: Mats F. <ma...@us...> - 2001-02-27 14:56:54
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.124 1.125=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added Read Scan Enable IOCTL
Added parameters for time and nbr of units in inquiry
Added parameter to initiate sdp as server or client
The diff of the modified file(s):
--- bluetooth.c 2001/02/27 12:51:12 1.124
+++ bluetooth.c 2001/02/27 14:58:02 1.125
@@ -59,6 +59,7 @@
#include <linux/bluetooth/rfcomm.h>
#include <linux/bluetooth/tcs.h>
#include <linux/bluetooth/sdp.h>
+#include <linux/bluetooth/tci.h>
#include <linux/bluetooth/sec_client.h>
=20
#ifdef BT_USE_PROC
@@ -218,6 +219,8 @@
void bt_linebuf_send(s32 line);
#endif
=20
+const u8* psmname(u16 psm);
+
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
=20
/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
@@ -653,14 +656,14 @@
=20
case HCIINQUIRY:
{=20
- s32 max_nbr_of_units;
+ s32 in_param[2];
u8 lap[3];
=20=09=09
BT_DRIVER(FNC"HCINQUIRY\n");
=20=09=09
- copy_from_user(&max_nbr_of_units, (s32*)arg, 4);
- inq_res =3D hci_inquiry(lap, 10 , max_nbr_of_units);
- copy_to_user((s32*)arg, inq_res, size + 6 * max_nbr_of_units);
+ copy_from_user(in_param, (s32*)arg, 8);
+ inq_res =3D hci_inquiry(lap, in_param[1] , in_param[0]);
+ copy_to_user((s32*)arg, inq_res, size + 6 * inq_res->nbr_of_units);
break;
}
=20=09
@@ -810,6 +813,13 @@
break;
}
=20=09
+ case HCIREADSCANENABLE:
+ BT_DRIVER("Reading scan enable\n");
+
+ tmp =3D hci_read_scan_enable();
+ put_user(tmp, (s32*)arg);
+ break;
+=09
case HCIWRITESCANENABLE:
GET_USER(tmp, (s32*)arg);
BT_DRIVER("setting write scan enable : [0x%x]\n", tmp);
@@ -1842,6 +1852,22 @@
procfs_status);
}
=20=09
+#ifdef USE_TCI
+#ifdef KERNEL_VERSION /* Not defined for kernel 2.0.x */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,2,0)
+ procfs_status =3D proc_register(&proc_root, &tci_proc_entry);
+#else
+ procfs_status =3D proc_register_dynamic(&proc_root, &tci_proc_entry);
+#endif /* LINUX_VERSION_CODE */
+#else /* KERNEL_VERSION */
+ procfs_status =3D proc_register_dynamic(&proc_root, &tci_proc_entry);
+#endif/* KERNEL_VERSION */
+
+ if (procfs_status < 0) {
+ D_ERR("Couldn't register proc file for tci database %d\n",
+ procfs_status);
+ }
+#endif /* USE_TCI */
=20
#endif /* BT_USE_PROC */
=20
@@ -1898,9 +1924,13 @@
hci_init();
l2cap_init();
=20
+#ifdef USE_TCI
+ tci_init();
+#else
rfcomm_init();
- sdp_init();
+ sdp_init(1); /* For now always init as server */
tcs_init();
+#endif
btmem_init();
bt_stack_initiated =3D 1;
bt_stat.bytes_received =3D 0;
|