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:
parent
353580a764
commit
c667eb5aca
1 changed files with 9 additions and 0 deletions
|
@ -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(¤t_settings, BTP_GAP_SETTINGS_CONNECTABLE);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue