driver/bluetooth: Add setup of PUBLIC ADDR

Added setup of PUBLIC ADDR

NOTE: By default, the CYW208xx controller sets some
hard-coded static address.

To avoid address duplication, let's always override
the default address by using the HCI command
BT_HCI_VND_OP_SET_LOCAL_DEV_ADDR. So

1. when cyw208xx_setup gets BT_ADDR_ANY from the host,
   it will overwrite the default address, and the host
   will switch to using a random address (set in the hci_init
   function).

2. If user set the static address (by using bt_id_create)
   before bt_enable, cyw208xx_setup will set user defined
   static address.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This commit is contained in:
Nazar Palamar 2024-07-25 13:05:24 +03:00 committed by Alberto Escolar
commit 9a112dc474
2 changed files with 36 additions and 2 deletions

View file

@ -144,6 +144,7 @@ config BT_CYW208XX
bool
default y
depends on DT_HAS_INFINEON_CYW208XX_HCI_ENABLED
select BT_HCI_SET_PUBLIC_ADDR
help
Infineon CYW208XX HCI bluetooth interface