diff --git a/apps/bttester/src/btp_gap.c b/apps/bttester/src/btp_gap.c index e0d43a4348..8056eaf13d 100644 --- a/apps/bttester/src/btp_gap.c +++ b/apps/bttester/src/btp_gap.c @@ -488,19 +488,19 @@ start_advertising(const void *cmd, uint16_t cmd_len, switch (addr_type) { case 0x00: break; -#if defined(CONFIG_BT_PRIVACY) +#if MYNEWT_VAL(BTTESTER_PRIVACY_MODE) case 0x01: - /* RPA usage is is controlled via privacy settings */ - if (!atomic_test_bit(¤t_settings, BTP_GAP_SETTINGS_PRIVACY)) { - return BTP_STATUS_FAILED; - } - break; - case 0x02: - /* NRPA is used only for non-connectable advertising */ - if (atomic_test_bit(¤t_settings, BTP_GAP_SETTINGS_CONNECTABLE)) { - return BTP_STATUS_FAILED; - } - break; + /* RPA usage is is controlled via privacy settings */ + if (!(current_settings & BIT(BTP_GAP_SETTINGS_PRIVACY))) { + return BTP_STATUS_FAILED; + } + break; + case 0x02: + /* NRPA is used only for non-connectable advertising */ + if (!(current_settings & BIT(BTP_GAP_SETTINGS_CONNECTABLE))) { + return BTP_STATUS_FAILED; + } + break; #endif default: return BTP_STATUS_FAILED;