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: Avoid division by 0 with BT_CTLR_THROUGHPUT #64488

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Oct 27, 2023

With very fast HCI interfaces (for ex. in the simulated nrf5340) the tx_rate calculation can do a division by 0
(if two packets are enqueued in the same 32KHz clock period). Let's avoid it.

With very fast HCI interfaces (for ex. in the simulated nrf5340)
the tx_rate calculation can do a division by 0
(if to packets are enqueued in the same 32KHz clock period).
Let's avoid it.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
@aescolar aescolar added Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. area: Bluetooth Controller labels Oct 27, 2023
@aescolar aescolar marked this pull request as ready for review October 27, 2023 10:29
Copy link
Collaborator

@mtpr-ot mtpr-ot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carlescufi carlescufi merged commit 55c59e0 into zephyrproject-rtos:main Oct 30, 2023
27 checks passed
@aescolar aescolar deleted the bt_throughput_fix branch October 30, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Controller area: Bluetooth Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants