OSDN Git Service

BT HAL H4 write flow
authorPeng Qi <peng.qi@mediatek.com>
Mon, 19 Jun 2017 10:01:07 +0000 (18:01 +0800)
committerTing Zheng <ting.zheng@mediatek.com>
Fri, 30 Jun 2017 19:32:11 +0000 (12:32 -0700)
commit92afd74a15d15b0ad6eb619a8ad3a864a4f6e71c
tree2955d4b4241a56017f6f64be5caad5eb0e6cdfb4
parent1bbe51d0b5bef615692afe6ccc24259c1b2208e4
BT HAL H4 write flow

If to send type and data separately for one HCI packet,
it will cause two system call context switch to kernel space,
which will introduce software overhead on data path.
Plus, if vendor does not use pure UART interface, it causes different
data behavior on BUS and may not adapt to all vendors as legacy HAL did.
Considering backward-compatibility, to use writev to send
type and data together once as legacy BT HAL did.

Test: H4 UTTest, BT VTS test, Bluetooth on/off
Change-Id: I2d93085fe0c01b48d0e3729a3fa85b5b27335b2c
bluetooth/1.0/default/h4_protocol.cc