mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge branch 'bugfix/ble_hci_issues_chain_mbuf_v5.0' into 'release/v5.0'
fix hci issues when chain mbuf exists See merge request espressif/esp-idf!25533
This commit is contained in:
commit
7065c87963
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user