zephyr/subsys/bluetooth/controller/ll_sw/ll_adv.h
Carles Cufi a99d1f8fe6 Bluetooth: controller: Fix resolving list error handling
To correctly handle the allocation and deallocation of resolving list
items, the ll_rl_find and wl_pees_find functions have been modified to
return an invalid index instead of a negative value in case of error.
This is to avoid the ambiguity when mixing indices and negative numbers,
which does not play well with the first index 0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-07-10 20:47:51 +02:00

26 lines
593 B
C

/*
* Copyright (c) 2017 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
struct ll_adv_set {
u8_t chan_map:3;
u8_t filter_policy:2;
#if defined(CONFIG_BLUETOOTH_CONTROLLER_PRIVACY)
u8_t own_addr_type:2;
u8_t id_addr_type:1;
u8_t rl_idx;
u8_t id_addr[BDADDR_SIZE];
#endif /* CONFIG_BLUETOOTH_CONTROLLER_PRIVACY */
#if defined(CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT)
u8_t phy_p:3;
u32_t interval;
#else /* !CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT */
u16_t interval;
#endif /* !CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT */
};
struct ll_adv_set *ll_adv_set_get(void);