|
From: Peter K. <pk...@us...> - 2001-06-19 11:21:00
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_vendor.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Only try to set the speed if the CSR firmware is new enough
(temporarily setting the speed does not work correctly in 9.x).
The diff of the modified file(s):
--- bt_vendor.c 2001/06/13 12:34:55 1.20
+++ bt_vendor.c 2001/06/19 11:20:59 1.21
@@ -456,6 +456,8 @@
/* Connection setup, all devices, no auto accept */
unsigned char filter[3] =3D { 0x02, 0x00, 0x01 };
unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+ int firmware =3D -1;
+ char* buf;
=20=20=20
if ((hw_vendor() =3D=3D HW_CSR_BCSP) && (csr_disable_deep_sleep(bt_cfd)))
kill(getpid(), SIGUSR1); /* Restart btd (and HW) to activate change=
s */
@@ -473,6 +475,15 @@
=20
sleep(1);=20=20
=20
+ if ((buf =3D bt_firmware_info()))
+ {
+ sscanf(buf, " Firmware version: %d", &firmware);
+ }
+
+ /* Only try to set the speed if the CSR firmware is new enough
+ (temporarily setting the speed does not work correctly in 9.x) */
+ if (firmware >=3D 90)
+ {
D(syslog(LOG_INFO, "Setting baudrate in CSR module [%d baud]", spd));
=20
bt_set_baudrate(bt_cfd, spd);
@@ -486,6 +497,11 @@
tcflush(phys_fd, TCIOFLUSH);
=20
D(syslog(LOG_INFO, "Baudrate set"));
+ }
+ else
+ {
+ syslog(LOG_INFO, "Did not set baudrate in CSR module as its firmware i=
s too old (%d)", firmware);
+ }
}
=20
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
|