forked from Minki/linux
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
This commit is contained in:
commit
4c52d3d3fd
@ -249,12 +249,12 @@ static void hci_conn_disconnect(struct hci_conn *conn)
|
||||
__u8 reason = hci_proto_disconn_ind(conn);
|
||||
|
||||
switch (conn->type) {
|
||||
case ACL_LINK:
|
||||
hci_acl_disconn(conn, reason);
|
||||
break;
|
||||
case AMP_LINK:
|
||||
hci_amp_disconn(conn, reason);
|
||||
break;
|
||||
default:
|
||||
hci_acl_disconn(conn, reason);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -859,6 +859,19 @@ int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb)
|
||||
|
||||
skb_pull(skb, sizeof(code));
|
||||
|
||||
/*
|
||||
* The SMP context must be initialized for all other PDUs except
|
||||
* pairing and security requests. If we get any other PDU when
|
||||
* not initialized simply disconnect (done if this function
|
||||
* returns an error).
|
||||
*/
|
||||
if (code != SMP_CMD_PAIRING_REQ && code != SMP_CMD_SECURITY_REQ &&
|
||||
!conn->smp_chan) {
|
||||
BT_ERR("Unexpected SMP command 0x%02x. Disconnecting.", code);
|
||||
kfree_skb(skb);
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
case SMP_CMD_PAIRING_REQ:
|
||||
reason = smp_cmd_pairing_req(conn, skb);
|
||||
|
Loading…
Reference in New Issue
Block a user