From 91f531b14efe2c85823dd4ae872350d644a77bd3 Mon Sep 17 00:00:00 2001 From: luomanruo Date: Thu, 24 Aug 2023 14:42:15 +0800 Subject: [PATCH] ble: Fix hci issues when chain mbuf exists --- components/bt/host/bluedroid/hci/hci_hal_h4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/hci/hci_hal_h4.c b/components/bt/host/bluedroid/hci/hci_hal_h4.c index d7dbe2ef57..7a1377f611 100644 --- a/components/bt/host/bluedroid/hci/hci_hal_h4.c +++ b/components/bt/host/bluedroid/hci/hci_hal_h4.c @@ -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;