Bluetooth: Mesh: Fix usage of Identity and NRPA adv options for proxy
Both options are kind of mutually exclusive and can't be used together. Also, USE_IDENTITY is used for debug purpose and could be useful when debugging Private Proxy as well. Since CONFIG_BT_MESH_DEBUG_USE_ID_ADDR is not allowed to be used in production, it is fine to use it for Private Proxy advertisements as well. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
ac9c74aa7c
commit
065e7571eb
1 changed files with 4 additions and 3 deletions
|
@ -51,11 +51,12 @@ LOG_MODULE_REGISTER(bt_mesh_gatt);
|
|||
#define ADV_OPT_USE_NAME 0
|
||||
#endif
|
||||
|
||||
#define ADV_OPT_USE_NRPA(private) ((private) ? BT_LE_ADV_OPT_USE_NRPA : 0)
|
||||
#define ADV_OPT_ADDR(private) (IS_ENABLED(CONFIG_BT_MESH_DEBUG_USE_ID_ADDR) ? \
|
||||
BT_LE_ADV_OPT_USE_IDENTITY : (private) ? BT_LE_ADV_OPT_USE_NRPA : 0)
|
||||
|
||||
#define ADV_OPT_PROXY(private) \
|
||||
(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_SCANNABLE | ADV_OPT_USE_NRPA(private) | \
|
||||
BT_LE_ADV_OPT_ONE_TIME | ADV_OPT_USE_IDENTITY | ADV_OPT_USE_NAME)
|
||||
(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_SCANNABLE | ADV_OPT_ADDR(private) | \
|
||||
BT_LE_ADV_OPT_ONE_TIME | ADV_OPT_USE_NAME)
|
||||
|
||||
static void proxy_send_beacons(struct k_work *work);
|
||||
static int proxy_send(struct bt_conn *conn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue