]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Add clarifying comment to l2cap_conn_ready()
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 29 Apr 2013 16:35:39 +0000 (19:35 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 3 May 2013 19:09:43 +0000 (16:09 -0300)
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 160dc6ac1. This patch adds a clarifying comment to the
code for this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c

index 6992154d1d7b27e059dc3a18eaf9f1bc763cb7a9..936ce23c3a20c7ad2caf71d9c919e327fe5ca5ca 100644 (file)
@@ -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);