From a682fe63ebaba88448456e50d4508e9d5b4e721f Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Mon, 4 May 2020 12:56:50 +0530 Subject: [PATCH] Bluetooth: controller: added Kconfig for max adv data length Added a Kconfig for maximum advertising data length. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/Kconfig | 9 ++++++++- subsys/bluetooth/controller/ll_sw/ull_adv_aux.c | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/subsys/bluetooth/controller/Kconfig b/subsys/bluetooth/controller/Kconfig index 7ef7397aa80..de86592a9cb 100644 --- a/subsys/bluetooth/controller/Kconfig +++ b/subsys/bluetooth/controller/Kconfig @@ -486,9 +486,16 @@ config BT_CTLR_ADV_SYNC_SET help Maximum supported periodic advertising sets. +config BT_CTLR_ADV_DATA_LEN_MAX + int "Maximum Advertising Data Length" + depends on BT_CTLR_ADV_EXT + range 31 1650 + help + Maximum Extended Advertising Data Length. + config BT_CTLR_SCAN_AUX_SET int "Auxiliary Channel Scan Sets" - depends on BT_CTLR_ADV_EXT + depends on BT_OBSERVER && BT_CTLR_ADV_EXT range 1 64 help Maximum supported auxiliary channel scan sets. diff --git a/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c b/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c index 51ec9bd56da..1c1dcccb5c8 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c +++ b/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c @@ -494,8 +494,7 @@ uint8_t ll_adv_aux_sr_data_set(uint8_t handle, uint8_t op, uint8_t frag_pref, ui uint16_t ll_adv_aux_max_data_length_get(void) { - /* TODO: return a Kconfig value */ - return 0; + return CONFIG_BT_CTLR_ADV_DATA_LEN_MAX; } #endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */