Bluetooth: tester: Support connectable mode for classic

Disable connectable mode for classic if `cp->connectable` is false.

Enable connectable mode for classic if `cp->connectable` is true.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit is contained in:
Lyle Zhu 2025-03-03 19:13:56 +08:00 committed by Benjamin Cabé
commit c667eb5aca

View file

@ -472,6 +472,15 @@ static uint8_t set_connectable(const void *cmd, uint16_t cmd_len,
const struct btp_gap_set_connectable_cmd *cp = cmd;
struct btp_gap_set_connectable_rp *rp = rsp;
if (IS_ENABLED(CONFIG_BT_CLASSIC)) {
int err;
err = bt_br_set_connectable(cp->connectable ? true : false);
if ((err < 0) && (err != -EALREADY)) {
return BTP_STATUS_FAILED;
}
}
if (cp->connectable) {
atomic_set_bit(&current_settings, BTP_GAP_SETTINGS_CONNECTABLE);
} else {