drivers: bluetooth: rpmsg: Send reset only when the Host is included
The rpmsg_close() call uses the HCI reset command to reset the controller. But when building as controller-only we do not bring in the infrastructure to send HCI commands (nor should we) and rpmsg_close() will not be called anyway. Fixes #63534. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
ee0314a832
commit
c0a349eac4
1 changed files with 6 additions and 4 deletions
|
@ -339,10 +339,12 @@ static int bt_rpmsg_close(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = bt_hci_cmd_send_sync(BT_HCI_OP_RESET, NULL, NULL);
|
if (IS_ENABLED(CONFIG_BT_HCI_HOST)) {
|
||||||
if (err) {
|
err = bt_hci_cmd_send_sync(BT_HCI_OP_RESET, NULL, NULL);
|
||||||
LOG_ERR("Sending reset command failed with: %d", err);
|
if (err) {
|
||||||
return err;
|
LOG_ERR("Sending reset command failed with: %d", err);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ipc_service_deregister_endpoint(&hci_ept);
|
err = ipc_service_deregister_endpoint(&hci_ept);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue