|
From: Gordon M. <gm...@us...> - 2001-03-05 23:07:02
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.137 1.138=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
--Modified Ericcson's hci_set_baudrate to return -EINVAL if the baud rate i=
s not supported and 0 otherwise.
--Modified bt_ioctl to pass this return value on to its caller.
The diff of the modified file(s):
--- bluetooth.c 2001/03/05 16:41:44 1.137
+++ bluetooth.c 2001/03/05 23:08:39 1.138
@@ -943,8 +943,7 @@
GET_USER(tmp, (s32*)arg);
BT_DRIVER(FNC"Setting baudrate in host controller to %d\n", tmp);
=20=09=09
- hci_set_baudrate(tmp);
- break;
+ return hci_set_baudrate(tmp);
=20
case HCIWRITEBDADDR:
copy_from_user(&bd_addr, (s32*)arg, size);
--- hci_vendor.c 2001/03/05 15:39:07 1.15
+++ hci_vendor.c 2001/03/05 23:08:39 1.16
@@ -148,7 +148,6 @@
/* Due to the fact that the Ericsson module after P9A sends the reply
on the new baudrate, this function can not block (Since btd sets the
new physical device speed when this function returns). */=20=20
- s32 tmp;
=20=20=20
D_CMD(__FUNCTION__"(%d baud)\n", baudrate);
c_pkt.type =3D CMD_PKT;
@@ -166,20 +165,22 @@
break;
default:
D_ERR(__FUNCTION__": Baudrate not supported\n");
- break;=09
+ return -EINVAL;
}
#ifdef CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+ send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
#else
if (hci_ctrl.hc_buf.cmd_num < 1) {
DSYS(__FUNCTION__": sleeping\n");
interruptible_sleep_on(&set_baudrate_wq);
}
- tmp =3D bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN);
+ bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
=20=20=20
hci_ctrl.hc_buf.cmd_num -=3D 1;=20=20
#endif
- return tmp;
+ /* We don't really know if the card accepted the change, but we did
+ succeed in trying to send it. --gmcnutt */
+ return 0;
}
=20
=20
|