Support bt H4_ISO packet parsel in bt_uart_shim driver.

In btuart_rxwork, There is no case for parsel HCI data of ISO type, but there are corresponding processes in the SIM and vendor driver code.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
This commit is contained in:
zhongzhijie1
2024-12-09 20:55:12 +08:00
committed by Alan C. Assis
parent d81a28097a
commit 4a4ad26474
+14
View File
@@ -109,6 +109,7 @@ static void btuart_rxwork(FAR void *arg)
{
struct bt_hci_evt_hdr_s evt;
struct bt_hci_acl_hdr_s acl;
struct bt_hci_iso_hdr_s iso;
}
*hdr;
@@ -158,6 +159,19 @@ static void btuart_rxwork(FAR void *arg)
sizeof(struct bt_hci_acl_hdr_s) + hdr->acl.len;
break;
case H4_ISO:
if (upper->rxlen < H4_HEADER_SIZE +
sizeof(struct bt_hci_iso_hdr_s))
{
wlwarn("WARNING: Incomplete HCI ISO header\n");
return;
}
type = BT_ISO_IN;
pktlen = H4_HEADER_SIZE +
sizeof(struct bt_hci_iso_hdr_s) + hdr->iso.len;
break;
default:
wlerr("ERROR: Unknown H4 type %u\n", upper->rxbuf[0]);
return;