drivers/bluetooth/hci: stm32wb: Move RX thread creation to open

In order to enable RX thread abortion on close, move creation
to from init to open.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2022-02-02 11:37:23 +01:00 committed by Anas Nashif
commit 49b15c8306

View file

@ -530,6 +530,13 @@ static int bt_ipm_open(void)
{
int err;
/* Start RX thread */
k_thread_create(&ipm_rx_thread_data, ipm_rx_stack,
K_KERNEL_STACK_SIZEOF(ipm_rx_stack),
(k_thread_entry_t)bt_ipm_rx_thread, NULL, NULL, NULL,
K_PRIO_COOP(CONFIG_BT_DRIVER_RX_HIGH_PRIO),
0, K_NO_WAIT);
err = bt_ipm_ble_init();
if (err) {
return err;
@ -556,13 +563,6 @@ static int _bt_ipm_init(const struct device *unused)
start_ble_rf();
/* Start RX thread */
k_thread_create(&ipm_rx_thread_data, ipm_rx_stack,
K_KERNEL_STACK_SIZEOF(ipm_rx_stack),
(k_thread_entry_t)bt_ipm_rx_thread, NULL, NULL, NULL,
K_PRIO_COOP(CONFIG_BT_DRIVER_RX_HIGH_PRIO),
0, K_NO_WAIT);
/* Take BLE out of reset */
ipcc_reset();