Skip to content
Commit c18477ad authored by Piotr Pryga's avatar Piotr Pryga Committed by Carles Cufí
Browse files

Bluetooth: Controller: llcp: fix wrong cond in prepare instant



In a function pu_prepare_instant there is a condition that
checks if there is actual change of a PHY. That condition
was based on ctx->data.pu.tx and ctx->data.pu.rx.
These members store PHY that is or will be used, hence
the condition is wrong. Even there is no actual change in
the PHY, values could be not equal to zero. In such case
the instant value would be set to wrong value.
What more the condition be an 'or' not an 'and' because
one of the values must be different than zero to have the
PHY change and instant different than zero.

After update of the condition, the function call places
must be changed. The ctx->data.pu.c_to_p_phy and
ctx->data.pu.p_to_c_phy are set in pu_prepare_update_ind
function, hence pu_prepare_instant should be called after
that.

Signed-off-by: default avatarPiotr Pryga <piotr.pryga@nordicsemi.no>
parent da3a6fc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment