diff --git a/drivers/bluetooth/hci/hci_stm32wba.c b/drivers/bluetooth/hci/hci_stm32wba.c index 4c18f878b601e..3591eeb4b6fa4 100644 --- a/drivers/bluetooth/hci/hci_stm32wba.c +++ b/drivers/bluetooth/hci/hci_stm32wba.c @@ -47,8 +47,9 @@ static K_SEM_DEFINE(hci_sem, 1, 1); CFG_BLE_NUM_LINK) \ + CFG_BLE_MBLOCK_COUNT_MARGIN) -#define BLE_DYN_ALLOC_SIZE \ - (BLE_TOTAL_BUFFER_SIZE(CFG_BLE_NUM_LINK, MBLOCK_COUNT)) +#define BLE_DYN_ALLOC_SIZE (BLE_TOTAL_BUFFER_SIZE(CFG_BLE_NUM_LINK, \ + MBLOCK_COUNT, \ + (CFG_BLE_EATT_BEARER_PER_LINK * CFG_BLE_NUM_LINK))) /* GATT buffer size (in bytes)*/ #define BLE_GATT_BUF_SIZE \ @@ -376,7 +377,7 @@ uint8_t BLECB_Indication(const uint8_t *data, uint16_t length, k_sem_take(&hci_sem, K_FOREVER); - err = receive_data(dev, data, (size_t)length - 1, + err = receive_data(dev, data, (size_t)length, ext_data, (size_t)ext_length); k_sem_give(&hci_sem); diff --git a/drivers/ieee802154/ieee802154_stm32wba.c b/drivers/ieee802154/ieee802154_stm32wba.c index a796fcc5c2278..568495a30335b 100644 --- a/drivers/ieee802154/ieee802154_stm32wba.c +++ b/drivers/ieee802154/ieee802154_stm32wba.c @@ -650,11 +650,19 @@ static int stm32wba_802154_driver_init(const struct device *dev) k_fifo_init(&stm32wba_802154_data.rx_fifo); k_sem_init(&stm32wba_802154_data.tx_wait, 0, 1); k_sem_init(&stm32wba_802154_data.cca_wait, 0, 1); - +#if defined(CONFIG_NET_L2_OPENTHREAD) + stm32wba_802154_ral_set_config_lib_params(1, 0); +#else + stm32wba_802154_ral_set_config_lib_params(0, 1); +#endif stm32wba_802154_ral_init(); stm32wba_802154_ral_promiscuous_set(false); - +#if !defined(CONFIG_NET_L2_CUSTOM_IEEE802154_STM32WBA) && !defined(CONFIG_NET_L2_OPENTHREAD) stm32wba_802154_data.rx_on_when_idle = true; +#else + stm32wba_802154_data.rx_on_when_idle = false; +#endif + stm32wba_802154_ral_set_continuous_reception(stm32wba_802154_data.rx_on_when_idle); k_thread_create(&stm32wba_802154_data.rx_thread, stm32wba_802154_data.rx_stack, CONFIG_IEEE802154_STM32WBA_RX_STACK_SIZE, @@ -851,6 +859,11 @@ static int stm32wba_802154_configure(const struct device *dev, stm32wba_802154_data.event_handler = config->event_handler; break; + case IEEE802154_CONFIG_RX_ON_WHEN_IDLE: + stm32wba_802154_data.rx_on_when_idle = config->rx_on_when_idle; + stm32wba_802154_ral_set_continuous_reception(config->rx_on_when_idle); + break; + default: #if defined(CONFIG_NET_L2_CUSTOM_IEEE802154) ret = stm32wba_802154_configure_extended( diff --git a/west.yml b/west.yml index 622c0183aa8be..1a2ba71dda405 100644 --- a/west.yml +++ b/west.yml @@ -250,7 +250,7 @@ manifest: groups: - hal - name: hal_stm32 - revision: b6f03b6efd92da4564b38df8cb54d7dad5f37163 + revision: pull/315/head path: modules/hal/stm32 groups: - hal