From cd8ca2afcfb13e0fb87b6d2514ee456749b72e22 Mon Sep 17 00:00:00 2001 From: YuhengLi Date: Wed, 26 Nov 2025 18:55:24 +0800 Subject: [PATCH] Bluetooth: Classic: HFP: HF: Report call struct pointer when CLCC response. bug: v/78002 Report call struct pointer when CLCC response to allow the upper layer to match the call in the response with the pointer provided in the callback. Signed-off-by: YuhengLi --- include/zephyr/bluetooth/classic/hfp_hf.h | 2 ++ subsys/bluetooth/host/classic/hfp_hf.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/zephyr/bluetooth/classic/hfp_hf.h b/include/zephyr/bluetooth/classic/hfp_hf.h index b93f83e337b..ee2e3bb3ee0 100644 --- a/include/zephyr/bluetooth/classic/hfp_hf.h +++ b/include/zephyr/bluetooth/classic/hfp_hf.h @@ -102,6 +102,8 @@ struct bt_hfp_hf_current_call { const char *number; /** Phone number type format identifier */ uint8_t type; + /** HFP HF call object */ + struct bt_hfp_hf_call *call; }; /** @brief HFP profile application callback */ diff --git a/subsys/bluetooth/host/classic/hfp_hf.c b/subsys/bluetooth/host/classic/hfp_hf.c index 779c2d6444e..28363c4c5de 100644 --- a/subsys/bluetooth/host/classic/hfp_hf.c +++ b/subsys/bluetooth/host/classic/hfp_hf.c @@ -869,6 +869,7 @@ static int clcc_handle(struct at_client *hf_at) current_call.multiparty = mpty > 0 ? true : false; current_call.number = number; current_call.type = (uint8_t)type; + current_call.call = call; bt_hf->query_call(hf, ¤t_call); }