Bluetooth: Add clarifying comment for LE CoC result value
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 1 Sep 2014 06:45:03 +0000 (09:45 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Sep 2014 17:07:55 +0000 (19:07 +0200)
The "pending" L2CAP response value is not defined for LE CoC. This patch
adds a clarifying comment to the code so that the reader will not think
there is a bug in trying to use this value for LE CoC.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c

index 2d9a2b58d2c87be68c75b8a733b973052df1575b..ab405f0e53cbf17b9f992eb377309e0fab31ce58 100644 (file)
@@ -5413,6 +5413,11 @@ static int l2cap_le_connect_req(struct l2cap_conn *conn,
 
        if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
                l2cap_state_change(chan, BT_CONNECT2);
+               /* The following result value is actually not defined
+                * for LE CoC but we use it to let the function know
+                * that it should bail out after doing its cleanup
+                * instead of sending a response.
+                */
                result = L2CAP_CR_PEND;
                chan->ops->defer(chan);
        } else {