diff options
author | pramod kotreshappa <kpramod@codeaurora.org> | 2015-07-10 16:32:54 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-08-18 23:23:55 -0700 |
commit | 7b741ad1e1fd3d6ad3c2e63e4abd06d10e6c0d09 (patch) | |
tree | 9c48bb04b58ca547c12843b28b008208b45abf97 /libbt-vendor | |
parent | 6e544618e5cdf1f2c8d78d1d536757d48dd86b66 (diff) | |
download | android_hardware_qcom_bt-7b741ad1e1fd3d6ad3c2e63e4abd06d10e6c0d09.tar.gz android_hardware_qcom_bt-7b741ad1e1fd3d6ad3c2e63e4abd06d10e6c0d09.tar.bz2 android_hardware_qcom_bt-7b741ad1e1fd3d6ad3c2e63e4abd06d10e6c0d09.zip |
Bluetooth: Fix to avoid hci event getting flushed
Fix to to avoid valid hci event for baudrate change getting
flushed while changing local baudrate. SoC is sending event during
flow off,which is not expected by the host. Host as part of baud
rate changes calls tcflush to flush any persistant data. During
this process valid hci event is getting flushed casuing BT on
failure.
Change-Id: I937ce5e6578a061cfd52560fdbb65876e1e8d0f6
Diffstat (limited to 'libbt-vendor')
-rw-r--r-- | libbt-vendor/src/hci_uart.c | 2 | ||||
-rw-r--r-- | libbt-vendor/src/hw_rome.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libbt-vendor/src/hci_uart.c b/libbt-vendor/src/hci_uart.c index 2fbba95..8c636cf 100644 --- a/libbt-vendor/src/hci_uart.c +++ b/libbt-vendor/src/hci_uart.c @@ -357,7 +357,7 @@ void userial_vendor_set_baud(uint8_t userial_baud) cfsetospeed(&vnd_userial.termios, tcio_baud); cfsetispeed(&vnd_userial.termios, tcio_baud); tcsetattr(vnd_userial.fd, TCSADRAIN, &vnd_userial.termios); /* don't change speed until last write done */ - tcflush(vnd_userial.fd, TCIOFLUSH); +// tcflush(vnd_userial.fd, TCIOFLUSH); } /******************************************************************************* diff --git a/libbt-vendor/src/hw_rome.c b/libbt-vendor/src/hw_rome.c index aa672a5..1464819 100644 --- a/libbt-vendor/src/hw_rome.c +++ b/libbt-vendor/src/hw_rome.c @@ -1440,7 +1440,7 @@ int rome_set_baudrate_req(int fd) /* Total length of the packet to be sent to the Controller */ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + VSC_SET_BAUDRATE_REQ_LEN); - + tcflush(fd,TCIOFLUSH); /* Flow off during baudrate change */ if ((err = userial_vendor_ioctl(USERIAL_OP_FLOW_OFF , &flags)) < 0) { |