You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/hci_core.h>
|
||||
#include <net/bluetooth/a2mp.h>
|
||||
#include <net/bluetooth/smp.h>
|
||||
|
||||
static void hci_le_connect(struct hci_conn *conn)
|
||||
{
|
||||
@@ -619,6 +620,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
|
||||
{
|
||||
BT_DBG("hcon %p", conn);
|
||||
|
||||
if (conn->type == LE_LINK)
|
||||
return smp_conn_security(conn, sec_level);
|
||||
|
||||
/* For sdp we don't need the link key. */
|
||||
if (sec_level == BT_SECURITY_SDP)
|
||||
return 1;
|
||||
|
||||
@@ -1199,14 +1199,15 @@ clean:
|
||||
static void l2cap_conn_ready(struct l2cap_conn *conn)
|
||||
{
|
||||
struct l2cap_chan *chan;
|
||||
struct hci_conn *hcon = conn->hcon;
|
||||
|
||||
BT_DBG("conn %p", conn);
|
||||
|
||||
if (!conn->hcon->out && conn->hcon->type == LE_LINK)
|
||||
if (!hcon->out && hcon->type == LE_LINK)
|
||||
l2cap_le_conn_ready(conn);
|
||||
|
||||
if (conn->hcon->out && conn->hcon->type == LE_LINK)
|
||||
smp_conn_security(conn, conn->hcon->pending_sec_level);
|
||||
if (hcon->out && hcon->type == LE_LINK)
|
||||
smp_conn_security(hcon, hcon->pending_sec_level);
|
||||
|
||||
mutex_lock(&conn->chan_lock);
|
||||
|
||||
@@ -1219,8 +1220,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (conn->hcon->type == LE_LINK) {
|
||||
if (smp_conn_security(conn, chan->sec_level))
|
||||
if (hcon->type == LE_LINK) {
|
||||
if (smp_conn_security(hcon, chan->sec_level))
|
||||
l2cap_chan_ready(chan);
|
||||
|
||||
} else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
|
||||
|
||||
@@ -615,7 +615,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ch
|
||||
break;
|
||||
}
|
||||
|
||||
if (smp_conn_security(conn, sec.level))
|
||||
if (smp_conn_security(conn->hcon, sec.level))
|
||||
break;
|
||||
sk->sk_state = BT_CONFIG;
|
||||
chan->state = BT_CONFIG;
|
||||
|
||||
+5
-5
@@ -267,10 +267,10 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send)
|
||||
mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type,
|
||||
hcon->dst_type, reason);
|
||||
|
||||
if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) {
|
||||
cancel_delayed_work_sync(&conn->security_timer);
|
||||
cancel_delayed_work_sync(&conn->security_timer);
|
||||
|
||||
if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags))
|
||||
smp_chan_destroy(conn);
|
||||
}
|
||||
}
|
||||
|
||||
#define JUST_WORKS 0x00
|
||||
@@ -760,9 +760,9 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level)
|
||||
int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
|
||||
{
|
||||
struct hci_conn *hcon = conn->hcon;
|
||||
struct l2cap_conn *conn = hcon->l2cap_data;
|
||||
struct smp_chan *smp = conn->smp_chan;
|
||||
__u8 authreq;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user