Bluetooth: Controller: Fix deinitialization of the LFCLK
This fixes a bug where the stack may get stuck in the
POWER_CLOCK ISR after enabling and disabling the Bluetooth
stack a couple of times. It happens after calling
`onoff_request()` after a failing call to `onoff_release()`.
Then the `lf_cli`s next points to itself, generating a
circular list of clients.
Calling `onoff_release()` may fail if there is an outstanding
request. By calling `onoff_cancel()` we enter a state where
we can safely remove the client.
This was not seen earlier because the return value
from `ll_deinit()` in `hci_driver_close()` was ignored.
Signed-off-by:
Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Loading
Please sign in to comment