Skip to content

Conversation

@MariuszSkamra
Copy link
Contributor

This fixes race condition in aux scan what was observed on Harmony. During extended scan, the HCI Reset called, that stops the active scan and clears the scan state machine. The scan stop itself, if scan response is pending, and calls ble_ll_scan_aux_sched_remove that pokes the active scan backup (from LL via event queue). The problem is that the SM is cleared already when backoff is called, which causes an assert in ble_ll_scan_req_backoff function.

This change ensures the ble_ll_scan_req_backoff is called from ble_ll_reset() function context. ble_ll_reset is always called from LL task context.

This fixes race condition in aux scan what was observed on Harmony.
During extended scan, the HCI Reset called, that stops the active
scan and clears the scan state machine. The scan stop itself,
if scan response is pending, and calls ble_ll_scan_aux_sched_remove
that pokes the active scan backup (from LL via event queue).
The problem is that the SM is cleared already when backoff is called,
which causes an assert in ble_ll_scan_req_backoff function.

This change ensures the ble_ll_scan_req_backoff is called from
ble_ll_reset() function context. ble_ll_reset is always called
from LL task context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant