diff --git a/include/zephyr/bluetooth/conn.h b/include/zephyr/bluetooth/conn.h index 2c6320444c6..2fb1676aa49 100644 --- a/include/zephyr/bluetooth/conn.h +++ b/include/zephyr/bluetooth/conn.h @@ -673,11 +673,6 @@ struct bt_conn_le_create_param { * The application must disable explicit scanning before initiating * a new LE connection. * - * When @kconfig{CONFIG_BT_PRIVACY} enabled and @p peer is an identity address - * from a local bond, this API will connect to an advertisement with either: - * - the address being an RPA resolved from the IRK obtained during bonding. - * - the passed identity address, if the local identity is not in Network Privacy Mode. - * * @param[in] peer Remote address. * @param[in] create_param Create connection parameters. * @param[in] conn_param Initial connection parameters. diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index cb163017a7c..d11db5ae87d 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -327,10 +327,8 @@ if BT_SMP config BT_PRIVACY bool "Privacy Feature" help - Enable Privacy Feature support. This makes it possible to generate and use - Resolvable Private Addresses (RPAs). - - Disabling this will remove the capability to resolve private addresses. + Enable local Privacy Feature support. This makes it possible + to use Resolvable Private Addresses (RPAs). config BT_PRIVACY_RANDOMIZE_IR bool "Randomize identity root for fallback identities" diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index a6bcba77df0..a5d13d37724 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -2834,8 +2834,7 @@ int bt_conn_le_create(const bt_addr_le_t *peer, create_param_setup(create_param); #if defined(CONFIG_BT_SMP) - if (IS_ENABLED(CONFIG_BT_PRIVACY) && - (bt_dev.le.rl_entries > bt_dev.le.rl_size)) { + if (bt_dev.le.rl_entries > bt_dev.le.rl_size) { /* Use host-based identity resolving. */ bt_conn_set_state(conn, BT_CONN_CONNECTING_SCAN); diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 07e9d1290b4..d83a6f3be9f 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -583,12 +583,12 @@ int bt_le_create_conn_ext(const struct bt_conn *conn) } else { const bt_addr_le_t *peer_addr = &conn->le.dst; - if (!bt_addr_le_eq(&conn->le.resp_addr, BT_ADDR_LE_ANY)) { +#if defined(CONFIG_BT_SMP) + if (bt_dev.le.rl_entries > bt_dev.le.rl_size) { /* Host resolving is used, use the RPA directly. */ peer_addr = &conn->le.resp_addr; - LOG_DBG("Using resp_addr %s", bt_addr_le_str(peer_addr)); } - +#endif bt_addr_le_copy(&cp->peer_addr, peer_addr); cp->filter_policy = BT_HCI_LE_CREATE_CONN_FP_NO_FILTER; } @@ -656,12 +656,12 @@ static int bt_le_create_conn_legacy(const struct bt_conn *conn) } else { const bt_addr_le_t *peer_addr = &conn->le.dst; - if (!bt_addr_le_eq(&conn->le.resp_addr, BT_ADDR_LE_ANY)) { +#if defined(CONFIG_BT_SMP) + if (bt_dev.le.rl_entries > bt_dev.le.rl_size) { /* Host resolving is used, use the RPA directly. */ peer_addr = &conn->le.resp_addr; - LOG_DBG("Using resp_addr %s", bt_addr_le_str(peer_addr)); } - +#endif bt_addr_le_copy(&cp->peer_addr, peer_addr); cp->filter_policy = BT_HCI_LE_CREATE_CONN_FP_NO_FILTER; }