wireless/bluetooth/bt_hcicore.c: allocated recv buffer must reserve BLUETOOTH_H4_HDRLEN for head

This was broken since 6c69b12000.
The first byte in io_data buffer must be the BT H4 packet type.
Without this change an assertion in bt_netdev.c:535 is always raised and nimble host layer crash.
This commit is contained in:
raiden00pl 2021-12-18 13:49:37 +01:00 committed by Xiang Xiao
parent 34c7bec0dc
commit 5ac469441e
1 changed files with 1 additions and 1 deletions

View File

@ -1622,7 +1622,7 @@ int bt_receive(FAR struct bt_driver_s *btdev, enum bt_buf_type_e type,
* queue.
*/
buf = bt_buf_alloc(type, NULL, 0);
buf = bt_buf_alloc(type, NULL, BLUETOOTH_H4_HDRLEN);
if (buf == NULL)
{
return -ENOMEM;