From 4c8503f4f828fa70d622d81aba7568f43cf28b49 Mon Sep 17 00:00:00 2001 From: Marek Pieta Date: Wed, 6 Nov 2024 15:55:31 +0100 Subject: [PATCH] bluetooth: controller: Return an error if LLPM is not supported Return an error when handling LLPM enable command in case LLPM feature is not supported (e.g. on nRF53 SoC Series). Jira: NCSDK-29545 Signed-off-by: Marek Pieta --- .../releases/release-notes-changelog.rst | 2 +- subsys/bluetooth/controller/hci_internal.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 67bbb14d87c5..7845497c861b 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -109,7 +109,7 @@ Amazon Sidewalk Bluetooth® LE ------------- -|no_changes_yet_note| +* Updated the Bluetooth LE SoftDevice Controller driver to make the :c:func:`hci_vs_sdc_llpm_mode_set` function return an error if Low Latency Packet Mode (LLPM) is not supported or not enabled in the Bluetooth LE Controller driver configuration (:kconfig:option:`CONFIG_BT_CTLR_SDC_LLPM`). Bluetooth Mesh -------------- diff --git a/subsys/bluetooth/controller/hci_internal.c b/subsys/bluetooth/controller/hci_internal.c index 186e99d29656..5daab9a4672a 100644 --- a/subsys/bluetooth/controller/hci_internal.c +++ b/subsys/bluetooth/controller/hci_internal.c @@ -673,7 +673,9 @@ static void vs_supported_commands(sdc_hci_vs_supported_vs_commands_t *cmds) memset(cmds, 0, sizeof(*cmds)); cmds->read_supported_vs_commands = 1; +#if defined(CONFIG_BT_CTLR_SDC_LLPM) cmds->llpm_mode_set = 1; +#endif cmds->conn_update = 1; cmds->conn_event_extend = 1; cmds->qos_conn_event_report_enable = 1; @@ -1682,8 +1684,10 @@ static uint8_t vs_cmd_put(uint8_t const *const cmd, uint8_t *const raw_event_out *param_length_out += sizeof(sdc_hci_cmd_vs_read_supported_vs_commands_return_t); vs_supported_commands((void *)event_out_params); return 0; +#if CONFIG_BT_CTLR_SDC_LLPM case SDC_HCI_OPCODE_CMD_VS_LLPM_MODE_SET: return sdc_hci_cmd_vs_llpm_mode_set((void *)cmd_params); +#endif /* CONFIG_BT_CTLR_SDC_LLPM */ case SDC_HCI_OPCODE_CMD_VS_CONN_UPDATE: return sdc_hci_cmd_vs_conn_update((void *)cmd_params); case SDC_HCI_OPCODE_CMD_VS_CONN_EVENT_EXTEND: