nimble/iso: Fix missing BLE_ISO_BROADCAST_SOURCE guard
This makes Broadcast ISO source related code dependent on
BLE_ISO_BROADCAST_SOURCE mynewt option.
diff --git a/nimble/host/src/ble_iso.c b/nimble/host/src/ble_iso.c
index 271bd27..90bd613 100644
--- a/nimble/host/src/ble_iso.c
+++ b/nimble/host/src/ble_iso.c
@@ -225,6 +225,7 @@
return 0;
}
+#if MYNEWT_VAL(BLE_ISO_BROADCAST_SOURCE)
int
ble_iso_create_big(const struct ble_iso_create_big_params *create_params,
const struct ble_iso_big_params *big_params)
@@ -298,28 +299,6 @@
return rc;
}
-int
-ble_iso_init(void)
-{
- int rc;
-
- SLIST_INIT(&ble_iso_bigs);
-
- rc = os_mempool_init(&ble_iso_big_pool,
- MYNEWT_VAL(BLE_MAX_BIG),
- sizeof (struct ble_iso_big),
- ble_iso_big_mem, "ble_iso_big_pool");
- SYSINIT_PANIC_ASSERT(rc == 0);
-
- rc = os_mempool_init(&ble_iso_bis_pool,
- MYNEWT_VAL(BLE_MAX_BIS),
- sizeof (struct ble_iso_bis),
- ble_iso_bis_mem, "ble_iso_bis_pool");
- SYSINIT_PANIC_ASSERT(rc == 0);
-
- return 0;
-}
-
void
ble_iso_rx_create_big_complete(const struct ble_hci_ev_le_subev_create_big_complete *ev)
{
@@ -497,6 +476,7 @@
return rc;
}
+#endif /* BLE_ISO_BROADCAST_SOURCE */
#if MYNEWT_VAL(BLE_ISO_BROADCAST_SINK)
static struct ble_iso_conn *
@@ -933,4 +913,26 @@
return rc;
}
+
+int
+ble_iso_init(void)
+{
+ int rc;
+
+ SLIST_INIT(&ble_iso_bigs);
+
+ rc = os_mempool_init(&ble_iso_big_pool,
+ MYNEWT_VAL(BLE_MAX_BIG),
+ sizeof (struct ble_iso_big),
+ ble_iso_big_mem, "ble_iso_big_pool");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&ble_iso_bis_pool,
+ MYNEWT_VAL(BLE_MAX_BIS),
+ sizeof (struct ble_iso_bis),
+ ble_iso_bis_mem, "ble_iso_bis_pool");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ return 0;
+}
#endif /* BLE_ISO */