diff options
Diffstat (limited to 'hci/src/hci_mct.c')
-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); |