|
From: Peter K. <pk...@us...> - 2002-11-15 12:09:03
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.c 1.203 1.204=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Clean up.
The diff of the modified file(s):
--- hci.c 17 Oct 2002 14:29:58 -0000 1.203
+++ hci.c 15 Nov 2002 12:08:54 -0000 1.204
@@ -2,7 +2,7 @@
* hci.c -- Implementation of Bluetooth Host Controller Interface=20
* (UART transport layer)
*
- * Copyright (C) 2000, 2001 Axis Communications AB
+ * Copyright (C) 2000, 2001, 2002 Axis Communications AB
*
* Author: Mats Friden <mat...@ax...>
*
@@ -264,7 +264,6 @@
sizes and connections */
hci_controller hci_ctrl =3D {{0, 0, 0, 0, 0}};
=20=09=09=09=20
-
#ifdef __KERNEL__
#ifdef USE_NCPTIMER
static struct timer_list hci_ncp_timer;
@@ -364,7 +363,6 @@
u8 *buf; /* Temporary pointer to the incoming data */
u32 tmp_data_len;
=20
-=20
PRINTPKT(__FUNCTION__ ": ", data, count);
=20=20=20
tmp_data_len =3D count;
@@ -377,7 +375,6 @@
D_INDATA(__FUNCTION__ ": hci-%d\n", tmp_data_len);
while (count > 0) {
switch (state) {
-=09=09=09
/* The first byte will tell us whether it is an event or a
data packet */
case WAIT_FOR_PACKET_TYPE:
@@ -388,7 +385,6 @@
case ACL_PKT: state =3D WAIT_FOR_ACL_HDR; break;
case SCO_PKT: state =3D WAIT_FOR_SCO_HDR; break;
default:
-=09=09=09=20=20
/* Call vendor specific function if needed */
#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS=09=09=09=20=20
if (hci_receive_data_texas_specific(buf, count) =3D=3D 0) {
@@ -1004,7 +1000,6 @@
#ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER
if (buf[0]) {
D_ERR(__FUNCTION__ ": AUTHENTICATION_COMPLETE: %s\n", get_err_msg(buf[0=
]));
-=09=09=09
}
=20=09=09
sec_man_event(HCI, get_bd(hci_handle(&buf[1])), AUTHENTICATION_COMPLETE,=
buf, 1);
@@ -1023,7 +1018,6 @@
} else {
set_hci_con_name(buf + 1, buf + 7);
}
-=09=09=09
}
/* Store the name in a global variable to send back to userland */
memcpy(name_request_response + 1, buf + 7, BT_NAME_LENGTH);
@@ -1128,7 +1122,6 @@
get_err_msg(buf[0]));
=20=09=09=09
/* fixme -- Notify l2cap that this BD will go down */
-=09=09=09
} else if (buf[7]) {
DSYS(__FUNCTION__ ": Current master is 0x%04x%08x\n",=20
le16_to_cpuu(&buf[5]), le32_to_cpuu(&buf[1]));
@@ -1362,7 +1355,6 @@
}
break;
=20=09=09=09
-=09=09=09
case READ_STORED_LINK_KEY:
DSYS(__FUNCTION__ ": READ_STORED_LINK_KEY\n");
if (r_val[0]) {
@@ -1405,7 +1397,6 @@
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
-=09=09=20=20
printk(__FUNCTION__ ": READ_TRANSMIT_POWER_LEVEL\n");
if (r_val[0]) {
D_ERR(__FUNCTION__ ": READ_TRANSMIT_POWER_LEVEL: %s\n",
@@ -1536,7 +1527,6 @@
=20=09=09=09
break;
=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",
le16_to_cpuu(&buf[3]));
@@ -1630,7 +1620,6 @@
}
break;
=20=09=09=09
-
case READ_LOCAL_VERSION_INFORMATION:
D_CMD(__FUNCTION__ ": READ_LOCAL_VERSION_INFORMATION\n");
if (r_val[0]) {
@@ -1849,8 +1838,6 @@
hci_ctrl.local_bd[1], hci_ctrl.local_bd[0]);
}
=20=09=09=20=20=20=20=20=20=20
-=09=09=20=20=20=20=20=20=20
-
s32 hci_sprint_remote_info(u8 *buf)
{
s32 pos =3D 0;
@@ -2398,8 +2385,6 @@
packet types.
*/
=20
-
-
s32
change_connection_packet_type(u32 hci_hdl, u32 pkt_type)
{
@@ -2487,7 +2472,6 @@
} else {
return hci_set_connection_encryption((u16)tmp, enable);
}
-=09
}
=20
s32
@@ -2562,8 +2546,8 @@
s32 c =3D 0, retval =3D 0;
s32 zero =3D 0;
=20=09=09
- D_CMD(__FUNCTION__ ": for bd address 0x%02x:%02x:%02x:%02x:%02x:%02x\n"
- , bd[5], bd[4], bd[3], bd[2], bd[1], bd[0]);
+ D_CMD(__FUNCTION__ ": for bd address 0x%02x:%02x:%02x:%02x:%02x:%02x\n",
+ bd[5], bd[4], bd[3], bd[2], bd[1], bd[0]);
=20=09
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(REMOTE_NAME_REQUEST, HCI_LC);
@@ -2598,7 +2582,6 @@
}=09
}
=20
-
s32=20
hci_flush(u32 hdl)
{
@@ -2697,7 +2680,6 @@
}=09
}
=20
-
s32
hci_change_local_name(u8 *new_name)
{
@@ -2712,7 +2694,6 @@
return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
}
=20
-
s32
hci_read_scan_enable(void)
{
@@ -3081,7 +3062,6 @@
c_pkt.data[4] =3D ((nbr_of_packets >> 8) & 0xff);
c_pkt.len =3D 5;
=20
-=09
/*FIXME -- Risk for race against sending acl packets ? */
tmp =3D bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN);
return tmp;
@@ -3119,8 +3099,6 @@
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_H=
DR_LEN, DEFAULT_TIMEOUT);
else
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_=
HDR_LEN);
-
-
}
=20
/* Defines of Informational Parameters function */
@@ -3140,9 +3118,8 @@
c_pkt.opcode =3D hci_put_opcode(READ_BUFFER_SIZE, HCI_IP);
c_pkt.len =3D 0;
=20
- if (block) {
+ if (block)
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);
}
@@ -3448,6 +3425,7 @@
c_pkt.len =3D 2;
c_pkt.data[0] =3D co_ac_to & 0xff;
c_pkt.data[1] =3D (co_ac_to >> 8) & 0xff;
+
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
}
=20
@@ -3456,6 +3434,7 @@
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(INQUIRY_CANCEL, HCI_LC);
c_pkt.len =3D 0;
+
return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
}
=20
@@ -3468,7 +3447,9 @@
c_pkt.data[0] =3D (hdl & 0xff);
c_pkt.data[1] =3D ((hdl >> 8) & 0xff);
c_pkt.len =3D 2;
+
tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN, DEFAULT_TIMEOUT*HZ);=20
+
return tmp < 0 ? 2<<16 : result_param_offset|(1<<16);
}
=20
@@ -3481,6 +3462,7 @@
c_pkt.data[0] =3D (hdl & 0xff);
c_pkt.data[1] =3D ((hdl >> 8) & 0xff);
c_pkt.len =3D 2;
+
tmp =3D send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
=20=20=20=20=20=20=20=20=20
return (tmp<0)|(result_param=3D=3D256) ? 2<<8 : result_param|(1<<8=
);
@@ -3512,6 +3494,7 @@
lp_connect_rsp(u8 bd_addr[], u32 cfm)
{=20
D_CMD(__FUNCTION__ ": Status: %d\n", cfm);
+
if (cfm) {
#ifdef CONFIG_BLUETOOTH_EARLY_MSSWITCH
if (force_msswitch) {
@@ -3523,8 +3506,6 @@
#else
return accept_connection_request(bd_addr, MS_SWITCH_REMAIN_SLAVE);
#endif
-
-
} else {
return reject_connection_request(bd_addr, 0x0d);
/* FIXME: 0x0d =3D due to limited resourses store this
@@ -3611,7 +3592,6 @@
break;
}
=20
-=09=09=09
D_QUEUE("<--%d (%d)\n", buf_byte_count(-1),=20
hci_ctrl.hc_buf.acl_num);
=20=09=09
@@ -4221,7 +4201,6 @@
hci_cmd_pending =3D 0;
=20=20
wake_up_interruptible(&hci_wq);
-=20
}
#endif
=20
|