summaryrefslogtreecommitdiff
path: root/tools/hciattach.h
diff options
context:
space:
mode:
authorYegor Yefremov <yegor_sub1@visionsystems.de>2011-09-05 15:42:12 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2011-09-22 20:19:11 +0900
commit2f440ad7b5e069056c692b3d1bacffb414d015cd (patch)
treec20d80c0f8cf2e4873ea34b0be5f3a7bc45ad2db /tools/hciattach.h
parent85d21c3ea5d57baa7075c0aac3c948eef592eb58 (diff)
downloadbluez-2f440ad7b5e069056c692b3d1bacffb414d015cd.tar.gz
hciattach: fix serial speed setting for wl1271
override speed setting if firmware script issues serial settings command, otherwise the value given in the firmware script will be overridden. Example: hciattach /dev/ttyO1 texas 115200 will fail, because /dev/ttyO1 will be opened with 115200 b/s, then the firmware script will set the buadrate to 3000000 b/s, after UART init hciattach.c will set the baudrate to 115200, so communication is broken. The only correct way is to set both speeds: hciattach -s 115200 /dev/ttyO1 texas 3000000 With this patch only initial speed must be specified. The former semantic will be preserved in case the firmware script doesn't provide serial settings action. Tested with wl1271 and firmware TIInit_7.2.31.bts
Diffstat (limited to 'tools/hciattach.h')
-rw-r--r--tools/hciattach.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hciattach.h b/tools/hciattach.h
index fed0d1146..29fee33d2 100644
--- a/tools/hciattach.h
+++ b/tools/hciattach.h
@@ -45,7 +45,7 @@
int read_hci_event(int fd, unsigned char* buf, int size);
int set_speed(int fd, struct termios *ti, int speed);
-int texas_init(int fd, struct termios *ti);
+int texas_init(int fd, int *speed, struct termios *ti);
int texas_post(int fd, struct termios *ti);
int texasalt_init(int fd, int speed, struct termios *ti);
int stlc2500_init(int fd, bdaddr_t *bdaddr);