|
4 | 4 | * SPDX-License-Identifier: Apache-2.0
|
5 | 5 | */
|
6 | 6 |
|
| 7 | +#include <stddef.h> |
| 8 | + |
7 | 9 | #include <soc.h>
|
8 | 10 | #include <zephyr/kernel.h>
|
9 | 11 | #include <zephyr/sys/byteorder.h>
|
10 | 12 | #include <zephyr/bluetooth/hci_types.h>
|
11 | 13 | #include <zephyr/bluetooth/buf.h>
|
| 14 | +#include <zephyr/sys/util_macro.h> |
12 | 15 |
|
13 | 16 | #include "hal/cpu.h"
|
14 | 17 | #include "hal/ccm.h"
|
@@ -233,10 +236,7 @@ uint8_t ll_setup_iso_path(uint16_t handle, uint8_t path_dir, uint8_t path_id,
|
233 | 236 | ARG_UNUSED(controller_delay);
|
234 | 237 | ARG_UNUSED(codec_config);
|
235 | 238 |
|
236 |
| - if (false) { |
237 |
| - |
238 |
| -#if defined(CONFIG_BT_CTLR_CONN_ISO) |
239 |
| - } else if (IS_CIS_HANDLE(handle)) { |
| 239 | + if (IS_ENABLED(CONFIG_BT_CTLR_CONN_ISO) && IS_CIS_HANDLE(handle)) { |
240 | 240 | struct ll_conn_iso_group *cig;
|
241 | 241 | struct ll_conn *conn;
|
242 | 242 |
|
@@ -307,8 +307,6 @@ uint8_t ll_setup_iso_path(uint16_t handle, uint8_t path_dir, uint8_t path_id,
|
307 | 307 | sdu_interval = cig->c_sdu_interval;
|
308 | 308 | }
|
309 | 309 | }
|
310 |
| -#endif /* CONFIG_BT_CTLR_CONN_ISO */ |
311 |
| - |
312 | 310 | #if defined(CONFIG_BT_CTLR_ADV_ISO)
|
313 | 311 | } else if (IS_ADV_ISO_HANDLE(handle)) {
|
314 | 312 | struct ll_adv_iso_set *adv_iso;
|
@@ -450,7 +448,7 @@ uint8_t ll_setup_iso_path(uint16_t handle, uint8_t path_dir, uint8_t path_id,
|
450 | 448 | }
|
451 | 449 |
|
452 | 450 | if (!err) {
|
453 |
| - if (cis) { |
| 451 | + if (IS_ENABLED(CONFIG_BT_CTLR_CONN_ISO) && cis != NULL) { |
454 | 452 | cis->hdr.datapath_out = dp;
|
455 | 453 | }
|
456 | 454 |
|
|
0 commit comments