Commit 595177f3 authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann

Bluetooth: Fix LE L2CAP Connect Request handling together with SMP

Unlike BR/EDR, for LE when we're in the BT_CONNECT state we may or may
not have already have sent the Connect Request. This means that we need
some extra tracking of the request. This patch adds an extra channel
flag to prevent the request from being sent a second time.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent aac23bf6
...@@ -695,6 +695,7 @@ enum { ...@@ -695,6 +695,7 @@ enum {
FLAG_EXT_CTRL, FLAG_EXT_CTRL,
FLAG_EFS_ENABLE, FLAG_EFS_ENABLE,
FLAG_DEFER_SETUP, FLAG_DEFER_SETUP,
FLAG_LE_CONN_REQ_SENT,
}; };
enum { enum {
......
...@@ -1223,6 +1223,9 @@ static void l2cap_le_connect(struct l2cap_chan *chan) ...@@ -1223,6 +1223,9 @@ static void l2cap_le_connect(struct l2cap_chan *chan)
struct l2cap_conn *conn = chan->conn; struct l2cap_conn *conn = chan->conn;
struct l2cap_le_conn_req req; struct l2cap_le_conn_req req;
if (test_and_set_bit(FLAG_LE_CONN_REQ_SENT, &chan->flags))
return;
req.psm = chan->psm; req.psm = chan->psm;
req.scid = cpu_to_le16(chan->scid); req.scid = cpu_to_le16(chan->scid);
req.mtu = cpu_to_le16(chan->imtu); req.mtu = cpu_to_le16(chan->imtu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment