From a21974068fc7b60ffb6cfd7d2782e9719d00ef4b Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 9 Jun 2017 12:51:24 +0200 Subject: [PATCH] nimble/controller: Remove few not needed #ifdefs There is no need for special handling of single iteration loop as compiler should catch this. X-Original-Commit: 9878a220f4f9bd0fda1c4f452425cb3475a0a2d9 --- nimble/controller/include/controller/ble_ll_adv.h | 2 -- nimble/controller/src/ble_ll_adv.c | 13 +------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/nimble/controller/include/controller/ble_ll_adv.h b/nimble/controller/include/controller/ble_ll_adv.h index 635c62ea7..e6994a6bd 100644 --- a/nimble/controller/include/controller/ble_ll_adv.h +++ b/nimble/controller/include/controller/ble_ll_adv.h @@ -127,10 +127,8 @@ int ble_ll_adv_set_adv_params(uint8_t *cmd, uint8_t instance, int is_multi); /* Read advertising channel power */ int ble_ll_adv_read_txpwr(uint8_t *rspbuf, uint8_t *rsplen); -#if MYNEWT_VAL(BLE_MULTI_ADV_SUPPORT) int ble_ll_adv_multi_adv_cmd(uint8_t *cmd, uint8_t cmdlen, uint8_t *rspbuf, uint8_t *rsplen); -#endif /*---- API used by BLE LL ----*/ /* Send the connection complete event */ diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c index 980ca5459..0e91e3f8b 100644 --- a/nimble/controller/src/ble_ll_adv.c +++ b/nimble/controller/src/ble_ll_adv.c @@ -1638,10 +1638,8 @@ ble_ll_adv_event_done(struct os_event *ev) int ble_ll_adv_can_chg_whitelist(void) { - int rc; struct ble_ll_adv_sm *advsm; - -#if MYNEWT_VAL(BLE_MULTI_ADV_SUPPORT) + int rc; int i; rc = 1; @@ -1653,15 +1651,6 @@ ble_ll_adv_can_chg_whitelist(void) break; } } -#else - advsm = &g_ble_ll_adv_sm[0]; - if (advsm->adv_enabled && - (advsm->adv_filter_policy != BLE_HCI_ADV_FILT_NONE)) { - rc = 0; - } else { - rc = 1; - } -#endif return rc; }