Bluetooth: Audio: Change CSIP notification to use Atomic flags

Reformated csip_set_member to use atomic flags for notifications
instead of a pending notification array. This better conforms the
style of the code to how its done in other LE Audio services.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
This commit is contained in:
Fredrik Danebjer 2023-08-31 10:38:46 +02:00 committed by Carles Cufí
commit 147796b36f
2 changed files with 76 additions and 71 deletions

View file

@ -16,20 +16,6 @@
#define BT_CSIP_RELEASE_VALUE 0x01
#define BT_CSIP_LOCK_VALUE 0x02
struct csip_pending_notifications {
bt_addr_le_t addr;
bool pending;
bool active;
/* Since there's a 1-to-1 connection between bonded devices, and devices in
* the array containing this struct, if the security manager overwrites
* the oldest keys, we also overwrite the oldest entry
*/
#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST)
uint32_t age;
#endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */
};
struct bt_csip_set_sirk {
uint8_t type;
uint8_t value[BT_CSIP_SET_SIRK_SIZE];