Commit 518eefe1 authored by John W. Linville's avatar John W. Linville
parents c6b6eedc d8343f12
...@@ -86,6 +86,7 @@ static struct usb_device_id ath3k_table[] = { ...@@ -86,6 +86,7 @@ static struct usb_device_id ath3k_table[] = {
/* Atheros AR5BBU22 with sflash firmware */ /* Atheros AR5BBU22 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE03C) }, { USB_DEVICE(0x0489, 0xE03C) },
{ USB_DEVICE(0x0489, 0xE036) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -109,6 +110,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { ...@@ -109,6 +110,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
/* Atheros AR5BBU22 with sflash firmware */ /* Atheros AR5BBU22 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
...@@ -52,6 +52,9 @@ static struct usb_device_id btusb_table[] = { ...@@ -52,6 +52,9 @@ static struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */ /* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, { USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
/* Apple-specific (Broadcom) devices */
{ USB_VENDOR_AND_INTERFACE_INFO(0x05ac, 0xff, 0x01, 0x01) },
/* Broadcom SoftSailing reporting vendor specific */ /* Broadcom SoftSailing reporting vendor specific */
{ USB_DEVICE(0x0a5c, 0x21e1) }, { USB_DEVICE(0x0a5c, 0x21e1) },
...@@ -94,16 +97,14 @@ static struct usb_device_id btusb_table[] = { ...@@ -94,16 +97,14 @@ static struct usb_device_id btusb_table[] = {
/* Broadcom BCM20702A0 */ /* Broadcom BCM20702A0 */
{ USB_DEVICE(0x0489, 0xe042) }, { USB_DEVICE(0x0489, 0xe042) },
{ USB_DEVICE(0x0a5c, 0x21e3) },
{ USB_DEVICE(0x0a5c, 0x21e6) },
{ USB_DEVICE(0x0a5c, 0x21e8) },
{ USB_DEVICE(0x0a5c, 0x21f3) },
{ USB_DEVICE(0x0a5c, 0x21f4) },
{ USB_DEVICE(0x413c, 0x8197) }, { USB_DEVICE(0x413c, 0x8197) },
/* Foxconn - Hon Hai */ /* Foxconn - Hon Hai */
{ USB_DEVICE(0x0489, 0xe033) }, { USB_DEVICE(0x0489, 0xe033) },
/*Broadcom devices with vendor specific id */
{ USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -141,6 +142,7 @@ static struct usb_device_id blacklist_table[] = { ...@@ -141,6 +142,7 @@ static struct usb_device_id blacklist_table[] = {
/* Atheros AR5BBU12 with sflash firmware */ /* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xe03c), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0489, 0xe03c), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0489, 0xe036), .driver_info = BTUSB_ATH3012 },
/* Broadcom BCM2035 */ /* Broadcom BCM2035 */
{ USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU }, { USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
......
...@@ -136,7 +136,7 @@ struct smp_chan { ...@@ -136,7 +136,7 @@ struct smp_chan {
}; };
/* SMP Commands */ /* SMP Commands */
int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level); int smp_conn_security(struct hci_conn *hcon, __u8 sec_level);
int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb);
int smp_distribute_keys(struct l2cap_conn *conn, __u8 force); int smp_distribute_keys(struct l2cap_conn *conn, __u8 force);
int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci_core.h>
#include <net/bluetooth/a2mp.h> #include <net/bluetooth/a2mp.h>
#include <net/bluetooth/smp.h>
static void hci_le_connect(struct hci_conn *conn) 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) ...@@ -619,6 +620,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
{ {
BT_DBG("hcon %p", conn); 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. */ /* For sdp we don't need the link key. */
if (sec_level == BT_SECURITY_SDP) if (sec_level == BT_SECURITY_SDP)
return 1; return 1;
......
...@@ -1199,14 +1199,15 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) ...@@ -1199,14 +1199,15 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn)
static void l2cap_conn_ready(struct l2cap_conn *conn) static void l2cap_conn_ready(struct l2cap_conn *conn)
{ {
struct l2cap_chan *chan; struct l2cap_chan *chan;
struct hci_conn *hcon = conn->hcon;
BT_DBG("conn %p", conn); 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); l2cap_le_conn_ready(conn);
if (conn->hcon->out && conn->hcon->type == LE_LINK) if (hcon->out && hcon->type == LE_LINK)
smp_conn_security(conn, conn->hcon->pending_sec_level); smp_conn_security(hcon, hcon->pending_sec_level);
mutex_lock(&conn->chan_lock); mutex_lock(&conn->chan_lock);
...@@ -1219,8 +1220,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) ...@@ -1219,8 +1220,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
continue; continue;
} }
if (conn->hcon->type == LE_LINK) { if (hcon->type == LE_LINK) {
if (smp_conn_security(conn, chan->sec_level)) if (smp_conn_security(hcon, chan->sec_level))
l2cap_chan_ready(chan); l2cap_chan_ready(chan);
} else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { } 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 ...@@ -615,7 +615,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ch
break; break;
} }
if (smp_conn_security(conn, sec.level)) if (smp_conn_security(conn->hcon, sec.level))
break; break;
sk->sk_state = BT_CONFIG; sk->sk_state = BT_CONFIG;
chan->state = BT_CONFIG; chan->state = BT_CONFIG;
......
...@@ -267,10 +267,10 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send) ...@@ -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, mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type,
hcon->dst_type, reason); 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); smp_chan_destroy(conn);
}
} }
#define JUST_WORKS 0x00 #define JUST_WORKS 0x00
...@@ -760,9 +760,9 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) ...@@ -760,9 +760,9 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
return 0; 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; struct smp_chan *smp = conn->smp_chan;
__u8 authreq; __u8 authreq;
......
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