Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth: controller: option to defer unknown VS commands #18112

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions subsys/bluetooth/controller/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ config SYSTEM_WORKQUEUE_STACK_SIZE
int
default 2048 if BT_LL_SOFTDEVICE

config BT_CTLR_SDC_VS_CMD_UNKNOWN_APP_HANDLE
bool "Defer handling of unknown vendor-specific commands to the application"
help
If an unknown vendor-specific command is received, forward it to the application for
handling instead of dropping. The expected function name is `sdc_hci_cmd_vs_app_put`.

config BT_CTLR_SDC_LLPM
bool "Enable Low Latency Packet Mode support"
select BT_CONN_PARAM_ANY if !BT_HCI_RAW
Expand Down
7 changes: 7 additions & 0 deletions subsys/bluetooth/controller/hci_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,9 @@ static uint8_t le_controller_cmd_put(uint8_t const * const cmd,
}
}

uint8_t sdc_hci_cmd_vs_app_put(uint8_t const *const cmd, uint8_t *const raw_event_out,
uint8_t *param_length_out);

#if defined(CONFIG_BT_HCI_VS)
static uint8_t vs_cmd_put(uint8_t const *const cmd, uint8_t *const raw_event_out,
uint8_t *param_length_out)
Expand Down Expand Up @@ -1773,7 +1776,11 @@ static uint8_t vs_cmd_put(uint8_t const *const cmd, uint8_t *const raw_event_out
(sdc_hci_cmd_vs_conn_anchor_point_update_event_report_enable_t const *)cmd_params);
#endif
default:
#if defined(CONFIG_BT_CTLR_SDC_VS_CMD_UNKNOWN_APP_HANDLE)
return sdc_hci_cmd_vs_app_put(cmd, raw_event_out, param_length_out);
#else
return BT_HCI_ERR_UNKNOWN_CMD;
#endif
}
}
#endif /* CONFIG_BT_HCI_VS */
Expand Down
Loading