Skip to content

Commit 9cf6839

Browse files
rugeGerritsenaescolar
authored andcommitted
Bluetooth: Host: Allow conn create timeout longer than RPA timeout
#72674 fixed a bug where this configuration did not work. Now that this configuration is tested, we should mark it as supported. The timeout check that was present in the code before was useless and was not working because the check was run before a default timeout of 0 was converted to a timeout. Signed-off-by: Rubin Gerritsen <[email protected]>
1 parent b30d2d1 commit 9cf6839

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

subsys/bluetooth/host/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ config BT_MAX_PAIRED
688688
config BT_CREATE_CONN_TIMEOUT
689689
int "Timeout for pending LE Create Connection command in seconds"
690690
default 3
691-
range 1 BT_RPA_TIMEOUT if BT_PRIVACY && (BT_RPA_TIMEOUT < 655)
692691
range 1 655
693692

694693
config BT_CONN_PARAM_UPDATE_TIMEOUT

subsys/bluetooth/host/conn.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3034,20 +3034,6 @@ static void bt_conn_set_param_le(struct bt_conn *conn,
30343034
conn->le.timeout = param->timeout;
30353035
}
30363036

3037-
static bool create_param_validate(const struct bt_conn_le_create_param *param)
3038-
{
3039-
#if defined(CONFIG_BT_PRIVACY)
3040-
/* Initiation timeout cannot be greater than the RPA timeout */
3041-
const uint32_t timeout_max = (MSEC_PER_SEC / 10) * bt_dev.rpa_timeout;
3042-
3043-
if (param->timeout > timeout_max) {
3044-
return false;
3045-
}
3046-
#endif
3047-
3048-
return true;
3049-
}
3050-
30513037
static void create_param_setup(const struct bt_conn_le_create_param *param)
30523038
{
30533039
bt_dev.create_param = *param;
@@ -3229,10 +3215,6 @@ int bt_conn_le_create(const bt_addr_le_t *peer, const struct bt_conn_le_create_p
32293215
return err;
32303216
}
32313217

3232-
if (!create_param_validate(create_param)) {
3233-
return -EINVAL;
3234-
}
3235-
32363218
conn = conn_le_create_helper(peer, conn_param);
32373219
if (!conn) {
32383220
return -ENOMEM;

0 commit comments

Comments
 (0)