|
From: Gordon M. <gm...@us...> - 2001-03-04 17:53:51
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
Config.in 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20
README 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20
bluetooth.c 1.133 1.134=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20
l2cap.c 1.86 1.87=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
--Modified the config macros to be compatible with the Linux kernel config =
system.
The diff of the modified file(s):
--- Config.in 2001/03/02 21:10:41 1.1
+++ Config.in 2001/03/04 17:54:54 1.2
@@ -1,5 +1,34 @@
#---------------------------------------------------------------------
# Bluetooth driver configuration
#---------------------------------------------------------------------
+mainmenu_option next_comment
+comment 'Bluetooth'
=20
tristate 'Bluetooth driver' CONFIG_BLUETOOTH
+
+if [ "$CONFIG_BLUETOOTH" !=3D "n" ]; then
+
+ bool 'Bluetooth proc entry' CONFIG_BLUETOOTH_PROC
+ bool 'Input buffering' CONFIG_BLUETOOTH_USEINBUFFER
+ bool 'HCI USB' CONFIG_BLUETOOTH_HCI_USB
+ bool 'Allow connectionless L2CAP' CONFIG_BLUETOOTH_L2CAP_CONNECTIONLESS
+ bool 'Use L2CAP timers' CONFIG_BLUETOOTH_L2CAP_USETIMERS
+
+ choice 'Bluetooth hardware type' \
+ "CSR CONFIG_BLUETOOTH_CSR \
+ None CONFIG_BLUETOOTH_NOINIT \
+ Digianswer CONFIG_BLUETOOTH_DIGIANSWER \
+ USB CONFIG_BLUETOOTH_USBMODULE \
+ Generic CONFIG_BLUETOOTH_GENERIC \
+ Ericsson CONFIG_BLUETOOTH_ERICSSON" Ericsson
+
+ if [ "$CONFIG_BLUETOOTH_ERICSSON" =3D "y" ]; then
+ bool 'Ericsson P9A firmware' CONFIG_BLUETOOTH_ERICSSON_P9A
+ fi
+fi
+
+endmenu
+# Don't know why I need this one again, but things don't work right in the=
char
+# menu if I don't put it in.
+# --gmcnutt
+endmenu
\ No newline at end of file
--- README 2001/01/08 16:44:38 1.25
+++ README 2001/03/04 17:54:54 1.26
@@ -300,7 +300,7 @@
=20
There are two files that needs to be changed
=20
-Kernel : btconfig.h, set HW_CURRENT to whatever you are using
+Kernel : btconfig.h, set CONFIG_BLUETOOTH_<hardware> to whatever you are u=
sing
=20
Usermode app : btd.c, set HW_CURRENT to whatever you are using=20
=20
--- bluetooth.c 2001/03/04 15:55:03 1.133
+++ bluetooth.c 2001/03/04 17:54:54 1.134
@@ -64,7 +64,7 @@
#include <linux/bluetooth/tci.h>
#endif
=20
-#ifdef BT_USE_PROC
+#ifdef CONFIG_BLUETOOTH_PROC
#include <linux/bluetooth/bt_proc.h>
#endif
=20
@@ -120,7 +120,7 @@
=20
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
-#ifdef BT_USEINBUFFER
+#ifdef CONFIG_BLUETOOTH_USEINBUFFER
=20
/* This buffer is used decrease overruns on serial port. Copies data in
interrupt context and schedules a task which consumes data at 'safe' ti=
me */
@@ -147,7 +147,7 @@
#endif
static void bt_flash_led(void);
=20
-#ifdef BT_USEINBUFFER
+#ifdef CONFIG_BLUETOOTH_USEINBUFFER
struct tq_struct bt_receive_task;
bt_inbuffer hci_data;
static void hci_receive_data_task(void);
@@ -598,7 +598,7 @@
case BTRESETPHYSICALHW:
#ifdef __CRIS__
=20
-#if HW_USED(HW_CSR)
+#ifdef CONFIG_BLUETOOTH_CSR
#define CONFIG_BLUETOOTH_RESET_ACTIVE_HIGH
#else
#undef CONFIG_BLUETOOTH_RESET_ACTIVE_HIGH
@@ -1243,13 +1243,13 @@
=20
bt_flash_led();=20=20
=20
-#ifdef BT_USEINBUFFER
+#ifdef CONFIG_BLUETOOTH_USEINBUFFER
/* store in bt inbuffer and schedule a hci receive task if none is starte=
d */
bt_handle_indata(data, count);
#else
/* process data right away */
hci_receive_data((u8*)data, count);
-#endif /* BT_USEINBUFFER */
+#endif /* CONFIG_BLUETOOTH_USEINBUFFER */
}
=20
=20
@@ -1410,7 +1410,7 @@
#undef FNC
}
=20
-#ifdef BT_USEINBUFFER
+#ifdef CONFIG_BLUETOOTH_USEINBUFFER
static void bt_handle_indata(const __u8 *data, s32 count)
{
s32 free;
@@ -1501,7 +1501,7 @@
hci_receive_data(getTemp, size_end);
}
}
-#endif /* BT_USEINBUFFER */
+#endif /* CONFIG_BLUETOOTH_USEINBUFFER */
=20
/* Opens a connection to the selected PSM, layer specific is the same as t=
he
* lowest part on the connection ID, in RFCOMM this is line | dlci, each o=
ne
@@ -1836,7 +1836,9 @@
{
static struct tty_ldisc bt_ldisc;
s32 status;
+#ifdef CONFIG_BLUETOOTH_PROC
s32 procfs_status =3D -1;
+#endif
=20
show_bt_version();
=20
@@ -1922,7 +1924,7 @@
=20=09
sertty =3D NULL;
=20
-#ifdef BT_USE_PROC
+#ifdef CONFIG_BLUETOOTH_PROC
DSYS("Registering BT proc files\n");
=20=20
#ifdef KERNEL_VERSION /* Not defined for kernel 2.0.x */
@@ -2090,12 +2092,12 @@
}
#endif /* USE_TCI */
=20=09
-#endif /* BT_USE_PROC */
+#endif /* CONFIG_BLUETOOTH_PROC */
=20
DSYS("Bluetooth Driver Using ttyBT[0-%d] (data), ttyBTC (ctrl [%d])\n",
BT_NBR_DATAPORTS-1, BT_NBR_PORTS-1);
=20
-#ifdef BT_USEINBUFFER
+#ifdef CONFIG_BLUETOOTH_USEINBUFFER
DSYS("Using BT Inbuffers [%d]\n", BT_INBUFFER_SIZE);
/* Init hci inbuffer */
hci_data.head =3D &hci_data.data[0];
@@ -2645,7 +2647,7 @@
if (bt_stack_initiated)
bt_shutdown();
=20=09
-#ifdef BT_USE_PROC
+#ifdef CONFIG_BLUETOOTH_PROC
#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0)
remove_proc_entry(bt_status.name, &proc_root);
remove_proc_entry(bt_internal_info.name, &proc_root);
@@ -2669,7 +2671,7 @@
proc_unregister(&proc_root, tci_proc_entry.low_ino);
#endif /* USE_TCI */
#endif /* LINUX_VERSION_CODE */
-#endif /* BT_USE_PROC */
+#endif /* CONFIG_BLUETOOTH_PROC */
=20=09
DSYS("Bluetooth Driver unregistered\n");
}
--- hci_vendor.c 2001/03/02 10:50:44 1.12
+++ hci_vendor.c 2001/03/04 17:54:54 1.13
@@ -53,7 +53,7 @@
#include <linux/bluetooth/bluetooth.h>
#include <linux/bluetooth/btmem.h>
#include <linux/delay.h>
-#ifdef HCI_USEUSB
+#ifdef CONFIG_BLUETOOTH_HCI_USB
#include <linux/interrupt.h>
#endif
#else /* user mode */
@@ -68,7 +68,7 @@
=20
/****************** CONSTANT AND MACRO SECTION ***************************=
***/
=20
-#if HW_USED(HW_ERICSSON)
+#if defined(CONFIG_BLUETOOTH_ERICSSON)
/* Ericsson defines */
#define ERICSSON_SET_UART_BAUD_RATE 0x9
#define ERICSSON_WRITE_BD_ADDR 0xd
@@ -79,7 +79,7 @@
#define ERICSSON_TX_TEST 0x19
#endif
=20
-#if HW_USED(HW_DIGIANSWER)
+#if defined(CONFIG_BLUETOOTH_DIGIANSWER)
/* Digianswer defines */
#endif
=20
@@ -104,7 +104,7 @@
=20
/****************** FUNCTION DEFINITION SECTION **************************=
***/
=20
-#if HW_USED(HW_ERICSSON)
+#if defined(CONFIG_BLUETOOTH_ERICSSON)
/*************************************************************************=
****/
/********************** Ericsson functions *******************************=
****/
/*************************************************************************=
****/
@@ -170,7 +170,7 @@
D_ERR(__FUNCTION__": Baudrate not supported\n");
break;=09
}
-#ifndef P9A
+#ifndef CONFIG_BLUETOOTH_ERICSSON_P9A
tmp =3D send_cmd_block((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
#else
if (hci_ctrl.hc_buf.cmd_num < 1) {
@@ -197,7 +197,7 @@
=20=20=20=20=20
case ERICSSON_SET_UART_BAUD_RATE:
D_CMD(__FUNCTION__" Ericsson baudrate set\n");
-#ifndef P9A
+#ifndef CONFIG_BLUETOOTH_ERICSSON_P9A
// no wake up, since hci_set_baudrate() is non-blocking
release_cmd_timer();
wake_up_interruptible(&hci_wq);
@@ -270,7 +270,7 @@
}
=20
=20
-#elif HW_USED(HW_DIGIANSWER)
+#elif defined(CONFIG_BLUETOOTH_DIGIANSWER)
/*************************************************************************=
****/
/************************* Digianswer functions **************************=
****/
/*************************************************************************=
****/
@@ -403,7 +403,7 @@
}
#endif
=20
-#elif HW_USED(HW_CSR)
+#elif defined(CONFIG_BLUETOOTH_CSR)
/*************************************************************************=
****/
/****************************** CSR functions ****************************=
****/
/*************************************************************************=
****/
--- l2cap.c 2001/03/02 10:50:44 1.86
+++ l2cap.c 2001/03/04 17:54:54 1.87
@@ -223,7 +223,7 @@
#endif /* LINUX_VERSION_CODE */
#endif /* __KERNEL__ */
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
#define MAX_NO_RTX 0
#define RTX_TIMEOUT 5 /* sec */
#define ERTX_TIMEOUT 60 /* sec */
@@ -315,7 +315,11 @@
#if L2CAP_SELFTEST
test_conlist();
#endif
- l2cap->allow_conless =3D DEF_ALLOWCONLESS;
+#ifdef BLUETOOTH_CONFIG_L2CAP_CONNECTIONLESS
+ l2cap->allow_conless =3D 1;
+#else
+ l2cap->allow_conless =3D 0;
+#endif
l2cap->initiated =3D 1;
return 0;
}
@@ -978,7 +982,7 @@
return;
}
=20=20=20=20=20=20=20=20=20=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
disable_rtx(con);
#endif
=20
@@ -992,7 +996,7 @@
=20=20=20=20=20=20=20=20=20=20=20=20
case RES_PENDING:
l2ca_connect_pnd(con, conrsp->status);
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
/* Disable RTX timer and start ERTX */
//start_ertx();
#endif
@@ -1030,7 +1034,7 @@
Disable RTX/ERTX timers
(New state : CLOSED)
*/
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
disable_rtx(con);
//disable_ertx(con);
#endif
@@ -1071,7 +1075,7 @@
=20=09
case CONF_SUCCESS:
=20=20=20=20=20=20=20=20=20=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
disable_rtx(con);
#endif
=20
@@ -1121,7 +1125,7 @@
=20
/* If we end up here, config failed */
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
disable_rtx(con);
#endif
=20
@@ -1166,7 +1170,7 @@
return;
}
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
disable_rtx(con);
#endif=09
=20
@@ -1368,7 +1372,7 @@
sleep(3);
#endif
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
do_cmd_backup(con, SIG_CONREQ, 0, NULL, 0, 0, 0);
#endif
/* baseband is up, now initiate l2cap */
@@ -1422,7 +1426,7 @@
/* flag phys link as down */
con->link_up =3D FALSE;
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
/* cancel any outstanding timers */
disable_rtx(con);
//disable_ertx(con);
@@ -1561,7 +1565,7 @@
con->link_up =3D 1;
ENTERSTATE(con, W4_L2CAP_CONNECT_RSP);
PRINTSTATE(con);
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
do_cmd_backup(con, SIG_CONREQ, 0, NULL, 0, 0, 0);
#endif
l2cap_connect_req(con, psm);
@@ -1594,7 +1598,7 @@
=20
/* local mtu is set in l2cap_config_req */
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
do_cmd_backup(con, SIG_CONFREQ, in_mtu, outflow,=20
flush_timeout, link_to, 0);
#endif=09=09
@@ -1620,7 +1624,7 @@
=20
con->conf_req_ready =3D FALSE;
con->conf_rsp_ready =3D FALSE;
-#ifdef L2CAP_USETIMERS=09=09
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09
do_cmd_backup(con, SIG_CONFREQ, in_mtu, outflow,=20
flush_timeout, link_to, 0);
#endif
@@ -1649,7 +1653,7 @@
=20
if (con->current_state =3D=3D OPEN || con->current_state =3D=3D CONFIG) {
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
do_cmd_backup(con, SIG_DISCREQ, 0, NULL,0, 0, 0);
#endif
result =3D l2cap_disconnect_req(con);
@@ -1899,7 +1903,7 @@
tx->cur_len =3D L2CAP_HDRSIZE + payload_len; /* Increased as lower layers=
=20
add header data */=20=20
=20=09
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
/* start retransmission timer */
start_rtx(con, RTX_TIMEOUT);
#endif
@@ -2021,7 +2025,7 @@
SIGCMD_HDRSIZE + CONF_REQSIZE);
=20=09
print_data("l2cap options : ", (char*)opt , opt_len);
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
/* start retransmission timer */
start_rtx(con, RTX_TIMEOUT);
#endif
@@ -2065,7 +2069,7 @@
tx->bc_flag =3D NO_BROADCAST;
tx->cur_len =3D L2CAP_HDRSIZE + payload_len;
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
/* start retransmission timer */
start_rtx(con, RTX_TIMEOUT);
#endif
@@ -2113,7 +2117,7 @@
tx->bc_flag =3D NO_BROADCAST;
tx->cur_len =3D L2CAP_HDRSIZE + payload_len; /* Increased when lower
layers add header data */
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
start_rtx(con, RTX_TIMEOUT);
#endif
return hci_send_data(tx);
@@ -2200,7 +2204,7 @@
tx->bc_flag =3D NO_BROADCAST;
tx->cur_len =3D L2CAP_HDRSIZE + payload_len; /* Increased when lower
layers add header data */
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
start_rtx(con, RTX_TIMEOUT);
#endif
return hci_send_data(tx);
@@ -2666,7 +2670,7 @@
/* use existing handle */
D_STATE("l2ca_ping : using existing handle\n");
con->ping_sent=3D1;
-#ifdef L2CAP_USETIMERS=09=09
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09
do_cmd_backup(con, SIG_ECHOREQ, 0, NULL, 0, 0, 0);
#endif
l2cap_echo_req(con, NULL, 0);
@@ -2721,7 +2725,7 @@
con->inforeq_sent =3D 1;
con->initiator =3D 1;
insert_con(con);
-#ifdef L2CAP_USETIMERS=09=09
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09
do_cmd_backup(con, SIG_INFOREQ, 0, NULL, 0, 0, infotype);
#endif
/* l2cap_echo_req is called in lp_connect_cfm */
@@ -2732,7 +2736,7 @@
/* use existing handle */
D_STATE("l2ca_getinfo : using existing handle\n");
con->inforeq_sent =3D 1;
-#ifdef L2CAP_USETIMERS=09=09
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS=09=09
do_cmd_backup(con, SIG_INFOREQ, 0, NULL, 0, 0, infotype);
#endif
l2cap_info_req(con, infotype);
@@ -2804,7 +2808,7 @@
=20=20=20
/* FIXME -- send l2ca_timeoutind() */
=20
-#ifdef L2CAP_USETIMERS
+#ifdef CONFIG_BLUETOOTH_L2CAP_USETIMERS
if (MAX_NO_RTX =3D=3D 0)
{
/* no retransmissions, shutdown connection */
|