This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4a4ad2647482789788ab456beccca379826eb6e3
Author: zhongzhijie1 <zhongzhij...@xiaomi.com>
AuthorDate: Mon Dec 9 20:55:12 2024 +0800

    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 <zhongzhij...@xiaomi.com>
---
 drivers/wireless/bluetooth/bt_uart.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/wireless/bluetooth/bt_uart.c 
b/drivers/wireless/bluetooth/bt_uart.c
index 310c5bdea0..2e659765ae 100644
--- a/drivers/wireless/bluetooth/bt_uart.c
+++ b/drivers/wireless/bluetooth/bt_uart.c
@@ -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;

Reply via email to