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

nimble/ll: Fix handling HCI ACL data #1983

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andrzej-kaczmarek
Copy link
Contributor

This fixes handling of HCI ACL data in two scenarios:

  • receiving zero payload HCI ACL data as a start packet
  • sending nocp event with ncp=0 when no HCI data packets are enqueued

For whatever reason HCI ACL packets with empty payload are allowed, but
at the same time we are not allowed to send and empty fragment with
LLID=0b00 over the air. We need to wait for the 1st non-empty payload
and "recombine" it with the empty payload(s) to form a proper payload
with LLID=0b00.

We don't really need to recombine payloads, instead we can just count
and then discard initial empty payloads and the update non-empty payload
accordingly.

See Core 6.0, Vol 6, Part B, 2.4.1.
We can (and shall) keep sending nocp event with ncp=0 periodically but
*only* if we have HCI data packets enqueued. Currently we check if txq
is empty but that doesn't take into account that the only queued PDUs
may be LL Control.

This adds extra counter to track number of data PDUs queued in conn.
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