|
From: Peter K. <pk...@us...> - 2001-06-05 09:48:16
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.152 1.153=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed a line of unnecessary code.
The diff of the modified file(s):
--- hci.c 2001/06/05 09:19:34 1.152
+++ hci.c 2001/06/05 09:48:16 1.153
@@ -702,7 +702,7 @@
void
update_ncp(u8 nbr_of_hdl, u8 *pkt)
{
- s32 i, tmp;
+ s32 i;
=20
D_REC(__FUNCTION__", acl_num before : %d\n", hci_ctrl.hc_buf.acl_num);
=20=09
@@ -712,7 +712,6 @@
that have been sent */
=20
for (i =3D 0; i < 4 * nbr_of_hdl; i +=3D 4) {
- tmp =3D CHAR2INT16(pkt[i+3], pkt[i+2]);
hci_ctrl.hc_buf.acl_num +=3D CHAR2INT16(pkt[i+3], pkt[i+2]);
}
=20=09
|
|
From: Mattias A. <mat...@us...> - 2001-06-06 14:53:12
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.153 1.154=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Always include bcsp code if CONFIG_BLUETOOTH_SUPPORT_BCSP is set
* Don't initialize cmd num if using bcsp, is updated after syncronizing
* Changed cmd timeout to 2 secs
* Minor changes
The diff of the modified file(s):
--- hci.c 2001/06/05 09:48:16 1.153
+++ hci.c 2001/06/06 14:53:11 1.154
@@ -138,7 +138,7 @@
#endif
=20
#define USE_NCPTIMER=20
-#define NCP_TIMEOUT (3*HZ)
+#define NCP_TIMEOUT (2*HZ)
=20
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
@@ -585,7 +585,7 @@
}
}
=20
-#ifdef CONFIG_BLUETOOTH_USE_BCSP
+#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
void
hci_receive_event(u8 *data, s32 count)
{
@@ -1836,15 +1836,26 @@
init_cmd_buf();
=20
hci_ctrl.nbr_of_connections =3D 0;
+
+#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
+ /* After syncing BCSP we receive a command status with cmd num */
+ if (!bt_use_bcsp(-1))
hci_ctrl.hc_buf.cmd_num =3D 1;
=20
+ /* don't touch cmd num when using bcsp, is updated=20
+ from command status event after syncronizing */
+
+#else
+ hci_ctrl.hc_buf.cmd_num =3D 1;
+#endif
+
#ifdef __KERNEL__
send_data_task.routine =3D (void*)send_acl_data_task;
send_data_task.data =3D NULL;
#endif
=20
/* always... */
- DSYS(__FUNCTION__", Reading buffer sizes in the module...\n");
+ DSYS(__FUNCTION__": Reading buffer sizes in HW module\n");
hci_read_buffer_size(HCI_BLOCK);
hci_read_firmware_rev_info();=09
=20
|
|
From: Mats F. <ma...@us...> - 2001-06-07 06:47:23
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.154 1.155=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Initialize cmd_num to 0 when using bcsp
The diff of the modified file(s):
--- hci.c 2001/06/06 14:53:11 1.154
+++ hci.c 2001/06/07 06:47:21 1.155
@@ -816,8 +816,8 @@
test_hci_hdl =3D hci_hdl;
=20
if (link_type =3D=3D ACL_LINK) {
- lp_connect_cfm(buf + 3, (u32) buf[0], hci_hdl);
=20
+ lp_connect_cfm(buf + 3, (u32) buf[0], hci_hdl);
#ifndef HCI_EMULATION
if (buf[0]) {
/* remove hci handle if connection failed */
@@ -1838,12 +1838,14 @@
hci_ctrl.nbr_of_connections =3D 0;
=20
#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
- /* After syncing BCSP we receive a command status with cmd num */
- if (!bt_use_bcsp(-1))
+ if (!bt_use_bcsp(-1)) {
hci_ctrl.hc_buf.cmd_num =3D 1;
-
- /* don't touch cmd num when using bcsp, is updated=20
- from command status event after syncronizing */
+ } else {
+ /* cmd_num will be set from command status event after
+ syncronizing bcsp, until then we shouldn't send any
+ commands */
+ hci_ctrl.hc_buf.cmd_num =3D 0;
+ }
=20
#else
hci_ctrl.hc_buf.cmd_num =3D 1;
|
|
From: Mats F. <ma...@us...> - 2001-06-07 14:33:42
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.155 1.156=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Initialize host_controller_buffers
The diff of the modified file(s):
--- hci.c 2001/06/07 06:47:21 1.155
+++ hci.c 2001/06/07 14:33:41 1.156
@@ -266,7 +266,8 @@
=20
/* General HCI controller struct, contains vital information about buffer=
=20
sizes and connections */
-hci_controller hci_ctrl;
+hci_controller hci_ctrl =3D {{0, 0, 0, 0, 0}};
+=09=09=09=20
=20
#ifdef __KERNEL__
#ifdef USE_NCPTIMER
@@ -1838,13 +1839,11 @@
hci_ctrl.nbr_of_connections =3D 0;
=20
#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
+=09
+ /* If we use bcsp cmd_num will be set from command status event after
+ syncronizing bcsp */
if (!bt_use_bcsp(-1)) {
hci_ctrl.hc_buf.cmd_num =3D 1;
- } else {
- /* cmd_num will be set from command status event after
- syncronizing bcsp, until then we shouldn't send any
- commands */
- hci_ctrl.hc_buf.cmd_num =3D 0;
}
=20
#else
|
|
From: Peter K. <pk...@us...> - 2001-06-08 12:01:27
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.156 1.157=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Minor change to debug messages.
The diff of the modified file(s):
--- hci.c 2001/06/07 14:33:41 1.156
+++ hci.c 2001/06/08 12:01:26 1.157
@@ -256,6 +256,7 @@
#endif
=20
static void send_acl_data_task(void);
+
/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
=20
/* Struct used for sending command packets */
@@ -357,7 +358,7 @@
u8 *buf; /* Temporary pointer to the incoming data */
u32 tmp_data_len;
=20=20
- PRINTPKT(__FUNCTION__", ", data, count);
+ PRINTPKT(__FUNCTION__ ": ", data, count);
=20=20=20
tmp_data_len =3D count;
buf =3D data;
@@ -366,14 +367,14 @@
packet is received it is copied into a buffer and sent to the=20
processing function */
=20=20=20
- D_INDATA(__FUNCTION__", hci-%d\n", tmp_data_len);
+ D_INDATA(__FUNCTION__ ": hci-%d\n", tmp_data_len);
while (count > 0) {
switch (state) {
=20=09=09=09
/* The first byte will tell us whether it is an event or a
data packet */
case WAIT_FOR_PACKET_TYPE:
- D_STATE(__FUNCTION__", WAIT_FOR_PACKET_TYPE\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_PACKET_TYPE\n");
tmp_pos =3D 0;
switch(*buf) {
case EVENT_PKT: state =3D WAIT_FOR_EVENT_TYPE; break;
@@ -400,7 +401,7 @@
/* If it is an event packet we wait for the next byte
which tell us which kind of event it is */=20
case WAIT_FOR_EVENT_TYPE:
- D_STATE(__FUNCTION__", WAIT_FOR_EVENT_TYPE\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_EVENT_TYPE\n");
event_type =3D *buf;
state =3D WAIT_FOR_EVENT_LENGTH;
buf++;
@@ -409,7 +410,7 @@
=20
/* If it is an event the length-field is one byte */
case WAIT_FOR_EVENT_LENGTH:
- D_STATE(__FUNCTION__", WAIT_FOR_EVENT_LENGTH\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_EVENT_LENGTH\n");
event_len =3D *buf;
buf++;
count--;
@@ -441,7 +442,7 @@
/* Before we can parse the event, we wait for the
whole event */
case WAIT_FOR_EVENT_PARAM:
- D_STATE(__FUNCTION__", WAIT_FOR_EVENT_PARAM\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_EVENT_PARAM\n");
if (tmp_pos < event_len) {
c =3D MIN(count, event_len - tmp_pos);
memcpy(event_buf + tmp_pos, buf, c);
@@ -458,7 +459,7 @@
=20
/* Here we wait for the whole data header, four bytes*/
case WAIT_FOR_ACL_HDR:
- D_STATE(__FUNCTION__", WAIT_FOR_ACL_HDR\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_ACL_HDR\n");
c =3D MIN(count, ACL_HDR_LEN - tmp_pos);
memcpy(hdr + tmp_pos, buf, c);
tmp_pos +=3D c;
@@ -484,14 +485,14 @@
}
=20
if (pb_flag =3D=3D L2CAP_FRAME_START) {
- D_REC(__FUNCTION__", new frame\n");
+ D_REC(__FUNCTION__ ": New frame\n");
in_buf =3D get_free_inbuffer();
if (in_buf) {
in_buf->nbr_of_hci_pkt =3D 1;
in_buf->hci_hdl =3D hci_hdl;
}=09
} else {
- D_REC(__FUNCTION__", cont frame\n");
+ D_REC(__FUNCTION__ ": Cont frame\n");
in_buf =3D get_inbuffer(hci_hdl);
if (in_buf) {
in_buf->nbr_of_hci_pkt++;
@@ -506,9 +507,9 @@
tmp_pos =3D 0;
state =3D WAIT_FOR_ACL_DATA;
} else if (tmp_pos < ACL_HDR_LEN) {
- D_REC(__FUNCTION__" Didn't got whole header length, waiting for more\n=
");
+ D_REC(__FUNCTION__ ": Didn't got whole header length, waiting for more=
\n");
} else {
- D_ERR(__FUNCTION__" incorredt ACL header length\n");
+ D_ERR(__FUNCTION__ ": incorredt ACL header length\n");
}
break;
=20
@@ -516,7 +517,7 @@
whole data packet and then we send it to a higher
protocol layer, in this case the L2CAP-layer */
case WAIT_FOR_ACL_DATA:
- D_STATE(__FUNCTION__", WAIT_FOR_ACL_DATA\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_ACL_DATA\n");
/* Find out how much data we can copy, don't copy more
than one HCI packet at time */
c =3D MIN(count, data_len - tmp_pos);
@@ -524,7 +525,7 @@
memcpy(in_buf->buf_ptr, buf, c);
in_buf->buf_ptr +=3D c;
in_buf->count +=3D c;
- D_REC(__FUNCTION__", in_buf->count =3D %d\n",in_buf->count);
+ D_REC(__FUNCTION__ ": in_buf->count =3D %d\n",in_buf->count);
}
=20=20=20=20=20=20=20
/* Increase the data_index and decrease the amount of
@@ -532,7 +533,7 @@
tmp_pos +=3D c;
count -=3D c;
=20=20=20=20=20=20=20
- D_REC(__FUNCTION__", Copied %d bytes into inbuffer\n",c);
+ D_REC(__FUNCTION__ ": Copied %d bytes into inbuffer\n",c);
if (tmp_pos =3D=3D data_len) {
if (in_buf) {
process_acl_data(in_buf, pb_flag);
@@ -546,7 +547,7 @@
=20=20=20=20=20=20=20
/* wait for the SCO header, three bytes */
case WAIT_FOR_SCO_HDR:
- D_STATE(__FUNCTION__", WAIT_FOR_SCO_HDR\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_SCO_HDR\n");
if (tmp_pos < SCO_HDR_LEN) {
c =3D MIN(count,SCO_HDR_LEN - tmp_pos);
memcpy(hdr + tmp_pos, buf, c);
@@ -565,7 +566,7 @@
/* Wait for the rest of the SCO packet and send it to
the tty */
case WAIT_FOR_SCO_DATA:
- D_STATE(__FUNCTION__", WAIT_FOR_SCO_DATA\n");
+ D_STATE(__FUNCTION__ ": WAIT_FOR_SCO_DATA\n");
c =3D MIN(count, data_len - tmp_pos);
process_sco_packet(buf, hci_hdl, c);
tmp_pos +=3D c;
@@ -580,7 +581,7 @@
break;
=20
default:
- D_ERR(__FUNCTION__", : Oups shouldn't be possible...\n");
+ D_ERR(__FUNCTION__ ": Oops shouldn't be possible...\n");
break;
}
}
@@ -601,7 +602,7 @@
tmp_buf +=3D 2;
count -=3D 2;
=20
- D_REC(__FUNCTION__", Received event 0x%02x with len:%d\n", event_type, e=
vent_len);
+ D_REC(__FUNCTION__ ": Received event 0x%02x with len:%d\n", event_type, =
event_len);
=20=09=09
process_event(tmp_buf, event_len, event_type);
tmp_buf +=3D event_len;
@@ -643,14 +644,14 @@
}
=20=09=09
if (pb_flag =3D=3D L2CAP_FRAME_START) {
- D_REC(__FUNCTION__", new L2CAP frame\n");
+ D_REC(__FUNCTION__ ": New L2CAP frame\n");
in_buf =3D get_free_inbuffer();
if (in_buf) {
in_buf->nbr_of_hci_pkt =3D 1;
in_buf->hci_hdl =3D hci_hdl;
}=09
} else {
- D_REC(__FUNCTION__", cont L2CAP frame\n");
+ D_REC(__FUNCTION__ ": Cont L2CAP frame\n");
in_buf =3D get_inbuffer(hci_hdl);
if (in_buf) {
in_buf->nbr_of_hci_pkt++;
@@ -659,13 +660,13 @@
=20=09=09
if (in_buf) {
memcpy(in_buf->buf_ptr, tmp_buf, data_len);
- D_REC(__FUNCTION__", Copied %d bytes into inbuffer\n",
+ D_REC(__FUNCTION__ ": Copied %d bytes into inbuffer\n",
data_len);
in_buf->buf_ptr +=3D data_len;
in_buf->count +=3D data_len;
- D_REC(__FUNCTION__", in_buf->count:%d\n", in_buf->count);
+ D_REC(__FUNCTION__ ": in_buf->count: %d\n", in_buf->count);
} else {
- D_ERR(__FUNCTION__", No inbuffer was found, "\
+ D_ERR(__FUNCTION__ ": No inbuffer was found, "\
"discarding data\n");
return;
}
@@ -705,7 +706,7 @@
{
s32 i;
=20
- D_REC(__FUNCTION__", acl_num before : %d\n", hci_ctrl.hc_buf.acl_num);
+ D_REC(__FUNCTION__ ": acl_num before: %d\n", hci_ctrl.hc_buf.acl_num);
=20=09
/* FIXME */
/* Check if we have to register which connection handlers that
@@ -718,7 +719,7 @@
=20=09
D_QUEUE("<NCP:%d>\n",hci_ctrl.hc_buf.acl_num);
=20
- D_REC(__FUNCTION__", acl_num after : %d\n", hci_ctrl.hc_buf.acl_num);
+ D_REC(__FUNCTION__ ": acl_num after: %d\n", hci_ctrl.hc_buf.acl_num);
=20
/* We've just been notified that the hardware has free buffers.
If we have any outstanding packets, send_acl_data_task will try
@@ -766,7 +767,7 @@
wake_up_interruptible(&inq_wq);
#ifndef __KERNEL__
for (i =3D 0; i < inq_res->nbr_of_units; i++) {
- D_CMD(__FUNCTION__", BD %d: %02x:%02x:%02x:%02x:%02x:%02x\n",i,
+ D_CMD(__FUNCTION__ ": BD %d: %02x:%02x:%02x:%02x:%02x:%02x\n",i,
inq_res->bd_addr[0+6*i],inq_res->bd_addr[1+6*i],
inq_res->bd_addr[2+6*i],inq_res->bd_addr[3+6*i],
inq_res->bd_addr[4+6*i],inq_res->bd_addr[5+6*i]);
@@ -779,7 +780,7 @@
s32 i, j;
u8 tmp_bd[6];
=20
- D_CMD(__FUNCTION__", INQUIRY_RESULT\n");
+ D_CMD(__FUNCTION__ ": INQUIRY_RESULT\n");
for(i =3D 1; i < (buf[0] * 14) + 1; i +=3D 14) {=09=09
printk("BD addr %d\n", i % 14);
=20=09=09=09
@@ -807,7 +808,7 @@
{
u8 link_type;
=20
- D_CMD(__FUNCTION__", CONNECTION_COMPLETE: %s\n",
+ D_CMD(__FUNCTION__ ": CONNECTION_COMPLETE: %s\n",
get_err_msg(buf[0]));
=20
hci_ctrl.nbr_of_connections++;
@@ -822,12 +823,12 @@
#ifndef HCI_EMULATION
if (buf[0]) {
/* remove hci handle if connection failed */
- DSYS(__FUNCTION__", CONNECTION_COMPLETE %s\n",=20
+ DSYS(__FUNCTION__ ": CONNECTION_COMPLETE %s\n",
get_err_msg(buf[0]));
hci_ctrl.nbr_of_connections--;
reset_hci_con_bd(hci_hdl);
} else {
- DSYS(__FUNCTION__", ACL link is up\n");
+ DSYS(__FUNCTION__ ": ACL link is up\n");
#ifdef CONFIG_BLUETOOTH_ERICSSON
change_connection_packet_type(hci_hdl,=20
DM3|DH3|DM5|DH5);
@@ -865,18 +866,18 @@
break;
}
case CONNECTION_REQUEST:
- D_CMD(__FUNCTION__", CONNECTION_REQUEST\n");
+ D_CMD(__FUNCTION__ ": CONNECTION_REQUEST\n");
=20
if (buf[9] =3D=3D ACL_LINK) {
lp_connect_ind(buf); /* BD_ADDRESS */
} else {
- printk(__FUNCTION__", CONNECTION_REQUEST for SCO LINK");
+ printk(__FUNCTION__ ": CONNECTION_REQUEST for SCO LINK");
accept_connection_request(buf, 0x01); /* role ignored for SCO */
}
break;
=20
case DISCONNECTION_COMPLETE:
- DSYS(__FUNCTION__", DISCONNECTION_COMPLETE %s\n", get_err_msg(buf[3]));
+ DSYS(__FUNCTION__ ": DISCONNECTION_COMPLETE %s\n", get_err_msg(buf[3]));
lp_disconnect_ind(CHAR2INT12(buf[2], buf[1]));
/* FIXME: No more NBR_OF_COMPLETE_PACKETS will arrive for this
connection handle, if we only support point-to-point
@@ -892,10 +893,10 @@
break;
=20
case AUTHENTICATION_COMPLETE:
- DSYS(__FUNCTION__", AUTHENTICATION_COMPLETE\n");
+ DSYS(__FUNCTION__ ": AUTHENTICATION_COMPLETE\n");
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
if (buf[0]) {
- D_ERR(__FUNCTION__", AUTHENTICATION_COMPLETE: %s\n", get_err_msg(buf[0]=
));
+ D_ERR(__FUNCTION__ ": AUTHENTICATION_COMPLETE: %s\n", get_err_msg(buf[0=
]));
=20=09=09=09
}
=20=09=09
@@ -904,13 +905,13 @@
break;
=20
case REMOTE_NAME_REQUEST_COMPLETE:
- D_CMD(__FUNCTION__", REMOTE_NAME_REQUEST_COMPLETE %s\n", buf + 7);
+ D_CMD(__FUNCTION__ ": REMOTE_NAME_REQUEST_COMPLETE %s\n", buf + 7);
if (buf[0]) {
- D_ERR(__FUNCTION__", REMOTE_NAME_REQUEST_COMPLETE: %s\n",
+ D_ERR(__FUNCTION__ ": REMOTE_NAME_REQUEST_COMPLETE: %s\n",
get_err_msg(buf[0]));
} else {
if (strlen(buf + 7) > 248) {
- D_ERR(__FUNCTION__", REMOTE_NAME_REQUEST_COMPLETE: too long name lengt=
h %d\n", (int)strlen(buf + 7));
+ D_ERR(__FUNCTION__ ": REMOTE_NAME_REQUEST_COMPLETE: too long name leng=
th %d\n", (int)strlen(buf + 7));
break;
}
set_hci_con_name(buf + 1, buf + 7);
@@ -918,10 +919,10 @@
break;
=20
case ENCRYPTION_CHANGE:
- DSYS(__FUNCTION__", ENCRYPTION_CHANGE\n");
+ DSYS(__FUNCTION__ ": ENCRYPTION_CHANGE\n");
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
if (buf[0]) {
- D_ERR(__FUNCTION__", ENCRYPTION_CHANGE: %s\n", get_err_msg(buf[0]));
+ D_ERR(__FUNCTION__ ": ENCRYPTION_CHANGE: %s\n", get_err_msg(buf[0]));
}
=20
{
@@ -935,27 +936,27 @@
break;
=20=09
case CHANGE_CONNECTION_LINK_KEY_COMPLETE:
- DSYS(__FUNCTION__", CHANGE_CONNECTION_LINK_KEY_COMPLETE Not implemented!=
\n");
+ DSYS(__FUNCTION__ ": CHANGE_CONNECTION_LINK_KEY_COMPLETE Not implemented=
!\n");
break;
=20
case MASTER_LINK_KEY_COMPLETE:
- DSYS(__FUNCTION__", MASTER_LINK_KEY_COMPLETE Not implemented!\n");
+ DSYS(__FUNCTION__ ": MASTER_LINK_KEY_COMPLETE Not implemented!\n");
break;
=20
case READ_REMOTE_SUPPORTED_FEATURES_COMPLETE:
- DSYS(__FUNCTION__", READ_REMOTE_SUPPORTED_FEATURES_COMPLETE Not implemen=
ted!\n");
+ DSYS(__FUNCTION__ ": READ_REMOTE_SUPPORTED_FEATURES_COMPLETE Not impleme=
nted!\n");
break;
=20
case READ_REMOTE_VERSION_INFORMATION_COMPLETE:
- DSYS(__FUNCTION__", READ_REMOTE_VERSION_INFORMATION_COMPLETE Not impleme=
nted!\n");
+ DSYS(__FUNCTION__ ": READ_REMOTE_VERSION_INFORMATION_COMPLETE Not implem=
ented!\n");
break;
=20
case QOS_SETUP_COMPLETE:
- DSYS(__FUNCTION__", QOS_SETUP_COMPLETE\n");
+ DSYS(__FUNCTION__ ": QOS_SETUP_COMPLETE\n");
break;
=20
case COMMAND_COMPLETE:
- D_CMD(__FUNCTION__", COMMAND_COMPLETE\n");
+ D_CMD(__FUNCTION__ ": COMMAND_COMPLETE\n");
=20
/* FIXME - stop any outstanding send timers if cmd_num is > 0*/
D_QUEUE("<CC>\n");
@@ -970,7 +971,7 @@
=20=09=09
case COMMAND_STATUS:
=20=09=09
- D_CMD(__FUNCTION__", COMMAND_STATUS\n");
+ D_CMD(__FUNCTION__ ": COMMAND_STATUS\n");
=20=09=09
if (buf[0]) {=09=09=09
=20
@@ -979,7 +980,7 @@
command status with "ACL link already exist" is returned=20
This must be signalled using lp_connect_cfm (neg)
*/
- D_ERR(__FUNCTION__", COMMAND_STATUS: %s\n",get_err_msg(buf[0]));
+ D_ERR(__FUNCTION__ ": COMMAND_STATUS: %s\n", get_err_msg(buf[0]));
#ifdef USE_INQTIMER
if (hci_inq_pending)
release_inq_timer();
@@ -989,48 +990,48 @@
update_nhcp(buf[1]);
break;
case FLUSH_OCCURRED:
- D_CMD(__FUNCTION__", FLUSH_OCCURRED on hci_hdl %d\n",
+ D_CMD(__FUNCTION__ ": FLUSH_OCCURRED on hci_hdl %d\n",
CHAR2INT12(buf[1],buf[0]));
btmem_flushhandle(CHAR2INT12(buf[1],buf[0]));
break;
=20
case HARDWARE_ERROR:
- D_ERR(__FUNCTION__", An hardware error with error code 0x%02x occurred\n=
Please refer to your bluetooth module manual\n", buf[0]);
+ D_ERR(__FUNCTION__ ": An hardware error with error code 0x%02x occurred\=
n Please refer to your bluetooth module manual\n", buf[0]);
break;
=20
case ROLE_CHANGED:
- DSYS(__FUNCTION__", ROLE_CHANGED\n");
+ DSYS(__FUNCTION__ ": ROLE_CHANGED\n");
=20=09=09
if (buf[0]) {=20
- D_ERR(__FUNCTION__", Role changed failed due to %s\n",
+ D_ERR(__FUNCTION__ ": Role changed failed due to %s\n",
get_err_msg(buf[0]));
=20=09=09=09
/* fixme -- Notify l2cap that this BD will go down */
=20=09=09=09
} else if (buf[7]) {
- DSYS(__FUNCTION__", Current master is 0x%04x%08x\n",=20
+ DSYS(__FUNCTION__ ": Current master is 0x%04x%08x\n",=20
CHAR2INT16(buf[6], buf[5]),=20
CHAR2INT32(buf[4], buf[3], buf[2], buf[1]));
} else {
- DSYS(__FUNCTION__", Our role is master for BD Address 0x%04x%08x\n", CH=
AR2INT16(buf[6], buf[5]), CHAR2INT32(buf[4], buf[3], buf[2], buf[1]));
+ DSYS(__FUNCTION__ ": Our role is master for BD Address 0x%04x%08x\n", C=
HAR2INT16(buf[6], buf[5]), CHAR2INT32(buf[4], buf[3], buf[2], buf[1]));
}
break;
=20
case NBR_OF_COMPLETED_PACKETS:=20
=20
- D_CMD(__FUNCTION__", NUMBER_OF_COMPLETED_PACKETS\n");
+ D_CMD(__FUNCTION__ ": NUMBER_OF_COMPLETED_PACKETS\n");
=20
update_ncp(buf[0], buf + 1);
=20
break;
=20
case MODE_CHANGE:
- D_CMD(__FUNCTION__", MODE_CHANGE on hci_hdl %d\n",
+ D_CMD(__FUNCTION__ ": MODE_CHANGE on hci_hdl %d\n",
CHAR2INT12(buf[2],buf[1]));
break;
=20
case RETURN_LINK_KEYS:
- D_CMD(__FUNCTION__", RETURN_LINK_KEYS event\n");
+ D_CMD(__FUNCTION__ ": RETURN_LINK_KEYS event\n");
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
{
u8 tmp_str[23];
@@ -1047,57 +1048,56 @@
break;
=20=09
case PIN_CODE_REQUEST:
- D_CMD(__FUNCTION__", PIN_CODE_REQUEST forwarding event to security manag=
er\n");
+ D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST forwarding event to security mana=
ger\n");
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
sec_man_event(HCI, buf, PIN_CODE_REQUEST, NULL, 0);
#endif
break;
=20=09
case LINK_KEY_REQUEST:
- D_CMD(__FUNCTION__", LINK_KEY_REQUEST\n");
+ D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST\n");
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
sec_man_event(HCI, buf, LINK_KEY_REQUEST, NULL, 0);
#endif
break;
=20
case LINK_KEY_NOTIFICATION:
- D_CMD(__FUNCTION__", LINK_KEY_NOTIFICATION forwarding event to security =
manager\n");
+ D_CMD(__FUNCTION__ ": LINK_KEY_NOTIFICATION forwarding event to security=
manager\n");
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
sec_man_event(HCI, buf, LINK_KEY_NOTIFICATION, buf + 6, 16);
#endif
break;
=20
case LOOPBACK_COMMAND:
- DSYS(__FUNCTION__", LOOPBACK_COMMAND, loopback mode not supported\n");
+ DSYS(__FUNCTION__ ": LOOPBACK_COMMAND, loopback mode not supported\n");
break;
=20
case DATA_BUFFER_OVERFLOW:
- D_ERR(__FUNCTION__", DATA_BUFFER_OVERFLOW\n");
+ D_ERR(__FUNCTION__ ": DATA_BUFFER_OVERFLOW\n");
break;
=20
case MAX_SLOTS_CHANGE:
- D_CMD(__FUNCTION__", MAX_SLOTS_CHANGE to %d\n",
- (u32) buf[2]);
+ D_CMD(__FUNCTION__ ": MAX_SLOTS_CHANGE to %d\n", (u32) buf[2]);
break;
=20
case READ_CLOCK_OFFSET_COMPLETE:
- D_CMD(__FUNCTION__", READ_CLOCK_OFFSET_COMPLETE\n");
+ D_CMD(__FUNCTION__ ": READ_CLOCK_OFFSET_COMPLETE\n");
break;
=20
case CONNECTION_PACKET_TYPE_CHANGED:
- D_CMD(__FUNCTION__", CHANGE_CONNECTION_PACKET_TYPE\n");
+ D_CMD(__FUNCTION__ ": CHANGE_CONNECTION_PACKET_TYPE\n");
break;
=20
case QOS_VIOLATION:
- D_CMD(__FUNCTION__", QOS_VIOLATION\n");
+ D_CMD(__FUNCTION__ ": QOS_VIOLATION\n");
break;
=20
case PAGE_SCAN_MODE_CHANGE:
- DSYS(__FUNCTION__", PAGE_SCAN_MODE_CHANGE Not implemented\n");
+ DSYS(__FUNCTION__ ": PAGE_SCAN_MODE_CHANGE Not implemented\n");
break;
=20
case PAGE_SCAN_REPETITION_MODE_CHANGE:
- DSYS(__FUNCTION__", PAGE_SCAN_REPETITION_MODE_CHANGE Not implemented\n");
+ DSYS(__FUNCTION__ ": PAGE_SCAN_REPETITION_MODE_CHANGE Not implemented\n"=
);
break;=09
=20
case VENDOR_EVENT:
@@ -1105,7 +1105,7 @@
break;
=20
default:
- DSYS(__FUNCTION__", UNKNOWN EVENT CODE 0x%x\n",event_code);
+ DSYS(__FUNCTION__ ": UNKNOWN EVENT CODE 0x%x\n", event_code);
break;
}
}
@@ -1142,13 +1142,13 @@
case LINK_KEY_REQUEST_REPLY:
release_cmd_timer();
=20=09=09=09
- D_CMD(__FUNCTION__", LINK_KEY_REQUEST_REPLY\n");
+ D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST_REPLY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", LINK_KEY_REQUEST_REPLY %s\n", get_err_msg(r_val[0=
]));
+ D_ERR(__FUNCTION__ ": LINK_KEY_REQUEST_REPLY %s\n", get_err_msg(r_val[=
0]));
result_param =3D - r_val[0];=20
}
else {
- D_CMD(__FUNCTION__", LINK_KEY_REQUEST_REPLY Success\n");
+ D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST_REPLY Success\n");
result_param =3D 0;
}
=20=09=09=09
@@ -1158,13 +1158,13 @@
case LINK_KEY_REQUEST_NEGATIVE_REPLY:
release_cmd_timer();
=20=09=09=09
- D_CMD(__FUNCTION__", LINK_KEY_REQUEST_NEGATIVE_REPLY\n");
+ D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST_NEGATIVE_REPLY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", LINK_KEY_REQUEST_NEGATIVE_REPLY %s\n", get_err_ms=
g(r_val[0]));
+ D_ERR(__FUNCTION__ ": LINK_KEY_REQUEST_NEGATIVE_REPLY %s\n", get_err_m=
sg(r_val[0]));
result_param =3D - r_val[0];=20
}
else {
- D_CMD(__FUNCTION__", LINK_KEY_REQUEST_NEGATIVE_REPLY Success\n");
+ D_CMD(__FUNCTION__ ": LINK_KEY_REQUEST_NEGATIVE_REPLY Success\n");
result_param =3D 0;
}
=20=09=09=09
@@ -1174,13 +1174,13 @@
case PIN_CODE_REQUEST_REPLY:
release_cmd_timer();
=20=09=09=09=09=09
- D_CMD(__FUNCTION__", PIN_CODE_REQUEST_REPLY\n");
+ D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST_REPLY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", PIN_CODE_REQUEST_REPLY %s\n", get_err_msg(r_val[0=
]));
+ D_ERR(__FUNCTION__ ": PIN_CODE_REQUEST_REPLY %s\n", get_err_msg(r_val[=
0]));
result_param =3D - r_val[0];=20
}
else {
- D_CMD(__FUNCTION__", PIN_CODE_REQUEST_REPLY Success\n");
+ D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST_REPLY Success\n");
result_param =3D 0;
}
=20
@@ -1191,13 +1191,13 @@
case PIN_CODE_REQUEST_NEGATIVE_REPLY:
release_cmd_timer();
=20=09=09=09
- D_CMD(__FUNCTION__", PIN_CODE_REQUEST_NEGATIVE_REPLY\n");
+ D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST_NEGATIVE_REPLY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", PIN_CODE_REQUEST_NEGATIVE_REPLY %s\n", get_err_ms=
g(r_val[0]));
+ D_ERR(__FUNCTION__ ": PIN_CODE_REQUEST_NEGATIVE_REPLY %s\n", get_err_m=
sg(r_val[0]));
result_param =3D - r_val[0];=20
}
else {
- D_CMD(__FUNCTION__", PIN_CODE_REQUEST_NEGATIVE_REPLY Success\n");
+ D_CMD(__FUNCTION__ ": PIN_CODE_REQUEST_NEGATIVE_REPLY Success\n");
result_param =3D 0;
}
=20
@@ -1205,7 +1205,7 @@
break;=09
=20
default:
- D_CMD(__FUNCTION__", HCI_LC, ocf %d not recognised!\n", ocf);
+ D_CMD(__FUNCTION__ ": HCI_LC, ocf %d not recognised!\n", ocf);
break;
}
=20
@@ -1219,64 +1219,64 @@
switch (ocf) {
=20=09=09=09
case CREATE_NEW_UNIT_KEY:
- D_CMD(__FUNCTION__", CREATE_NEW_UNIT_KEY\n");
+ D_CMD(__FUNCTION__ ": CREATE_NEW_UNIT_KEY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", CREATE_NEW_UNIT_KEY %s\n", get_err_msg(r_val[0]));
+ D_ERR(__FUNCTION__ ": CREATE_NEW_UNIT_KEY %s\n", get_err_msg(r_val[0])=
);
result_param =3D - r_val[0];=20
} else {
- D_CMD(__FUNCTION__", CREATE_NEW_UNIT_KEY Success\n");
+ D_CMD(__FUNCTION__ ": CREATE_NEW_UNIT_KEY Success\n");
result_param =3D 0;
}
break;
=20=09=09=09
=20=09=09=09
case READ_STORED_LINK_KEY:
- DSYS(__FUNCTION__", READ_STORED_LINK_KEY\n");
+ DSYS(__FUNCTION__ ": READ_STORED_LINK_KEY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", READ_STORED_LINK_KEY %s\n", get_err_msg(r_val[0])=
);
+ D_ERR(__FUNCTION__ ": READ_STORED_LINK_KEY %s\n", get_err_msg(r_val[0]=
));
result_param =3D - r_val[0];
} else {
- D_CMD(__FUNCTION__", READ_STORED_LINK_KEY Success\n");
+ D_CMD(__FUNCTION__ ": READ_STORED_LINK_KEY Success\n");
result_param =3D CHAR2INT32(r_val[4], r_val[3],
r_val[2], r_val[=
1]);
}
- DSYS(__FUNCTION__", Max number of Linkkeys: %d\n",
+ DSYS(__FUNCTION__ ": Max number of Linkkeys: %d\n",
CHAR2INT16(r_val[2], r_val[1]));
- DSYS(__FUNCTION__", Number of Linkkeys read: %d\n",
+ DSYS(__FUNCTION__ ": Number of Linkkeys read: %d\n",
CHAR2INT16(r_val[4], r_val[3]));
break;
=20
case WRITE_STORED_LINK_KEY:
- D_CMD(__FUNCTION__", WRITE_STORED_LINK_KEY\n");
+ D_CMD(__FUNCTION__ ": WRITE_STORED_LINK_KEY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_STORED_LINK_KEY %s\n", get_err_msg(r_val[0]=
));
+ D_ERR(__FUNCTION__ ": WRITE_STORED_LINK_KEY %s\n", get_err_msg(r_val[0=
]));
result_param =3D - r_val[0];=20
}
else {
- D_CMD(__FUNCTION__", WRITE_STORED_LINK_KEY Success\n");
+ D_CMD(__FUNCTION__ ": WRITE_STORED_LINK_KEY Success\n");
result_param =3D 0;
}
break;
=20
case DELETE_STORED_LINK_KEY:
- D_CMD(__FUNCTION__", DELETE_STORED_LINK_KEY\n");
+ D_CMD(__FUNCTION__ ": DELETE_STORED_LINK_KEY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", DELETE_STORED_LINK_KEY %s\n", get_err_msg(r_val[0=
]));
+ D_ERR(__FUNCTION__ ": DELETE_STORED_LINK_KEY %s\n", get_err_msg(r_val[=
0]));
result_param =3D - r_val[0];
} else {
- D_CMD(__FUNCTION__", DELETE_STORED_LINK_KEY Success\n");
+ D_CMD(__FUNCTION__ ": DELETE_STORED_LINK_KEY Success\n");
result_param =3D CHAR2INT16(r_val[2], r_val[1]);
}
=20=09=09=09
- D_CMD(__FUNCTION__", Number of Linkkeys deleted: %d\n",
+ D_CMD(__FUNCTION__ ": Number of Linkkeys deleted: %d\n",
CHAR2INT16(r_val[2], r_val[1]));
break;=09
=20=20=20=20=20=20=20=20=20=20=20=20=20
case READ_TRANSMIT_POWER_LEVEL:=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
=20=09=09=20=20
- printk(__FUNCTION__", READ_TRANSMIT_POWER_LEVEL\n");
+ printk(__FUNCTION__ ": READ_TRANSMIT_POWER_LEVEL\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", READ_TRANSMIT_POWER_LEVEL: %s\n",
+ D_ERR(__FUNCTION__ ": READ_TRANSMIT_POWER_LEVEL: %s\n",
get_err_msg(r_val[0]));
break;
} else {
@@ -1286,34 +1286,34 @@
break;
=20
case SET_HOST_CONTROLLER_TO_HOST_FLOW_CONTROL:
- D_CMD(__FUNCTION__", SET_HOST_CONTROLLER_TO_HOST_FLOW_CONTROL\n");
+ D_CMD(__FUNCTION__ ": SET_HOST_CONTROLLER_TO_HOST_FLOW_CONTROL\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", SET_HOST_CONTROLLER_TO_HOST_FLOW_CONTROL: %s\n",
+ D_ERR(__FUNCTION__ ": SET_HOST_CONTROLLER_TO_HOST_FLOW_CONTROL: %s\n",
get_err_msg(r_val[0]));
break;
}
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case HOST_BUFFER_SIZE:=20=20
- D_CMD(__FUNCTION__", HOST_BUFFER_SIZE\n");
+ D_CMD(__FUNCTION__ ": HOST_BUFFER_SIZE\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", HOST_BUFFER_SIZE: %s\n",
+ D_ERR(__FUNCTION__ ": HOST_BUFFER_SIZE: %s\n",
get_err_msg(r_val[0]));
}
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case CHANGE_LOCAL_NAME:
- D_CMD(__FUNCTION__", CHANGE_LOCAL_NAME\n");=20=20=20=20=20=20=20=20=20=
=20=20=20
+ D_CMD(__FUNCTION__ ": CHANGE_LOCAL_NAME\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", CHANGE_LOCAL_NAME: %s\n",
+ D_ERR(__FUNCTION__ ": CHANGE_LOCAL_NAME: %s\n",
get_err_msg(r_val[0]));
}
break;
=20
case READ_SCAN_ENABLE:
- D_CMD(__FUNCTION__", READ_SCAN_ENABLE\n");
+ D_CMD(__FUNCTION__ ": READ_SCAN_ENABLE\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", READ_SCAN_ENABLE: %s\n",
+ D_ERR(__FUNCTION__ ": READ_SCAN_ENABLE: %s\n",
get_err_msg(r_val[0]));
result_param =3D -r_val[0];
} else {
@@ -1323,34 +1323,34 @@
break;
=20=09=09=09
case WRITE_SCAN_ENABLE:
- D_CMD(__FUNCTION__", WRITE_SCAN_ENABLE\n");
+ D_CMD(__FUNCTION__ ": WRITE_SCAN_ENABLE\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_SCAN_ENABLE: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_SCAN_ENABLE: %s\n",
get_err_msg(r_val[0]));
}
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case WRITE_PAGESCAN_ACTIVITY:
- D_CMD(__FUNCTION__", WRITE_PAGESCAN_ACTIVITY\n");
+ D_CMD(__FUNCTION__ ": WRITE_PAGESCAN_ACTIVITY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_PAGESCAN_ACTIVITY: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_PAGESCAN_ACTIVITY: %s\n",
get_err_msg(r_val[0]));
}
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case WRITE_INQUIRYSCAN_ACTIVITY:
- D_CMD(__FUNCTION__", WRITE_INQUIRYSCAN_ACTIVITY\n");
+ D_CMD(__FUNCTION__ ": WRITE_INQUIRYSCAN_ACTIVITY\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_INQUIRYSCAN_ACTIVITY: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_INQUIRYSCAN_ACTIVITY: %s\n",
get_err_msg(r_val[0]));
result_param =3D -r_val[0];
}
break;
=20
case READ_AUTHENTICATION_ENABLE:
- D_CMD(__FUNCTION__", READ_AUTHENTICATION_ENABLE\n");
+ D_CMD(__FUNCTION__ ": READ_AUTHENTICATION_ENABLE\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", READ_AUTHENTICATION_ENABLE: %s\n", get_err_msg(r_=
val[0]));
+ D_ERR(__FUNCTION__ ": READ_AUTHENTICATION_ENABLE: %s\n", get_err_msg(r=
_val[0]));
result_param =3D -r_val[0];
} else {
result_param =3D r_val[1];
@@ -1358,18 +1358,18 @@
break;
=20=09=09=09
case WRITE_AUTHENTICATION_ENABLE:
- D_CMD(__FUNCTION__", WRITE_AUTHENTICATION_ENABLE\n");
+ D_CMD(__FUNCTION__ ": WRITE_AUTHENTICATION_ENABLE\n");
if(r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_AUTHENTICATION_ENABLE: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_AUTHENTICATION_ENABLE: %s\n",
get_err_msg(r_val[0]));
result_param =3D -r_val[0];
}=20
break;
=20=09=09=09
case READ_ENCRYPTION_MODE:
- D_CMD(__FUNCTION__", READ_ENCRYPTION_MODE\n");
+ D_CMD(__FUNCTION__ ": READ_ENCRYPTION_MODE\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", READ_ENCRYPTION_MODE: %s\n", get_err_msg(r_val[0]=
));
+ D_ERR(__FUNCTION__ ": READ_ENCRYPTION_MODE: %s\n", get_err_msg(r_val[0=
]));
result_param =3D -r_val[0];
} else {
result_param =3D r_val[1];
@@ -1377,57 +1377,57 @@
break;
=20=09=09=09
case WRITE_ENCRYPTION_MODE:
- D_CMD(__FUNCTION__", WRITE_AUTHENTICATION_ENABLE\n");
+ D_CMD(__FUNCTION__ ": WRITE_AUTHENTICATION_ENABLE\n");
if(r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_AUTHENTICATION_ENABLE: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_AUTHENTICATION_ENABLE: %s\n",
get_err_msg(r_val[0]));
result_param =3D -r_val[0];
}
break;
=20=09=09=09
case WRITE_CLASS_OF_DEVICE:
- D_CMD(__FUNCTION__", WRITE_CLASS_OF_DEVICE\n");
+ D_CMD(__FUNCTION__ ": WRITE_CLASS_OF_DEVICE\n");
if(r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_CLASS_OF_DEVICE: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_CLASS_OF_DEVICE: %s\n",
get_err_msg(r_val[0]));
}
break;
=20
case WRITE_AUTOMATIC_FLUSH_TIMEOUT:
- D_CMD(__FUNCTION__" WRITE_AUTOMATIC_FLUSH_TIMEOUT\n");
+ D_CMD(__FUNCTION__ ": WRITE_AUTOMATIC_FLUSH_TIMEOUT\n");
if (r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_AUTOMATIC_FLUSH_TIMEOUT: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_AUTOMATIC_FLUSH_TIMEOUT: %s\n",
get_err_msg(r_val[0]));
} else {
- D_CMD(__FUNCTION__", WRITE_AUTOMATIC_FLUSH_TIMEOUT Success\n");
+ D_CMD(__FUNCTION__ ": WRITE_AUTOMATIC_FLUSH_TIMEOUT Success\n");
}
=20=09=09=09
break;
=20
=20=20=20=20=20=20=20=20=20=20=20=20=20
case READ_LINK_SUPERVISION_TIMEOUT:
- D_CMD(__FUNCTION__", Link supervision timeout is: %d\n",
+ D_CMD(__FUNCTION__ ": Link supervision timeout is: %d\n",
CHAR2INT16(buf[4],buf[3]));
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case WRITE_LINK_SUPERVISION_TIMEOUT:
- D_CMD(__FUNCTION__", WRITE_LINK_SUPERVISION_TO (%d)\n", r_val[0]);
+ D_CMD(__FUNCTION__ ": WRITE_LINK_SUPERVISION_TO (%d)\n", r_val[0]);
if (r_val[0]) {
- D_ERR(__FUNCTION__", WRITE_LINK_SUPERVISION_TO: %s\n",
+ D_ERR(__FUNCTION__ ": WRITE_LINK_SUPERVISION_TO: %s\n",
get_err_msg(r_val[0]));
}
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case RESET:
- D_CMD(__FUNCTION__", RESET\n");=09=09=09=20=20=20=20=20=20
+ D_CMD(__FUNCTION__ ": RESET\n");
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
case SET_EVENT_FILTER:
- D_CMD(__FUNCTION__", SET_EVENT_FILTER\n");=09=09=09=20=20=20=20=20=20
+ D_CMD(__FUNCTION__ ": SET_EVENT_FILTER\n");
break;
=20=20=20=20=20=20=20=20=20=20=20=20=20
default:
- D_CMD(__FUNCTION__",...
[truncated message content] |
|
From: Mattias A. <mat...@us...> - 2001-06-13 12:00:36
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.157 1.158=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* changed some debug
* added return val in hci_init to signal failure.
* added check in hci_init to see whether hci initialized ok
* set cmd timeout to 2 secs instead of 3
The diff of the modified file(s):
--- hci.c 2001/06/08 12:01:26 1.157
+++ hci.c 2001/06/13 12:00:35 1.158
@@ -970,7 +970,6 @@
performing the task for this command */
=20=09=09
case COMMAND_STATUS:
-=09=09
D_CMD(__FUNCTION__ ": COMMAND_STATUS\n");
=20=09=09
if (buf[0]) {=09=09=09
@@ -1764,7 +1763,7 @@
return &hci_ctrl.hci_in_buf[i];
}
=20
-/* Finds an free in buffer*/
+/* Finds a free inbuffer */
=20
hci_in_buffer*=20
get_free_inbuffer(void)
@@ -1787,12 +1786,12 @@
return &hci_ctrl.hci_in_buf[i];
}
=20
-void=20
+s32
hci_init(void)
{
u32 i;
=20
- DSYS(__FUNCTION__ ": Initialising HCI\n");
+ DSYS("Initialising HCI\n");
=20
#ifdef HCI_EMULATION
DSYS("*** HCI emulator on ***\n");
@@ -1811,7 +1810,7 @@
#endif /* LINUX_VERSION_CODE */
#endif /* __KERNEL__ */
=20
- DSYS(__FUNCTION__ ": Initialising HCI inbuffers [%d]\n", HCI_IN_SIZE);
+ DSYS("Initialising HCI inbuffers [%d]\n", HCI_IN_SIZE);
=20=09
/* Initiate the hci inbuffers */
for (i =3D 0; i < NBR_OF_HCI_INBUFFERS; i++) {
@@ -1839,13 +1838,11 @@
hci_ctrl.nbr_of_connections =3D 0;
=20
#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
-=09
- /* If we use bcsp cmd_num will be set from command status event after
+ /* If we use bcsp cmd_num is set from command status event after
syncronizing bcsp */
if (!bt_use_bcsp(-1)) {
hci_ctrl.hc_buf.cmd_num =3D 1;
}
-
#else
hci_ctrl.hc_buf.cmd_num =3D 1;
#endif
@@ -1855,16 +1852,17 @@
send_data_task.data =3D NULL;
#endif
=20
- /* always... */
- DSYS(__FUNCTION__ ": Reading buffer sizes in HW module\n");
+ DSYS("Reading buffer sizes in HW module\n");
hci_read_buffer_size(HCI_BLOCK);
+
+ DSYS("Reading firmware info in HW module\n");
hci_read_firmware_rev_info();=09
=20
#ifdef HOST_FLOW_CTRL
- DSYS(__FUNCTION__ ": Host flow control enabled\n");
+ DSYS("Host flow control enabled\n");
hci_set_host_controller_flow_control(TRUE);
#else
- DSYS(__FUNCTION__ ": Host flow control not enabled\n");
+ DSYS("Host flow control not enabled\n");
#endif
hci_host_buffer_size(HCI_ACL_LEN,HCI_SCO_LEN,HCI_ACL_NUM,HCI_SCO_NUM);
=20
@@ -1881,6 +1879,12 @@
=20
hci_force_msswitch(0);
#endif
+
+ /* Check that hci initialized properly */
+ if (hci_ctrl.hc_buf.acl_num =3D=3D 0)
+ return -1;=09=20=20
+=09
+ return 0;
}
=20
void=20
@@ -3743,7 +3747,6 @@
send_cmd(u8 *cmd, u8 len)
{
s32 tmp;
-=09
tmp =3D insert_cmd(cmd, len);
if (tmp < 0) {
return tmp;
@@ -3878,7 +3881,7 @@
init_timer(&hci_cmd_timer);
hci_cmd_timer.function =3D cmd_timeout;
hci_cmd_timer.data =3D 0;
- hci_cmd_timer.expires =3D jiffies + 3*HZ;
+ hci_cmd_timer.expires =3D jiffies + 2*HZ;
add_timer(&hci_cmd_timer);
#endif
}
@@ -3955,7 +3958,6 @@
send_cmd_block(u8 *cmd, u8 len)
{
u32 tmp;
-
#ifdef __KERNEL__
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
struct wait_queue wait =3D { current, NULL};
@@ -3972,6 +3974,7 @@
hci_cmd_pending =3D 1;
=20=20=20
start_cmd_timer();
+=09
tmp =3D send_cmd(cmd, len);
=20=20=20
#ifdef __KERNEL__
|
|
From: Mats F. <ma...@us...> - 2001-06-18 12:15:14
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.160 1.161=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected bug in inquiry result
The diff of the modified file(s):
--- hci.c 2001/06/15 12:30:03 1.160
+++ hci.c 2001/06/18 12:15:13 1.161
@@ -789,10 +789,8 @@
}
print_data("BD", tmp_bd, 6);
for (j =3D 0; j < inq_res->nbr_of_units; j++) {
- if (!memcmp(inq_res->bd_addr +=20
- inq_res->nbr_of_units * 6, tmp_bd,
- 6)) {
- j =3D inq_res->nbr_of_units;
+ if (!memcmp(inq_res->bd_addr + j * 6, tmp_bd, 6)) {
+ break;
}
}
if (j >=3D inq_res->nbr_of_units) {
|
|
From: Peter K. <pk...@us...> - 2001-06-29 10:10:00
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.161 1.162=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected a call to buf_byte_count() that had not had the line
argument added.
The diff of the modified file(s):
--- hci.c 2001/06/18 12:15:13 1.161
+++ hci.c 2001/06/29 10:09:58 1.162
@@ -3301,7 +3301,7 @@
}
=20
=20=09=09=09
- D_QUEUE("<--%d (%d)\n", buf_byte_count(),=20
+ D_QUEUE("<--%d (%d)\n", buf_byte_count(-1),=20
hci_ctrl.hc_buf.acl_num);
=20=09=09
if (bytes2send =3D=3D 0) {
|
|
From: Olov H. <ol...@us...> - 2001-07-05 19:02:13
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.162 1.163=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added timeout value to cmdtimer. Added release of command timer when repons=
es are received
The diff of the modified file(s):
--- hci.c 2001/06/29 10:09:58 1.162
+++ hci.c 2001/07/05 10:52:45 1.163
@@ -140,6 +140,7 @@
#define USE_NCPTIMER=20
#define NCP_TIMEOUT (2*HZ)
=20
+
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
/* cmd_t and cmd_buf are structures used to handle the queue of commands
@@ -892,6 +893,8 @@
=20
case AUTHENTICATION_COMPLETE:
DSYS(__FUNCTION__ ": AUTHENTICATION_COMPLETE\n");
+ release_cmd_timer();
+=09=09
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
if (buf[0]) {
D_ERR(__FUNCTION__ ": AUTHENTICATION_COMPLETE: %s\n", get_err_msg(buf[0=
]));
@@ -900,6 +903,7 @@
=20=09=09
sec_man_event(HCI, get_bd(CHAR2INT12(buf[2], buf[1])), AUTHENTICATION_CO=
MPLETE, buf, 1);
#endif
+ wake_up_interruptible(&hci_wq);
break;
=20
case REMOTE_NAME_REQUEST_COMPLETE:
@@ -918,6 +922,7 @@
=20
case ENCRYPTION_CHANGE:
DSYS(__FUNCTION__ ": ENCRYPTION_CHANGE\n");
+ release_cmd_timer();
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
if (buf[0]) {
D_ERR(__FUNCTION__ ": ENCRYPTION_CHANGE: %s\n", get_err_msg(buf[0]));
@@ -931,6 +936,7 @@
sec_man_event(HCI, get_bd(CHAR2INT12(buf[2], buf[1=
])), ENCRYPTION_CHANGE, tmp, 2);
}
#endif
+ wake_up_interruptible(&hci_wq);
break;
=20=09
case CHANGE_CONNECTION_LINK_KEY_COMPLETE:
@@ -968,6 +974,7 @@
performing the task for this command */
=20=09=09
case COMMAND_STATUS:
+ release_cmd_timer();
D_CMD(__FUNCTION__ ": COMMAND_STATUS\n");
=20=09=09
if (buf[0]) {=09=09=09
@@ -985,6 +992,7 @@
}
=20=09=09
update_nhcp(buf[1]);
+ wake_up_interruptible(&hci_wq);
break;
case FLUSH_OCCURRED:
D_CMD(__FUNCTION__ ": FLUSH_OCCURRED on hci_hdl %d\n",
@@ -1982,7 +1990,7 @@
c_pkt.data[3] =3D 0x00;
c_pkt.len =3D 4;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
/* The Hci_Disconnect function is used to terminate an existing connection.
@@ -2063,7 +2071,7 @@
c +=3D 16;
c_pkt.len =3D c;
=20
- tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
+ tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2086,7 +2094,7 @@
=20=09
c_pkt.len =3D 6;
=20
- tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
+ tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN, DEFAULT_TIMEOUT);
printk(__FUNCTION__ ": Returned from send_secblock\n");
if (tmp < 0) {
return tmp;
@@ -2117,7 +2125,7 @@
=20
c_pkt.len =3D c;
=20=09
- tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
+ tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2140,7 +2148,7 @@
=20
c_pkt.len =3D 6;
=20=09
- tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
+ tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2218,7 +2226,7 @@
c_pkt.data[1] =3D (con_hdl >> 8) & 0xff;
c_pkt.len =3D 2;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
/*
@@ -2259,7 +2267,7 @@
c_pkt.data[2] =3D enable;
c_pkt.len =3D 3;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
=20
@@ -2365,7 +2373,7 @@
c_pkt.data[1] =3D ((hdl >> 8) & 0xff);
c_pkt.len =3D 2;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
s32
@@ -2379,7 +2387,7 @@
=20
c_pkt.len =3D 0;
=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2399,7 +2407,7 @@
c_pkt.data[6] =3D flag;
c_pkt.len =3D 7;
=20=20=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
=20
if (tmp < 0) {
return tmp;
@@ -2422,7 +2430,7 @@
memcpy(c_pkt.data + 7, link_key, 16);
c_pkt.len =3D 23;
=20=20=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2442,7 +2450,7 @@
c_pkt.data[6] =3D flag;
c_pkt.len =3D 7;
=20=20=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
=20
if (tmp < 0) {
return tmp;
@@ -2464,7 +2472,7 @@
strcpy(c_pkt.data, new_name);
c_pkt.len =3D NAME_LEN;
=20
- return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);=09
+ return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);=09
#undef NAME_LEN
}
=20
@@ -2480,7 +2488,7 @@
=20=20=20
c_pkt.len =3D 0;
=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2505,7 +2513,7 @@
c_pkt.data[0] =3D enable;
c_pkt.len =3D 1;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);=20
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);=20
}
=20
/*
@@ -2527,7 +2535,7 @@
c_pkt.data[3] =3D ((wind >> 8) & 0xff);
c_pkt.len =3D 4;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
/*
@@ -2563,7 +2571,7 @@
=20=20=20
print_data(__FUNCTION__, (u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2592,7 +2600,7 @@
=20=20=20
print_data(__FUNCTION__, (u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
if (tmp < 0) {
return tmp;
} else {
@@ -2658,7 +2666,7 @@
=20
c_pkt.len =3D 3;
=20=20=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
s32
@@ -2674,7 +2682,7 @@
=20
c_pkt.len =3D 3;
=20=20=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
=20=09
}
=20
@@ -2711,7 +2719,7 @@
c_pkt.data[0] =3D enable;
c_pkt.len =3D 1;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
#else
return 0;
#endif
@@ -2758,7 +2766,7 @@
c_pkt.data[c++] =3D sco_num & 0xff;
c_pkt.data[c++] =3D (sco_num >> 8) & 0xff;
=20
- return send_cmd_block((u8*) &c_pkt, c + CMD_HDR_LEN + HCI_HDR_LEN);
+ return send_cmd_block((u8*) &c_pkt, c + CMD_HDR_LEN + HCI_HDR_LEN, DEFAUL=
T_TIMEOUT);
#else
return 0;
#endif
@@ -2801,7 +2809,7 @@
c_pkt.data[1] =3D (hdl >> 8) & 0xff;
c_pkt.len =3D 2;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_=
HDR_LEN);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_=
HDR_LEN, DEFAULT_TIMEOUT);
}
=20
s32=20
@@ -2819,7 +2827,7 @@
print_data("write_link_to:",(u8*)&c_pkt,
c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
/* Defines of Informational Parameters function */
@@ -2840,7 +2848,7 @@
c_pkt.len =3D 0;
=20
if (block) {
- int ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_H=
DR_LEN);
+ int ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_H=
DR_LEN, DEFAULT_TIMEOUT);
#if 0
if (ret >=3D 0 &&
hci_ctrl.hc_buf.acl_len =3D=3D 256 &&
@@ -2850,7 +2858,7 @@
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(READ_BUFFER_SIZE, =
HCI_IP);
c_pkt.len =3D 0;
- ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + C=
MD_HDR_LEN + HCI_HDR_LEN);
+ ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + C=
MD_HDR_LEN + HCI_HDR_LEN, DEFAULT_TIMEOUT);
}
#endif
return ret;
@@ -2871,7 +2879,7 @@
c_pkt.len =3D 0;
=20
if (block)
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
else
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
}
@@ -2897,7 +2905,7 @@
=20
memset(bd, 0, 6);=20
=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
memcpy(bd, hci_ctrl.local_bd, 6);
return tmp;
}=20
@@ -2911,7 +2919,7 @@
c_pkt.opcode =3D hci_put_opcode(RESET, HCI_HC) ;
c_pkt.len =3D 0;
=20=20=20
- return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
}
=20
=20
@@ -3075,7 +3083,7 @@
c_pkt.opcode =3D hci_put_opcode(ENABLE_DEVICE_UNDER_TEST_MODE, HCI_TC) ;
c_pkt.len =3D 0;
=20
- return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
=20
@@ -3301,7 +3309,7 @@
}
=20
=20=09=09=09
- D_QUEUE("<--%d (%d)\n", buf_byte_count(-1),=20
+ D_QUEUE("<--%d (%d)\n", buf_byte_count(),=20
hci_ctrl.hc_buf.acl_num);
=20=09=09
if (bytes2send =3D=3D 0) {
@@ -3857,14 +3865,14 @@
#endif /* USE_NCPTIMER */
=20
void
-start_cmd_timer(void)
+start_cmd_timer(u8 max_time)
{
#ifdef __KERNEL__
D_CTRL(__FUNCTION__ "\n");
init_timer(&hci_cmd_timer);
hci_cmd_timer.function =3D cmd_timeout;
hci_cmd_timer.data =3D 0;
- hci_cmd_timer.expires =3D jiffies + 2*HZ;
+ hci_cmd_timer.expires =3D jiffies + max_time*HZ;
add_timer(&hci_cmd_timer);
#endif
}
@@ -3938,7 +3946,7 @@
#endif
=20
s32=20
-send_cmd_block(u8 *cmd, u8 len)
+send_cmd_block(u8 *cmd, u8 len, u8 max_time)
{
u32 tmp;
#ifdef __KERNEL__
@@ -3956,7 +3964,7 @@
#endif
hci_cmd_pending =3D 1;
=20=20=20
- start_cmd_timer();
+ start_cmd_timer(max_time);
=20=09
tmp =3D send_cmd(cmd, len);
=20
|
|
From: Mats F. <ma...@us...> - 2001-07-06 06:56:39
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.163 1.164=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* If acl_num =3D=3D 0, we shouldn't schedule in hci_trig_send
* Added function to check acl_num, needed in bcsp_sequence
The diff of the modified file(s):
--- hci.c 2001/07/05 10:52:45 1.163
+++ hci.c 2001/07/06 06:56:08 1.164
@@ -685,7 +685,7 @@
hci_trig_send(void)
{
#ifdef __KERNEL__
- if (buf_count()) {
+ if (buf_count() && (hci_ctrl.hc_buf.acl_num > 0)) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
queue_task(&send_data_task, &tq_scheduler);
#else
@@ -702,6 +702,12 @@
#endif
}
=20
+s32
+hci_acl_num_cnt(void)
+{
+ return hci_ctrl.hc_buf.acl_num;
+}
+
void
update_ncp(u8 nbr_of_hdl, u8 *pkt)
{
@@ -985,6 +991,7 @@
This must be signalled using lp_connect_cfm (neg)
*/
D_ERR(__FUNCTION__ ": COMMAND_STATUS: %s\n", get_err_msg(buf[0]));
+
#ifdef USE_INQTIMER
if (hci_inq_pending)
release_inq_timer();
@@ -1564,6 +1571,7 @@
break;
}
}
+
=20
/*Parses an ACL-data packet and copies it into the hci_in-buffer, data is =
a=20
pointer to the data in the memory, pb_flag is the packet boundary flag=
=20
|
|
From: Olov H. <ol...@us...> - 2001-07-10 12:51:56
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.164 1.165=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added support for load factor and max number of BT connections
The diff of the modified file(s):
--- hci.c 2001/07/06 06:56:08 1.164
+++ hci.c 2001/07/10 12:51:55 1.165
@@ -333,6 +333,11 @@
static s32 force_msswitch =3D 0;
static s32 i_am_initiator =3D 0;
=20
+/* In order to change load factor, store the other class of device paramet=
ers */
+static u8 class_of_device[3];
+/* If maximum BT connections is not set from above, use 7 as default */
+int bt_max_connections =3D 7;
+
/****************** FUNCTION DEFINITION SECTION **************************=
***/
=20
/*
@@ -816,7 +821,7 @@
D_CMD(__FUNCTION__ ": CONNECTION_COMPLETE: %s\n",
get_err_msg(buf[0]));
=20
- hci_ctrl.nbr_of_connections++;
+
=20
link_type =3D buf[9];
hci_hdl =3D CHAR2INT12(buf[2], buf[1]);
@@ -830,7 +835,7 @@
/* remove hci handle if connection failed */
DSYS(__FUNCTION__ ": CONNECTION_COMPLETE %s\n",
get_err_msg(buf[0]));
- hci_ctrl.nbr_of_connections--;
+
reset_hci_con_bd(hci_hdl);
} else {
DSYS(__FUNCTION__ ": ACL link is up\n");
@@ -856,7 +861,8 @@
}
/* reset variable again */
i_am_initiator =3D 0;
-=09=09=09=09=09=09
+ hci_ctrl.nbr_of_connections++;
+ hci_update_load_factor();
}
#endif /* HCI_EMULATION */
=20
@@ -865,6 +871,8 @@
wake_up_interruptible(&test_wq);
}
} else {
+ hci_ctrl.nbr_of_connections++;
+ hci_update_load_factor();
tcs_add_sco_link(buf[0], hci_hdl);
}
=20=09=09
@@ -889,7 +897,7 @@
connections we can acl_num by reading the buffersizes again,
but this will not work in a multipoint connection. */
hci_ctrl.nbr_of_connections--;
-
+ hci_update_load_factor();
reset_hci_con_bd(CHAR2INT12(buf[2], buf[1]));
=20=09=09
if (hci_ctrl.nbr_of_connections <=3D 0) {
@@ -2660,8 +2668,12 @@
=20
=20
s32
-hci_write_class_of_device(u8 *class_of_device)
+hci_write_class_of_device(u8 *class_of_dev)
{
+ class_of_device[0] =3D class_of_dev[0];
+ class_of_device[1] =3D class_of_dev[1];
+ class_of_device[2] =3D class_of_dev[2];
+
D_CMD(__FUNCTION__ ": Service class 0x%02x, major:0x%01x, minor:0x%01x\n"=
,(class_of_device[2] << 3) | (class_of_device[1] >> 5), (class_of_device[1]=
& 0x1f), (class_of_device[0] >> 2));
=20
D_CMD(__FUNCTION__ ": %01x:%01x:%01x\n", class_of_device[2], class_of_dev=
ice[1], class_of_device[0]);
@@ -2676,6 +2688,55 @@
=20=20=20
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
+
+
+void hci_set_max_connections(u8 max_connections)
+{
+ bt_max_connections =3D (int)max_connections;
+ DSYS("Setting max BT connections to %x\n", bt_max_connections);
+ hci_update_load_factor();
+
+}
+
+
+/* Change the 3-bit load factor (all bits set is max load, all zero is min=
load).
+ * Renew load factor if: Any client is connected, disconnected or if the m=
aximum
+ * amount of simultanious connections is altered.=20
+*/=20
+s32
+hci_update_load_factor()
+{
+ static unsigned char load;
+
+ /* Makes a rough calculation of the current load */=20
+ if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) || (bt_max_co=
nnections =3D=3D 0))
+ load=3D0x07;
+ else if (bt_max_connections >=3D 4)
+ load=3Dhci_ctrl.nbr_of_connections;
+ else
+ load=3Dhci_ctrl.nbr_of_connections*2;
+
+ /* Make sure only bit2 to bit0 are used */
+ load &=3D 0x07;
+
+ D_CMD(__FUNCTION__ ": Load factor changed from %d to %d \n",( (class_of_d=
evice[0] >> 5) & 0x07),load);
+
+ /* Clear bit7 to bit5 for old load factor */
+ class_of_device[0] &=3D 0x1F;
+
+ /* Mask in new load factor value */
+ class_of_device[0] |=3D (load<<5);
+
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(WRITE_CLASS_OF_DEVICE, HCI_HC) ;
+ c_pkt.data[0] =3D class_of_device[0];
+ c_pkt.data[1] =3D class_of_device[1];
+ c_pkt.data[2] =3D class_of_device[2];
+ c_pkt.len =3D 3;
+=20=20
+ return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+}
+
=20
s32
hci_set_event_filter(u8 *data)
|
|
From: Mattias A. <mat...@us...> - 2001-07-18 12:42:31
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.166 1.167=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added 10 ms sleep in hci emulator when running usermode stack
to avoid race problems (due to lack of real wait queues)
The diff of the modified file(s):
--- hci.c 2001/07/17 16:04:10 1.166
+++ hci.c 2001/07/18 12:42:30 1.167
@@ -3541,6 +3541,11 @@
void=20
hci_emulator(u8 *data, u32 len)
{=09
+#ifndef __KERNEL__
+ /* Add a sleep here to avoid race problems when running=20
+ usermode stack (using busy wait 'wait queues') */
+ usleep(10000);
+#endif
if (*data =3D=3D SCO_PKT) {
bt_write_lower_driver(data, len);
hci_ctrl.hc_buf.sco_num++;
|
|
From: Peter K. <pk...@us...> - 2001-07-31 17:05:50
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.167 1.168=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed a couple of compiler warnings.
The diff of the modified file(s):
--- hci.c 2001/07/18 12:42:30 1.167
+++ hci.c 2001/07/31 17:05:49 1.168
@@ -220,6 +220,7 @@
/* Informational Parameters (HCI_IP) */
=20
/* Other functions */
+static s32 hci_update_load_factor(void);
static s32 hci_read_buffer_size(s32 block);=20
static void set_hci_con(u8 *bd, s32 con_hdl);
static void set_hci_con_name(u8 *bd, u8 *name);
@@ -767,6 +768,7 @@
{
u16 hci_hdl;
s32 i;
+
PRINTPKT(__FUNCTION__, buf, len);
=20
switch (event_code) {
@@ -789,7 +791,7 @@
=20
case INQUIRY_RESULT:
{
- s32 i, j;
+ s32 j;
u8 tmp_bd[6];
=20
D_CMD(__FUNCTION__ ": INQUIRY_RESULT\n");
@@ -2704,7 +2706,7 @@
* amount of simultanious connections is altered.=20
*/=20
s32
-hci_update_load_factor()
+hci_update_load_factor(void)
{
static unsigned char load;
=20
|
|
From: Peter K. <pk...@us...> - 2001-07-31 18:36:30
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.168 1.169=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Cosmetic change.
The diff of the modified file(s):
--- hci.c 2001/07/31 17:05:49 1.168
+++ hci.c 2001/07/31 18:36:29 1.169
@@ -2692,18 +2692,18 @@
}
=20
=20
-void hci_set_max_connections(u8 max_connections)
+void
+hci_set_max_connections(u8 max_connections)
{
bt_max_connections =3D (int)max_connections;
- DSYS("Setting max BT connections to %x\n", bt_max_connections);
+ DSYS("Setting max BT connections to %d\n", bt_max_connections);
hci_update_load_factor();
-
}
=20
=20
/* Change the 3-bit load factor (all bits set is max load, all zero is min=
load).
- * Renew load factor if: Any client is connected, disconnected or if the m=
aximum
- * amount of simultanious connections is altered.=20
+ * Renew load factor if: Any client is connected, disconnected or if the
+ * maximum amount of simultanious connections is altered.=20
*/=20
s32
hci_update_load_factor(void)
@@ -2711,7 +2711,8 @@
static unsigned char load;
=20
/* Makes a rough calculation of the current load */=20
- if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) || (bt_max_co=
nnections =3D=3D 0))
+ if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) ||
+ (bt_max_connections =3D=3D 0))
load =3D 0x07;
else if (bt_max_connections >=3D 4)
load =3D hci_ctrl.nbr_of_connections;
|
|
From: Mattias A. <mat...@us...> - 2001-08-01 09:48:38
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.169 1.170=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added read country code
The diff of the modified file(s):
--- hci.c 2001/07/31 18:36:29 1.169
+++ hci.c 2001/08/01 09:48:36 1.170
@@ -841,6 +841,7 @@
reset_hci_con_bd(hci_hdl);
} else {
DSYS(__FUNCTION__ ": ACL link is up\n");
+
#ifdef CONFIG_BLUETOOTH_ERICSSON
change_connection_packet_type(hci_hdl,=20
DM3|DH3|DM5|DH5);
@@ -2121,6 +2122,8 @@
}
}
=20
+
+/* fixme -- does this really need to be non blocking ? */
s32
hci_pin_code_request_reply(u8 *bd, u8 *pin, u8 pin_len)
{
@@ -2957,6 +2960,24 @@
}
#endif
=20
+s32 hci_read_country_code(void)
+{
+ s32 tmp;
+ D_CMD(__FUNCTION__"\n");
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(HCIREADCOUNTRYCODE, HCI_IP);
+ c_pkt.len =3D 0;
+=09
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N,
+ DEFAULT_TIMEOUT);
+
+ if (tmp < 0) {
+ return tmp;
+ } else {
+ return result_param;
+ }
+}
+
/*
* This command will read the value for the BD_ADDR parameter of the local
* unit, returns bd in little endian
@@ -3632,6 +3653,21 @@
=20
case HCI_IP: /* Informational parameters */
switch (hci_get_ocf(cmd->opcode)) {
+=09=09=09
+ case HCIREADCOUNTRYCODE:
+
+ if (r_val[0]) {
+ D_ERR(__FUNCTION__": READ_COUNTRY_CODE : %s\n",=20
+ get_err_msg(r_val[0]));
+ result_param =3D -r_val[0];
+ } else {
+ result_param =3D r_val[1];
+ D_CMD(__FUNCTION__": READ_COUNTRY_CODE : %d\n",=20
+ result_param);
+ }
+ break;
+=09=09=09
+
case READ_BUFFER_SIZE:
D_CMD(__FUNCTION__ ": READ_BUFFER_SIZE->setting buffer size\n");
hci_ctrl.hc_buf.acl_num =3D ACL_NUM;
|
|
From: Mattias A. <mat...@us...> - 2001-08-02 16:07:30
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.170 1.171=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* made disconnect() blocking
The diff of the modified file(s):
--- hci.c 2001/08/01 09:48:36 1.170
+++ hci.c 2001/08/02 16:06:48 1.171
@@ -894,11 +894,17 @@
=20
case DISCONNECTION_COMPLETE:
DSYS(__FUNCTION__ ": DISCONNECTION_COMPLETE %s\n", get_err_msg(buf[3]));
+
+ release_cmd_timer();
+ wake_up_interruptible(&hci_wq);
+
lp_disconnect_ind(CHAR2INT12(buf[2], buf[1]));
+
/* FIXME: No more NBR_OF_COMPLETE_PACKETS will arrive for this
connection handle, if we only support point-to-point
connections we can acl_num by reading the buffersizes again,
but this will not work in a multipoint connection. */
+
hci_ctrl.nbr_of_connections--;
hci_update_load_factor();
reset_hci_con_bd(CHAR2INT12(buf[2], buf[1]));
@@ -1910,6 +1916,11 @@
void=20
hci_shutdown(void)
{
+=20=20
+ /* take down any open acl links */
+
+=09
+
#ifdef USE_NCPTIMER
release_ncp_timer();
#endif
@@ -2028,7 +2039,8 @@
c_pkt.data[2] =3D reason;
c_pkt.len =3D 3;
=20
- return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
,=20
+ DEFAULT_TIMEOUT);
}
=20
/* A positive response to a previous connection request, role =3D 0 sets m=
aster,
|
|
From: Peter K. <pk...@us...> - 2001-08-06 11:03:02
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.171 1.172=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Use READ_COUNTRY_CODE as op-code in hci_read_country_code(),
instead of HCIREADCOUNTRYCODE (which is the name of the ioctl...)
The diff of the modified file(s):
--- hci.c 2001/08/02 16:06:48 1.171
+++ hci.c 2001/08/06 11:03:00 1.172
@@ -2961,8 +2961,7 @@
D_CMD(__FUNCTION__ "\n");
=20=09
c_pkt.type =3D CMD_PKT;
- c_pkt.ocf =3D READ_LOCAL_VERSION_INFORMATION;
- c_pkt.ogf =3D HCI_IP;
+ c_pkt.opcode =3D hci_put_opcode(READ_LOCAL_VERSION_INFORMATION, HCI_IP);
c_pkt.len =3D 0;
=20
if (block)
@@ -2975,19 +2974,17 @@
s32 hci_read_country_code(void)
{
s32 tmp;
+
D_CMD(__FUNCTION__"\n");
+
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(HCIREADCOUNTRYCODE, HCI_IP);
+ c_pkt.opcode =3D hci_put_opcode(READ_COUNTRY_CODE, HCI_IP);
c_pkt.len =3D 0;
=20=09
tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N,
DEFAULT_TIMEOUT);
=20
- if (tmp < 0) {
- return tmp;
- } else {
- return result_param;
- }
+ return tmp < 0 ? tmp : result_param;
}
=20
/*
|
|
From: Peter K. <pk...@us...> - 2001-08-06 15:38:20
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.172 1.173=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Moved the case for READ_COUNTRY_CODE to process_return_param()
(it had accidentally ended up in command_handler() which is
part of the HCI emulation; this is why a diff is a much better
way to send a patch...)
The diff of the modified file(s):
--- hci.c 2001/08/06 11:03:00 1.172
+++ hci.c 2001/08/06 15:38:18 1.173
@@ -1496,6 +1496,19 @@
=20
switch (ocf) {
=20
+ case READ_COUNTRY_CODE:
+ if (r_val[0]) {
+ D_ERR(__FUNCTION__ ": READ_COUNTRY_CODE : %s\n",
+ get_err_msg(r_val[0]));
+ result_param =3D -r_val[0];
+ } else {
+ result_param =3D r_val[1];
+ D_CMD(__FUNCTION__ ": READ_COUNTRY_CODE : %d\n",
+ result_param);
+ }
+ break;
+=09=09=09
+
case READ_LOCAL_VERSION_INFORMATION:
D_CMD(__FUNCTION__ ": READ_LOCAL_VERSION_INFORMATION\n");
if (r_val[0]) {
@@ -3617,7 +3630,6 @@
D_CMD(__FUNCTION__ ": CREATE_CONNECTION->connection request\n");
o_len =3D set_con_req_event(out_event, cmd->data, 1);
bt_write_lower_driver(o_event, o_len);
-=09=09=09
break;
=20=09=09=09
case DISCONNECT:
@@ -3663,20 +3675,6 @@
case HCI_IP: /* Informational parameters */
switch (hci_get_ocf(cmd->opcode)) {
=20=09=09=09
- case HCIREADCOUNTRYCODE:
-
- if (r_val[0]) {
- D_ERR(__FUNCTION__": READ_COUNTRY_CODE : %s\n",=20
- get_err_msg(r_val[0]));
- result_param =3D -r_val[0];
- } else {
- result_param =3D r_val[1];
- D_CMD(__FUNCTION__": READ_COUNTRY_CODE : %d\n",=20
- result_param);
- }
- break;
-=09=09=09
-
case READ_BUFFER_SIZE:
D_CMD(__FUNCTION__ ": READ_BUFFER_SIZE->setting buffer size\n");
hci_ctrl.hc_buf.acl_num =3D ACL_NUM;
|
|
From: Peter K. <pk...@us...> - 2001-08-06 15:52:06
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.173 1.174=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Minor clean-up in command_handler().
The diff of the modified file(s):
--- hci.c 2001/08/06 15:38:18 1.173
+++ hci.c 2001/08/06 15:52:05 1.174
@@ -3612,13 +3612,10 @@
u8 o_event[256];
u32 o_len;
=20
- cmd_pkt *cmd;
- event_struct *out_event;
-
- PRINTPKT(__FUNCTION__, data, data[3] + CMD_HDR_LEN);
+ cmd_pkt *cmd =3D (cmd_pkt *)data;
+ event_struct *out_event =3D (event_struct *)o_event;
=20
- cmd =3D (cmd_pkt*) data; /* Skip the packet type byte */
- out_event =3D (event_struct*) o_event;
+ PRINTPKT(__FUNCTION__, data, cmd->len + CMD_HDR_LEN + HCI_HDR_LEN);
=20
switch (hci_get_ogf(cmd->opcode)) {
=20
|
|
From: Peter K. <pk...@us...> - 2001-09-10 12:10:57
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.176 1.177=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed a typo (simultanious -> simultaneous). The diff of the modified file(s): --- hci.c 2001/09/10 11:19:57 1.176 +++ hci.c 2001/09/10 12:10:56 1.177 @@ -2743,7 +2743,7 @@ =20 /* Change the 3-bit load factor (all bits set is max load, all zero is min= load). * Renew load factor if: Any client is connected, disconnected or if the - * maximum amount of simultanious connections is altered.=20 + * maximum number of simultaneous connections is altered.=20 */=20 s32 hci_update_load_factor(void) |
|
From: Peter K. <pk...@us...> - 2001-09-12 12:18:34
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.178 1.179=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Improved load calculation.
The diff of the modified file(s):
--- hci.c 2001/09/12 12:12:29 1.178
+++ hci.c 2001/09/12 12:18:34 1.179
@@ -2752,14 +2752,11 @@
{
static unsigned char load;
=20
- /* Makes a rough calculation of the current load */=20
- if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) ||
- (bt_max_connections =3D=3D 0))
- load =3D 0x07;
- else if (bt_max_connections >=3D 4)
- load =3D hci_ctrl.nbr_of_connections;
+ /* Calculate the current load */
+ if (!bt_max_connections)
+ load =3D 7;
else
- load =3D hci_ctrl.nbr_of_connections*2;
+ load =3D 7 * hci_ctrl.nbr_of_connections / bt_max_connections;
=20
/* Make sure only bit2 to bit0 are used */
load &=3D 0x07;
|
|
From: Peter K. <pk...@us...> - 2001-09-12 12:42:20
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.179 1.180=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Make sure hci_ctrl.nbr_of_connections is 0 when the stack is shutdown. The diff of the modified file(s): --- hci.c 2001/09/12 12:18:34 1.179 +++ hci.c 2001/09/12 12:42:19 1.180 @@ -1938,7 +1938,7 @@ =20=20=20 /* take down any open acl links */ =20 -=09 + hci_ctrl.nbr_of_connections =3D 0; =20 #ifdef USE_NCPTIMER release_ncp_timer(); |
|
From: Peter K. <pk...@us...> - 2001-10-02 13:40:58
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.182 1.183=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Disable interrupts while update_ncp() is updating the counters.
The diff of the modified file(s):
--- hci.c 2001/10/02 11:00:25 1.182
+++ hci.c 2001/10/02 13:40:56 1.183
@@ -716,7 +716,13 @@
update_ncp(u8 nbr_of_hdl, u8 *pkt)
{
s32 i;
+#ifdef __KERNEL__
+ unsigned long flags;
=20
+ save_flags(flags);
+ cli();
+#endif
+
D_REC(__FUNCTION__ ": acl_num before: %d\n", hci_ctrl.hc_buf.acl_num);
=20=09
/* FIXME */
@@ -744,12 +750,15 @@
queue_task(&send_data_task, &tq_immediate);
mark_bh(IMMEDIATE_BH);
#endif
-
}
+
#ifdef USE_NCPTIMER
hw.acl_num_count +=3D hci_ctrl.hc_buf.acl_num;
#endif
+
bt_feedstack();
+
+ restore_flags(flags);
#else
if (buf_count())
send_acl_data_task();
@@ -1048,11 +1057,9 @@
break;
=20
case NBR_OF_COMPLETED_PACKETS:=20
-
D_CMD(__FUNCTION__ ": NUMBER_OF_COMPLETED_PACKETS\n");
=20
update_ncp(buf[0], buf + 1);
-
break;
=20
case MODE_CHANGE:
|
|
From: Peter K. <pk...@us...> - 2001-10-10 13:16:42
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.185 1.186=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Do not check for DFU mode in user stack.
The diff of the modified file(s):
--- hci.c 2001/10/05 12:25:46 1.185
+++ hci.c 2001/10/10 13:16:41 1.186
@@ -1897,10 +1897,10 @@
#ifdef __KERNEL__
send_data_task.routine =3D (void *)send_acl_data_task;
send_data_task.data =3D NULL;
-#endif
=20
if (bt_dfu_mode(-1))
return 0;
+#endif
=20=20=20=20=20=20=20=20=20
DSYS("Reading buffer sizes in HW module\n");
hci_read_buffer_size(HCI_BLOCK);
|
|
From: Peter K. <pk...@us...> - 2001-10-16 14:58:17
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.186 1.187=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Moved definitions of le16_to_cpuu() and le32_to_cpuu() macros to btcommon.h The diff of the modified file(s): --- hci.c 2001/10/10 13:16:41 1.186 +++ hci.c 2001/10/16 14:57:10 1.187 @@ -85,11 +85,6 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 -/* These two macros are the same as le16_to_cpup() and le32_to_cpup() - only that they work with unaligned addresses */ -#define le16_to_cpuu(addr) (le16_to_cpu(get_unaligned((u16 *)addr))) -#define le32_to_cpuu(addr) (le32_to_cpu(get_unaligned((u32 *)addr))) - #define ACL_LINK 1 #define SCO_LINK 0 =20 |