Commit graph

10 commits

Author SHA1 Message Date
Aleksander Wasaznik b91728619c Bluetooth: host: remove CONFIG_BT_RECV_BLOCKING
This config selects a variant of the HCI driver interface that spills
out host internals unto the drivers and even the Zephyr controller. It
will now be removed in favor of driver interfaces that hide the
internals of the host.

The new default is `CONFIG_BT_RECV_WORKQ_BT`.

Any references to the removed kconfig are refactored out.

Any out-of-tree driver using the removed interface can be easily adapted
by copying the following implementations into the driver as private
functions:

 - `hci_driver.h:BT_HCI_EVT_FLAG_RECV_PRIO`
 - `hci_driver.h:BT_HCI_EVT_FLAG_RECV`
 - `hci_driver.h:bt_hci_evt_get_flags`
 - `hci_raw.c:bt_recv_prio`

In combination these symbols function as a interface adapter. These
symbols will be removed in this PR in subsequent commits.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-26 11:17:29 -05:00
Benedikt Schmidt 9247f0e07b drivers: bluetooth: fix thread function signatures
Fix thread function signatures to avoid a stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Markus Fuchs ba57c1880c drivers: bluetooth: slz_hci: Set Number of Completed Packets threshold
Configure the Number of Completed Packets event threshold to 1, so the
SiLabs Bluetooth controller will always send the Number of Completed
Packets HCI event to the host, even for small numbers of transmitted
packets.

Fixes #62279

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-09-12 11:23:14 +02:00
Markus Fuchs c33492655f drivers: bluetooth: slz_hci: Adapt to library BLOBs version 4.2.4
Make HCI driver compatible to the updated versions of the
EFR32 Bluetooth library BLOBs consisting of:
* libbluetooth_controller
* libbgcommon
* librail

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-09-12 11:23:14 +02:00
Markus Fuchs fbe6ac852f drivers: bluetooth: slz_hci: Fix incoming HCI packet handling
Currently, HCI packet handling does not consider the BT_RECV_CONTEXT
choice selection. It calls bt_recv() and bt_recv_prio() only depending
on the HCI packet type and event flags.
However, for selections other than BT_RECV_BLOCKING, the "HCI driver
shall not call bt_recv_prio()". Fix that by only calling bt_recv_prio()
when CONFIG_BT_RECV_BLOCKING is enabled.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-07-25 14:41:13 +02:00
Filip Kokosinski 93b7e492bf drivers/bluetooth/hci/slz_hci: bump blobs to version 4.1
This commits adapts the driver to the newer version of the EFR32 BT
blobs:
* libbluetooth_controller
* libbgcommon
* librail

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-26 05:54:40 -04:00
Roman Dobrodii defb159ab1 soc/arm/silabs: support BLE with PM in Series 2 SoCs
Using EM2 or deeper sleep states (where HF clocks are off) requires
special care if BLE radio is used, since BLE radio relies on that clock,
and its power/clock requirements need to be taken into account
On SiLabs, radio PM is implemented as part of RAIL blob, which relies
on sl_power_manager HAL service. I've implemented SoC PM
state changes using sl_power_manager instead of emlib, and added
call to RAIL PM initialization in Gecko HCI driver.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-05-24 13:31:44 -04:00
Filip Kokosinski a4902b1c35 boards/arm/efr32xg24_dk2601b: add BLE support
This commit adds BLE support to the `efr32xg24_dk2601b` board. It also
modifies the SiLabs BT HCI driver to accomodate the EFR32xG24 SoC
series.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-15 13:09:34 +02:00
Filip Kokosinski 0355e085c4 drivers/bluetooth/hci/slz_hci: remove unused const struct device
This commit removes the unused argument form the `slz_bt_init` function,
and makes it consistent with what `SYS_INIT` expects - `int (*)(void)`.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-21 12:55:56 +02:00
Filip Kokosinski 4a614de289 drivers/bluetooth/hci: add SiLabs BLE HCI driver
This commit adds the SiLabs Bluetooth HCI driver. It also enables this
BLE HCI driver on the efr32bg_sltb010a board.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-20 16:13:14 +02:00