Skip to content

nimble/ll: Fix handling HCI ACL data#1983

Merged
andrzej-kaczmarek merged 2 commits intoapache:masterfrom
andrzej-kaczmarek:ll-hci-acl-fix
Feb 25, 2025
Merged

nimble/ll: Fix handling HCI ACL data#1983
andrzej-kaczmarek merged 2 commits intoapache:masterfrom
andrzej-kaczmarek:ll-hci-acl-fix

Conversation

@andrzej-kaczmarek
Copy link
Copy Markdown
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.
@andrzej-kaczmarek andrzej-kaczmarek merged commit f1379c7 into apache:master Feb 25, 2025
@andrzej-kaczmarek andrzej-kaczmarek deleted the ll-hci-acl-fix branch February 25, 2025 15:30
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.

2 participants