|
From: Mattias A. <mat...@us...> - 2001-06-06 15:05:40
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Moved reset of hw closer to init_stack
* Check twice as often for new rfcomm cons (select timer 0,5 sec)
The diff of the modified file(s):
--- btd.c 2001/05/31 12:18:38 1.17
+++ btd.c 2001/06/06 15:05:40 1.18
@@ -181,7 +181,6 @@
static int phys_fd =3D -1; /* physical device e.g ttyS0 */
static sigjmp_buf jmpbuffer; /* used to jump back in program after doing r=
eset */
=20
-
/* long option list */
static struct option long_options[] =3D
{
@@ -275,10 +274,6 @@
=20=20=20
init();
=20
- /* Hardreset of BT hardware */
- if (do_reset)
- reset_hw();
-=20=20
if ((phys_fd =3D open(physdev, O_RDWR | O_NOCTTY)) < 0)
{
perror("could not open phys dev\n");
@@ -287,7 +282,8 @@
=20
/* Sets initial HW baudrate */
if (init_hw_speed !=3D 0)
- fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL, hw_vendor() =3D=3D HW_=
CSR_BCSP);
+ fd_setup(phys_fd, init_hw_speed,=20
+ USE_FLOW_CTRL, hw_vendor() =3D=3D HW_CSR_BCSP);
else
init_phys(phys_fd);
=20
@@ -296,6 +292,12 @@
=20=20=20
bt_cfd =3D bt_openctrl();
=20=20=20
+ tcflush(phys_fd, TCIOFLUSH);
+
+ /* Hardreset of BT hardware */
+ if (do_reset)
+ reset_hw();
+
init_stack(bt_cfd, atoi(speedstr));
=20=20=20
if (do_hwinit)
@@ -306,8 +308,8 @@
while (1)
{
int i, waiting_iparsp =3D 0;
- tv.tv_sec =3D 1;
- tv.tv_usec =3D 0;
+ tv.tv_sec =3D 0;
+ tv.tv_usec =3D 500000;
=20
FD_ZERO(&rfd);=20=20
=20
@@ -437,7 +439,6 @@
struct ip_set *ipset =3D PEER(line).ipset;
char local_ip[20];
=20
-=20=20
if (ipa_available)
show_ipset(ipset, line);
=20=20=20
@@ -470,7 +471,6 @@
opts[i++] =3D "useradius";
opts[i++] =3D "auth";
opts[i++] =3D "login";
-=20=20=20=20=20=20
opts[i++] =3D "localbdaddr";
=20
read_local_bd(bt_cfd, local_bd);
@@ -701,7 +701,6 @@
// btd_cleanup();
=20
/* FIXME -- execvp(hw_upgrade_prog) */
-
// siglongjmp(jmpbuffer, 1);
}
else if (sig =3D=3D SIGTERM) /* ? */
|