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
Kirill Smelkov
linux
Commits
32019c73
Commit
32019c73
authored
Nov 15, 2013
by
John W. Linville
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-upstream' of
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
parents
8e3ffa47
86ca9eac
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+3
-0
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/core.c
+3
-0
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/sock.c
+5
-1
net/bluetooth/smp.c
net/bluetooth/smp.c
+3
-0
No files found.
net/bluetooth/l2cap_core.c
View file @
32019c73
...
...
@@ -2439,6 +2439,9 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
int
err
;
struct
sk_buff_head
seg_queue
;
if
(
!
chan
->
conn
)
return
-
ENOTCONN
;
/* Connectionless channel */
if
(
chan
->
chan_type
==
L2CAP_CHAN_CONN_LESS
)
{
skb
=
l2cap_create_connless_pdu
(
chan
,
msg
,
len
,
priority
);
...
...
net/bluetooth/rfcomm/core.c
View file @
32019c73
...
...
@@ -694,6 +694,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
addr
.
l2_family
=
AF_BLUETOOTH
;
addr
.
l2_psm
=
0
;
addr
.
l2_cid
=
0
;
addr
.
l2_bdaddr_type
=
BDADDR_BREDR
;
*
err
=
kernel_bind
(
sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
if
(
*
err
<
0
)
goto
failed
;
...
...
@@ -719,6 +720,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
addr
.
l2_family
=
AF_BLUETOOTH
;
addr
.
l2_psm
=
__constant_cpu_to_le16
(
RFCOMM_PSM
);
addr
.
l2_cid
=
0
;
addr
.
l2_bdaddr_type
=
BDADDR_BREDR
;
*
err
=
kernel_connect
(
sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
),
O_NONBLOCK
);
if
(
*
err
==
0
||
*
err
==
-
EINPROGRESS
)
return
s
;
...
...
@@ -1983,6 +1985,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)
addr
.
l2_family
=
AF_BLUETOOTH
;
addr
.
l2_psm
=
__constant_cpu_to_le16
(
RFCOMM_PSM
);
addr
.
l2_cid
=
0
;
addr
.
l2_bdaddr_type
=
BDADDR_BREDR
;
err
=
kernel_bind
(
sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
if
(
err
<
0
)
{
BT_ERR
(
"Bind failed %d"
,
err
);
...
...
net/bluetooth/rfcomm/sock.c
View file @
32019c73
...
...
@@ -739,8 +739,9 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
static
int
rfcomm_sock_getsockopt_old
(
struct
socket
*
sock
,
int
optname
,
char
__user
*
optval
,
int
__user
*
optlen
)
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
l2cap_sk
;
struct
l2cap_conn
*
conn
;
struct
rfcomm_conninfo
cinfo
;
struct
l2cap_conn
*
conn
=
l2cap_pi
(
sk
)
->
chan
->
conn
;
int
len
,
err
=
0
;
u32
opt
;
...
...
@@ -783,6 +784,9 @@ static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __u
break
;
}
l2cap_sk
=
rfcomm_pi
(
sk
)
->
dlc
->
session
->
sock
->
sk
;
conn
=
l2cap_pi
(
l2cap_sk
)
->
chan
->
conn
;
memset
(
&
cinfo
,
0
,
sizeof
(
cinfo
));
cinfo
.
hci_handle
=
conn
->
hcon
->
handle
;
memcpy
(
cinfo
.
dev_class
,
conn
->
hcon
->
dev_class
,
3
);
...
...
net/bluetooth/smp.c
View file @
32019c73
...
...
@@ -742,6 +742,9 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
BT_DBG
(
"conn %p"
,
conn
);
if
(
!
(
conn
->
hcon
->
link_mode
&
HCI_LM_MASTER
))
return
SMP_CMD_NOTSUPP
;
hcon
->
pending_sec_level
=
authreq_to_seclevel
(
rp
->
auth_req
);
if
(
smp_ltk_encrypt
(
conn
,
hcon
->
pending_sec_level
))
...
...
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