From 18d1ca7c78d07630a31ad813db7fe13f9b474623 Mon Sep 17 00:00:00 2001 From: Lyle Zhu Date: Fri, 14 Jun 2024 21:01:49 +0800 Subject: [PATCH] Bluetooth: classic: Fix LE LTK cannot be derived issue In the handler of SMP_Pairing rsp, the encryption key flag is cleared incorrectly. It causes the LE LTK cannot be derived. Do not modify the encryption key flag to fix the issue. Signed-off-by: Lyle Zhu --- subsys/bluetooth/host/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/smp.c b/subsys/bluetooth/host/smp.c index 1971f185f9568a..71ca4138510147 100644 --- a/subsys/bluetooth/host/smp.c +++ b/subsys/bluetooth/host/smp.c @@ -1258,8 +1258,8 @@ static uint8_t smp_br_pairing_rsp(struct bt_smp_br *smp, struct net_buf *buf) smp->local_dist &= rsp->init_key_dist; smp->remote_dist &= rsp->resp_key_dist; - smp->local_dist &= SEND_KEYS_SC; - smp->remote_dist &= RECV_KEYS_SC; + smp->local_dist &= BR_SEND_KEYS_SC; + smp->remote_dist &= BR_RECV_KEYS_SC; /* Peripheral distributes its keys first */