Bluetooth: Mesh: LPN non-low power establishment set state

Sets the LPN state to WAIT_UPDATE when waiting for the initial poll
response when disabling LPN_ESTABLISHMENT. Previously, the LPN node
would stay in the wait offer state even after the offer was processed,
which led to it aborting the friend establishment completely if it
failed to receive the first poll.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit is contained in:
Trond Einar Snekvik 2020-12-10 14:05:55 +01:00 committed by Carles Cufí
commit 2e3de6c5f8

View file

@ -354,6 +354,7 @@ static void req_sent(uint16_t duration, int err, void *user_data)
k_delayed_work_submit(&lpn->timer,
K_MSEC(LPN_RECV_DELAY - SCAN_LATENCY));
} else {
lpn_set_state(BT_MESH_LPN_WAIT_UPDATE);
k_delayed_work_submit(&lpn->timer,
K_MSEC(LPN_RECV_DELAY + duration +
lpn->recv_win));