diff options
author | Matthew Xie <mattx@google.com> | 2012-09-28 20:38:46 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-28 20:38:46 -0700 |
commit | ac895da1906fa13905f9039a2af1e4c4ac6dc5a7 (patch) | |
tree | a9f4d05eee82a5154f673142a48c3c1ea82e4af3 | |
parent | da7c9bed22fa8f18e50aa965319fb92131740fca (diff) | |
parent | 187cb9291bb514b4b713717923912a7674c8ca48 (diff) | |
download | external_bluetooth_bluedroid-ac895da1906fa13905f9039a2af1e4c4ac6dc5a7.zip external_bluetooth_bluedroid-ac895da1906fa13905f9039a2af1e4c4ac6dc5a7.tar.gz external_bluetooth_bluedroid-ac895da1906fa13905f9039a2af1e4c4ac6dc5a7.tar.bz2 |
Merge "Fix HCI Timeout issue on Mako" into jb-mr1-dev
-rwxr-xr-x[-rw-r--r--] | hci/src/hci_mct.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hci/src/hci_mct.c b/hci/src/hci_mct.c index e5febc9..4e70063 100644..100755 --- a/hci/src/hci_mct.c +++ b/hci/src/hci_mct.c @@ -666,10 +666,11 @@ void hci_mct_send_msg(HC_BT_HDR *p_msg) } p = ((uint8_t *)(p_msg + 1)) + p_msg->offset; - userial_write(event, (uint8_t *) p, p_msg->len); if (event == MSG_STACK_TO_HC_HCI_CMD) { + uint8_t *p_tmp = p; + utils_lock(); num_hci_cmd_pkts--; utils_unlock(); @@ -678,10 +679,13 @@ void hci_mct_send_msg(HC_BT_HDR *p_msg) * have stored with the opcode of HCI command. * Retrieve the opcode from the Cmd packet. */ - p++; - STREAM_TO_UINT16(lay_spec, p); + p_tmp++; + STREAM_TO_UINT16(lay_spec, p_tmp); } + userial_write(event, (uint8_t *) p, p_msg->len); + + /* generate snoop trace message */ btsnoop_capture(p_msg, FALSE); |