aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-04-26 13:57:26 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2013-04-26 13:59:04 +0300
commit1d3cdfb1a8abfe87054400220bb4317551dbae91 (patch)
tree5e1b74eb1a50bae52f813392c723c4e42c240af1
parentb43a5def00998b1571d097669c299c656336da05 (diff)
downloadbluetooth-next-1d3cdfb1a8abfe87054400220bb4317551dbae91.tar.gz
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 160dc6ac1. This patch adds a clarifying comment to the code for this. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--net/bluetooth/l2cap_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 5da195cb2abd2b..e95a0a6cc4676a 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -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);