Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8729922 authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo Padovan
Browse files

Bluetooth: Add clarifying comment to l2cap_conn_ready()



There is an extra call to smp_conn_security() for outgoing LE
connections from l2cap_conn_ready() but the reason for this call is far
from clear. After a bit of commit history research and using git blame I
found out that this extra call is for socket-less pairing processes
added by commit 160dc6ac. This patch adds a clarifying comment to the
code for this.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 9f22398c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1387,6 +1387,9 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
	if (!hcon->out && hcon->type == LE_LINK)
		l2cap_le_conn_ready(conn);

	/* For outgoing pairing which doesn't necessarily have an
	 * associated socket (e.g. mgmt_pair_device).
	 */
	if (hcon->out && hcon->type == LE_LINK)
		smp_conn_security(hcon, hcon->pending_sec_level);