Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
518eefe1
Commit
518eefe1
authored
Sep 05, 2012
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
parents
c6b6eedc
d8343f12
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
17 deletions
+26
-17
drivers/bluetooth/ath3k.c
drivers/bluetooth/ath3k.c
+2
-0
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+7
-5
include/net/bluetooth/smp.h
include/net/bluetooth/smp.h
+1
-1
net/bluetooth/hci_conn.c
net/bluetooth/hci_conn.c
+4
-0
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+6
-5
net/bluetooth/l2cap_sock.c
net/bluetooth/l2cap_sock.c
+1
-1
net/bluetooth/smp.c
net/bluetooth/smp.c
+5
-5
No files found.
drivers/bluetooth/ath3k.c
View file @
518eefe1
...
@@ -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 */
};
};
...
...
drivers/bluetooth/btusb.c
View file @
518eefe1
...
@@ -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
},
...
...
include/net/bluetooth/smp.h
View file @
518eefe1
...
@@ -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
*
con
n
,
__u8
sec_level
);
int
smp_conn_security
(
struct
hci_conn
*
hco
n
,
__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
);
...
...
net/bluetooth/hci_conn.c
View file @
518eefe1
...
@@ -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
;
...
...
net/bluetooth/l2cap_core.c
View file @
518eefe1
...
@@ -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
(
con
n
,
chan
->
sec_level
))
if
(
smp_conn_security
(
hco
n
,
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
)
{
...
...
net/bluetooth/l2cap_sock.c
View file @
518eefe1
...
@@ -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
;
...
...
net/bluetooth/smp.c
View file @
518eefe1
...
@@ -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
*
con
n
,
__u8
sec_level
)
int
smp_conn_security
(
struct
hci_conn
*
hco
n
,
__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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment