-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Bluetooth: controller: split: Port Enc setup to be queueable #16499
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: split: Port Enc setup to be queueable #16499
Conversation
5440e8a to
bd1e8fb
Compare
joerchan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, left a few small comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why -= 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state is maintained as a differential value:
0. Request lock is idle
- Thread acquires a lock on the request, if req == ack then req +=1;
- Thread commits the request, req +=1 or (req-ack) == 2
If ISR occurs between the thread checking for req == ack and req +=1, then in the thead the differential will be (req-ack) == 3, indicating a race condition. In this case, thread will back-off by reverting req -= 1, resulting in a final (req-ack) == 2 (i.e. ISR request supercedes).
On the contrary, if ISR detects that request is acquired it backs-off to retry later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this pause_tx into llcp_enc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed. Will give a try.
Port the fix for the controller implementation to make start encryption queueable if there is any control procedure in progress. Refer to zephyrproject-rtos#15335. Relates to zephyrproject-rtos#15335, zephyrproject-rtos#15186, zephyrproject-rtos#15958 and zephyrproject-rtos#14636. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
bd1e8fb to
24c72ab
Compare
|
We wait for review from @thoh-ot |
thoh-ot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Port the fix for the controller implementation to make start
encryption queueable if there is any control procedure in
progress.
Refer to #15335.
Relates to #15335, #15186, #15958 and #14636.
Signed-off-by: Vinayak Kariappa Chettimada vich@nordicsemi.no