diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index daa149b7003c..4ea1710a4783 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1199,14 +1199,15 @@ clean: | |||
1199 | static void l2cap_conn_ready(struct l2cap_conn *conn) | 1199 | static void l2cap_conn_ready(struct l2cap_conn *conn) |
1200 | { | 1200 | { |
1201 | struct l2cap_chan *chan; | 1201 | struct l2cap_chan *chan; |
1202 | struct hci_conn *hcon = conn->hcon; | ||
1202 | 1203 | ||
1203 | BT_DBG("conn %p", conn); | 1204 | BT_DBG("conn %p", conn); |
1204 | 1205 | ||
1205 | if (!conn->hcon->out && conn->hcon->type == LE_LINK) | 1206 | if (!hcon->out && hcon->type == LE_LINK) |
1206 | l2cap_le_conn_ready(conn); | 1207 | l2cap_le_conn_ready(conn); |
1207 | 1208 | ||
1208 | if (conn->hcon->out && conn->hcon->type == LE_LINK) | 1209 | if (hcon->out && hcon->type == LE_LINK) |
1209 | smp_conn_security(conn, conn->hcon->pending_sec_level); | 1210 | smp_conn_security(hcon, hcon->pending_sec_level); |
1210 | 1211 | ||
1211 | mutex_lock(&conn->chan_lock); | 1212 | mutex_lock(&conn->chan_lock); |
1212 | 1213 | ||
@@ -1219,8 +1220,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) | |||
1219 | continue; | 1220 | continue; |
1220 | } | 1221 | } |
1221 | 1222 | ||
1222 | if (conn->hcon->type == LE_LINK) { | 1223 | if (hcon->type == LE_LINK) { |
1223 | if (smp_conn_security(conn, chan->sec_level)) | 1224 | if (smp_conn_security(hcon, chan->sec_level)) |
1224 | l2cap_chan_ready(chan); | 1225 | l2cap_chan_ready(chan); |
1225 | 1226 | ||
1226 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { | 1227 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { |