|
@@ -579,8 +579,11 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
|
|
|
|
|
|
if (!test_and_set_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags))
|
|
|
smp = smp_chan_create(conn);
|
|
|
+ else
|
|
|
+ smp = conn->smp_chan;
|
|
|
|
|
|
- smp = conn->smp_chan;
|
|
|
+ if (!smp)
|
|
|
+ return SMP_UNSPECIFIED;
|
|
|
|
|
|
smp->preq[0] = SMP_CMD_PAIRING_REQ;
|
|
|
memcpy(&smp->preq[1], req, sizeof(*req));
|