|
63 | 63 | #include "common/log.h" |
64 | 64 | #include "hal/debug.h" |
65 | 65 |
|
| 66 | +/* When both central and peripheral are supported, one each Rx node will be |
| 67 | + * needed by connectable advertising and the initiator to generate connection |
| 68 | + * complete event, hence conditionally set the count. |
| 69 | + */ |
| 70 | +#if defined(CONFIG_BT_MAX_CONN) |
| 71 | +#if defined(CONFIG_BT_CENTRAL) && defined(CONFIG_BT_PERIPHERAL) |
| 72 | +#define BT_CTLR_MAX_CONNECTABLE 2 |
| 73 | +#else |
| 74 | +#define BT_CTLR_MAX_CONNECTABLE 1 |
| 75 | +#endif |
| 76 | +#define BT_CTLR_MAX_CONN CONFIG_BT_MAX_CONN |
| 77 | +#else |
| 78 | +#define BT_CTLR_MAX_CONNECTABLE 0 |
| 79 | +#define BT_CTLR_MAX_CONN 0 |
| 80 | +#endif |
| 81 | + |
66 | 82 | #if !defined(TICKER_USER_LLL_VENDOR_OPS) |
67 | 83 | #define TICKER_USER_LLL_VENDOR_OPS 0 |
68 | 84 | #endif /* TICKER_USER_LLL_VENDOR_OPS */ |
@@ -246,22 +262,6 @@ static MFIFO_DEFINE(pdu_rx_free, sizeof(void *), PDU_RX_CNT); |
246 | 262 | PDU_RX_USER_PDU_OCTETS_MAX) \ |
247 | 263 | ) |
248 | 264 |
|
249 | | -/* When both central and peripheral are supported, one each Rx node will be |
250 | | - * needed by connectable advertising and the initiator to generate connection |
251 | | - * complete event, hence conditionally set the count. |
252 | | - */ |
253 | | -#if defined(CONFIG_BT_MAX_CONN) |
254 | | -#if defined(CONFIG_BT_CENTRAL) && defined(CONFIG_BT_PERIPHERAL) |
255 | | -#define BT_CTLR_MAX_CONNECTABLE 2 |
256 | | -#else |
257 | | -#define BT_CTLR_MAX_CONNECTABLE 1 |
258 | | -#endif |
259 | | -#define BT_CTLR_MAX_CONN CONFIG_BT_MAX_CONN |
260 | | -#else |
261 | | -#define BT_CTLR_MAX_CONNECTABLE 0 |
262 | | -#define BT_CTLR_MAX_CONN 0 |
263 | | -#endif |
264 | | - |
265 | 265 | #if defined(CONFIG_BT_CTLR_SCAN_SYNC_SET) |
266 | 266 | #define BT_CTLR_SCAN_SYNC_SET CONFIG_BT_CTLR_SCAN_SYNC_SET |
267 | 267 | #else |
|
0 commit comments