apache / mynewt-nimble

Apache mynewt
https://mynewt.apache.org/
Apache License 2.0
680 stars 392 forks source link

nimble/ll: Fix PHY update instant calculation #1665

Closed sjanc closed 7 months ago

sjanc commented 8 months ago

The instant for PHY update was calculated at the time PDU was enqueued in connsm. This caused new PHY to be always applied at instant regardless if PDU was even dequeued for tx, e.g. in case there encryption procedure pending. This could result in connection being dropped.

Currently we calculate instant when PDU is dequeued to make sure this is the next PDU to be sent and thus instant is valid.