Skip to content

Conversation

@e-rk
Copy link
Contributor

@e-rk e-rk commented Jul 21, 2025

Cherry-picked upstream commits fixing assertions in ptp_packet.h and assertion due to packets larger than 128 bytes.

e-rk added 2 commits July 21, 2025 11:22
There was an observed situation where the assert checking frame length
is below 128 bytes was hit. While the nrf-802154 checks that the frame
does not exceed that size, there might exists code paths that allow such
packets to pass through.

The change removes the assert and drops the packet instead.
An error is also printed to allow for further debugging.

Signed-off-by: Rafał Kuźnia <[email protected]>
(cherry picked from commit 5925d71)
The nrf-802154 driver may be unable to acquire a valid timestamp under
rare conditions. In such case, the nrf_802154_received_timestamp_raw
reports time=NRF_802154_NO_TIMESTAMP.
The shim implementation must not calculate the PHR timestamp when
receiving this value, because doing so results in an assert in
ptp_packet.h due to a negative time value.
When the driver is unable to capture the timestamp, the packet is
assigned zero as its timestamp.

Signed-off-by: Rafał Kuźnia <[email protected]>
(cherry picked from commit 3cccfa5)
@dawidprzybylo dawidprzybylo self-requested a review July 21, 2025 09:29
@rlubos rlubos merged commit b3c1b4a into nrfconnect:main Jul 21, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants