mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Bluetooth: Use L2CAP resume callback to call smp_distribute_keys
There's no need to export the smp_distribute_keys() function since the resume callback is called in the same scenario. This patch makes the smp_notify_keys function private (at the same time moving it higher up in smp.c to avoid forward declarations) and adds a resume callback for SMP to call it from there instead. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
89d2975fa0
commit
44f1a7ab51
3 changed files with 196 additions and 191 deletions
|
@ -7281,12 +7281,6 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
|
|||
|
||||
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
|
||||
|
||||
if (hcon->type == LE_LINK) {
|
||||
if (!status && encrypt)
|
||||
smp_distribute_keys(conn);
|
||||
cancel_delayed_work(&conn->security_timer);
|
||||
}
|
||||
|
||||
mutex_lock(&conn->chan_lock);
|
||||
|
||||
list_for_each_entry(chan, &conn->chan_l, list) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue