Skip to content

Commit 7eba8c4

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: controller: Add Kconfig for maximum Broadcast ISO PDU length
Added Kconfig option to configure the maximum Broadcast and Synchronized Receiver ISO PDU length. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent eb78d70 commit 7eba8c4

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

subsys/bluetooth/controller/Kconfig

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,13 @@ config BT_CTLR_ADV_SET
448448
help
449449
Maximum supported advertising sets.
450450

451+
config BT_CTLR_ADV_DATA_LEN_MAX
452+
int "Maximum Advertising Data Length"
453+
range 31 1650
454+
default 251
455+
help
456+
Maximum Extended Advertising Data Length.
457+
451458
config BT_CTLR_ADV_PERIODIC
452459
bool "LE Periodic Advertising in Advertising State" if !BT_LL_SW_SPLIT
453460
depends on BT_BROADCASTER && BT_CTLR_ADV_PERIODIC_SUPPORT
@@ -506,11 +513,22 @@ config BT_CTLR_ADV_ISO_SET
506513
help
507514
Maximum supported advertising sets.
508515

509-
config BT_CTLR_ADV_DATA_LEN_MAX
510-
int "Maximum Advertising Data Length"
511-
range 31 1650
516+
config BT_CTLR_ADV_ISO_PDU_LEN_MAX
517+
int "Maximum Broadcast Isochronous Channel PDU Length"
518+
depends on BT_CTLR_ADV_ISO
519+
range 27 251
520+
default 251
512521
help
513-
Maximum Extended Advertising Data Length.
522+
Maximum Broadcast Isochronous Channel PDU Length.
523+
524+
config BT_CTLR_SYNC_ISO_PDU_LEN_MAX
525+
int "Maximum Synchronized Isochronous Channel PDU Length"
526+
depends on BT_CTLR_SYNC_ISO
527+
range 251 251 if BT_HCI_RAW
528+
range 27 251
529+
default 251
530+
help
531+
Maximum Synchronized Receiver Isochronous Channel PDU Length.
514532

515533
endif # BT_CTLR_ADV_EXT
516534

subsys/bluetooth/controller/include/ll_feat.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,18 @@
154154

155155
#if defined(CONFIG_BT_CTLR_ADV_ISO)
156156
#define LL_FEAT_BIT_ISO_BROADCASTER BIT64(BT_LE_FEAT_BIT_ISO_BROADCASTER)
157+
#define LL_BIS_OCTETS_TX_MAX CONFIG_BT_CTLR_ADV_ISO_PDU_LEN_MAX
157158
#else /* !CONFIG_BT_CTLR_ADV_ISO */
158159
#define LL_FEAT_BIT_ISO_BROADCASTER 0
160+
#define LL_BIS_OCTETS_TX_MAX 0
159161
#endif /* !CONFIG_BT_CTLR_ADV_ISO */
160162

161163
#if defined(CONFIG_BT_CTLR_SYNC_ISO)
162164
#define LL_FEAT_BIT_SYNC_RECEIVER BIT64(BT_LE_FEAT_BIT_SYNC_RECEIVER)
165+
#define LL_BIS_OCTETS_RX_MAX CONFIG_BT_CTLR_SYNC_ISO_PDU_LEN_MAX
163166
#else /* !CONFIG_BT_CTLR_SYNC_ISO */
164167
#define LL_FEAT_BIT_SYNC_RECEIVER 0
168+
#define LL_BIS_OCTETS_RX_MAX 0
165169
#endif /* !CONFIG_BT_CTLR_SYNC_ISO */
166170

167171
/* All defined feature bits */

subsys/bluetooth/controller/ll_sw/pdu.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#define PDU_AC_LL_SIZE_MAX (PDU_AC_LL_HEADER_SIZE + PDU_AC_PAYLOAD_SIZE_MAX)
6464

6565
/* Advertisement channel maximum legacy advertising/scan data size */
66-
#define PDU_AC_DATA_SIZE_MAX 31
66+
#define PDU_AC_DATA_SIZE_MAX 31
6767

6868
/* Advertisement channel Access Address */
6969
#define PDU_AC_ACCESS_ADDR 0x8e89bed6
@@ -78,6 +78,9 @@
7878
/* Link Layer Max size of an empty PDU. TODO: Remove; only used in Nordic LLL */
7979
#define PDU_EM_LL_SIZE_MAX (PDU_DC_LL_HEADER_SIZE)
8080

81+
/* Link Layer header size of BIS PDU. Assumes pdu_bis is packed */
82+
#define PDU_BIS_LL_HEADER_SIZE (offsetof(struct pdu_bis, payload))
83+
8184
/* Event interframe timings */
8285
#define EVENT_IFS_US 150
8386
/* Standard allows 2 us timing uncertainty inside the event */

subsys/bluetooth/controller/ll_sw/ull.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,14 @@ static MFIFO_DEFINE(pdu_rx_free, sizeof(void *), PDU_RX_CNT);
336336
#else
337337
#define PDU_RX_USER_PDU_OCTETS_MAX 0
338338
#endif
339+
339340
#define NODE_RX_HEADER_SIZE (offsetof(struct node_rx_pdu, pdu))
340341
#define NODE_RX_STRUCT_OVERHEAD (NODE_RX_HEADER_SIZE)
341342

342343
#define PDU_ADVERTIZE_SIZE (PDU_AC_LL_SIZE_MAX + PDU_AC_LL_SIZE_EXTRA)
343-
#define PDU_DATA_SIZE (PDU_DC_LL_HEADER_SIZE + LL_LENGTH_OCTETS_RX_MAX)
344+
345+
#define PDU_DATA_SIZE MAX((PDU_DC_LL_HEADER_SIZE + LL_LENGTH_OCTETS_RX_MAX), \
346+
(PDU_BIS_LL_HEADER_SIZE + LL_BIS_OCTETS_RX_MAX))
344347

345348
#define PDU_RX_NODE_POOL_ELEMENT_SIZE \
346349
MROUND( \

0 commit comments

Comments
 (0)