Skip to content

Commit 2ac116e

Browse files
lylezhu2012kartben
authored andcommitted
Bluetooth: SMP_BR: Derive LTK after LK refreshed
When the link key of BR is upgraded, the encrypt key refresh event will be notified. The link key is upgraded from weak to strong. The LTK of LE should be derived from strong link key. Start SMP pairing procedure to try to derive LTK from LK. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
1 parent d3997c6 commit 2ac116e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

subsys/bluetooth/host/hci_core.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,17 @@ static void hci_encrypt_key_refresh_complete(struct net_buf *buf)
22722272
bt_conn_unref(conn);
22732273
return;
22742274
}
2275+
2276+
if (IS_ENABLED(CONFIG_BT_SMP)) {
2277+
/*
2278+
* Start SMP over BR/EDR if we are pairing and are
2279+
* central on the link
2280+
*/
2281+
if (atomic_test_bit(conn->flags, BT_CONN_BR_PAIRED) &&
2282+
conn->role == BT_CONN_ROLE_CENTRAL) {
2283+
bt_smp_br_send_pairing_req(conn);
2284+
}
2285+
}
22752286
}
22762287
#endif /* CONFIG_BT_CLASSIC */
22772288

0 commit comments

Comments
 (0)