Skip to content

Commit

Permalink
Merge branch 'bugfix/ble_hci_issues_chain_mbuf_v5.0' into 'release/v5.0'
Browse files Browse the repository at this point in the history
fix hci issues when chain mbuf exists

See merge request espressif/esp-idf!25533
  • Loading branch information
Isl2017 committed Aug 29, 2023
2 parents a78ad03 + eb8a741 commit 7065c87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/bt/controller/esp32c2/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
if (*(data) == DATA_TYPE_COMMAND) {
struct ble_hci_cmd *cmd = NULL;
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
assert(cmd);
memcpy((uint8_t *)cmd, data + 1, len - 1);
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
}
Expand Down
2 changes: 1 addition & 1 deletion components/bt/host/bluedroid/hci/hci_hal_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg)
int
ble_hs_rx_data(struct os_mbuf *om, void *arg)
{
uint16_t len = om->om_len + 1;
uint16_t len = OS_MBUF_PKTHDR(om)->omp_len + 1;
uint8_t *data = (uint8_t *)malloc(len);
assert(data != NULL);
data[0] = 0x02;
Expand Down

0 comments on commit 7065c87

Please sign in to comment.