|
From: Peter K. <pk...@us...> - 2001-08-29 08:51:47
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_vendor.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Only set the speed in the *_init_hw() functions if it is
greater than 0.
The diff of the modified file(s):
--- bt_vendor.c 2001/08/29 08:39:09 1.22
+++ bt_vendor.c 2001/08/29 08:51:47 1.23
@@ -480,6 +480,8 @@
sscanf(buf, " Firmware version: %d", &firmware);
}
=20
+ if (spd > 0)
+ {
/* 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)
@@ -503,6 +505,7 @@
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*/
/* Digianswer specific commands */
@@ -523,6 +526,10 @@
=20
D(syslog(LOG_INFO, "Setting baudrate in Digianswer PC card"));
=20
+ bt_set_event_filter(bt_cfd, filter);
+
+ if (spd > 0)
+ {
bt_set_baudrate(bt_cfd, spd);
=20=20=20
if (spd > 115200)
@@ -530,12 +537,11 @@
printf("WARNING : Does this HW really support speeds > 115200 ?\n");
}
=20=20=20
- bt_set_event_filter(bt_cfd, filter);
-
/* Now set phys device speed to whatever HW was set to use */
fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP);=20=20
tcflush(phys_fd, TCIOFLUSH);
}
+}
=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*/
/* Ericsson specific commands */
@@ -564,6 +570,8 @@
=20
sleep(1); // wait for HW...
=20
+ if (spd > 0)
+ {
D(syslog(LOG_INFO, "Setting baudrate in Ericsson module"));
bt_set_baudrate(bt_cfd, spd);
usleep(10000);
@@ -572,6 +580,7 @@
fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP);
tcflush(phys_fd, TCIOFLUSH);
}
+}
=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*/
/* Infineon specific commands */
@@ -592,12 +601,16 @@
bt_write_scan_enable(bt_cfd, wrscan);
=20
sleep(1); // wait for HW...=20
+
+ if (spd > 0)
+ {
D(syslog(LOG_INFO, "Setting baudrate in Infineon module"));
bt_set_baudrate(bt_cfd, spd);
=20=20=20
/* Now set phys device speed to whatever HW was set to use */
fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP);
tcflush(phys_fd, TCIOFLUSH);
+ }
}
=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*/
|