From e6882b5b6deb472e9a11f8ba5cda0e6029f676ba Mon Sep 17 00:00:00 2001 From: Hang Fan Date: Sat, 30 Dec 2023 23:30:51 +0800 Subject: [PATCH] porting/examples: fix ble_hci_sock_init assertion Since HCI socket was initialized by `ble_transport_ll_init` in LL side, we should remove `ble_hci_sock_init` from example apps. Signed-off-by: Hang Fan --- porting/examples/linux/main.c | 2 -- porting/examples/linux_blemesh/main.c | 1 - porting/examples/nuttx/main.c | 4 ---- 3 files changed, 7 deletions(-) diff --git a/porting/examples/linux/main.c b/porting/examples/linux/main.c index 25323b9a0f..e81e60872b 100644 --- a/porting/examples/linux/main.c +++ b/porting/examples/linux/main.c @@ -37,7 +37,6 @@ static struct ble_npl_task s_task_hci; void nimble_host_task(void *param); void ble_hci_sock_ack_handler(void *param); -void ble_hci_sock_init(void); void ble_hci_sock_set_device(int dev); void ble_store_ram_init(void); @@ -67,7 +66,6 @@ int main(int argc, char *argv[]) } nimble_port_init(); - ble_hci_sock_init(); /* This example provides GATT Alert service */ ble_svc_gap_init(); diff --git a/porting/examples/linux_blemesh/main.c b/porting/examples/linux_blemesh/main.c index 5a9befdc10..678062f207 100644 --- a/porting/examples/linux_blemesh/main.c +++ b/porting/examples/linux_blemesh/main.c @@ -80,7 +80,6 @@ int main(int argc, char *argv[]) } nimble_port_init(); - ble_hci_sock_init(); ble_svc_gap_init(); ble_svc_gatt_init(); diff --git a/porting/examples/nuttx/main.c b/porting/examples/nuttx/main.c index 7e289be77d..bd731105df 100644 --- a/porting/examples/nuttx/main.c +++ b/porting/examples/nuttx/main.c @@ -43,7 +43,6 @@ static struct ble_npl_task s_task_hci; void nimble_host_task(void *param); void ble_hci_sock_ack_handler(void *param); -void ble_hci_sock_init(void); void ble_hci_sock_set_device(int dev); void ble_store_ram_init(void); @@ -89,9 +88,6 @@ int main(int argc, char *argv[]) printf("port init\n"); nimble_port_init(); - printf("hci init\n"); - ble_hci_sock_init(); - /* This example provides GATT Alert service */ printf("gap init\n"); ble_svc_gap_init();