From 0ddb2950be265cf67b485ae47c96aeb695eea190 Mon Sep 17 00:00:00 2001 From: Ludvig Jordet Date: Tue, 3 Dec 2024 15:14:22 +0100 Subject: [PATCH] [nrf fromtree] Bluetooth: Mesh: Fix cfg_cli KRP not working for key_net_idx != 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initializes the `net_idx` field of the ack context properly for KRP functions in the Config Client. This fixes a problem where `bt_mesh_cfg_cli_krp_get` and `bt_mesh_cfg_cli_krp_set` would always fail the ack ctx comparison if `key_net_idx` was != 0. Signed-off-by: Ludvig Jordet (cherry picked from commit 88f62a1a5eb5cdf51a9d5a2d847712c9b33f3193) Signed-off-by: HÃ¥vard Reierstad --- subsys/bluetooth/mesh/cfg_cli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subsys/bluetooth/mesh/cfg_cli.c b/subsys/bluetooth/mesh/cfg_cli.c index 9c4301e0b09..20e7ec065b4 100644 --- a/subsys/bluetooth/mesh/cfg_cli.c +++ b/subsys/bluetooth/mesh/cfg_cli.c @@ -1187,6 +1187,7 @@ int bt_mesh_cfg_cli_krp_get(uint16_t net_idx, uint16_t addr, uint16_t key_net_id struct krp_param param = { .status = status, .phase = phase, + .net_idx = key_net_idx, }; const struct bt_mesh_msg_rsp_ctx rsp = { .ack = &cli->ack_ctx, @@ -1209,6 +1210,7 @@ int bt_mesh_cfg_cli_krp_set(uint16_t net_idx, uint16_t addr, uint16_t key_net_id struct krp_param param = { .status = status, .phase = phase, + .net_idx = key_net_idx, }; const struct bt_mesh_msg_rsp_ctx rsp = { .ack = &cli->ack_ctx,