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
367b468d
Commit
367b468d
authored
Oct 11, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/bluetooth/rfcomm/core.c: Update for new sendmsg args.
parent
d09b1b68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/core.c
+27
-3
No files found.
net/bluetooth/rfcomm/core.c
View file @
367b468d
...
...
@@ -575,6 +575,8 @@ struct rfcomm_session *rfcomm_session_create(bdaddr_t *src, bdaddr_t *dst, int *
/* ---- RFCOMM frame sending ---- */
static
int
rfcomm_send_frame
(
struct
rfcomm_session
*
s
,
u8
*
data
,
int
len
)
{
struct
kiocb
iocb
;
struct
sock_iocb
*
si
;
struct
socket
*
sock
=
s
->
sock
;
struct
iovec
iv
=
{
data
,
len
};
struct
msghdr
msg
;
...
...
@@ -585,8 +587,16 @@ static int rfcomm_send_frame(struct rfcomm_session *s, u8 *data, int len)
memset
(
&
msg
,
0
,
sizeof
(
msg
));
msg
.
msg_iovlen
=
1
;
msg
.
msg_iov
=
&
iv
;
err
=
sock
->
ops
->
sendmsg
(
sock
,
&
msg
,
len
,
0
);
init_sync_kiocb
(
&
iocb
,
NULL
);
si
=
kiocb_to_siocb
(
&
iocb
);
si
->
scm
=
NULL
;
si
->
sock
=
sock
;
si
->
msg
=
&
msg
;
si
->
size
=
len
;
err
=
sock
->
ops
->
sendmsg
(
&
iocb
,
sock
,
&
msg
,
len
,
NULL
);
if
(
-
EIOCBQUEUED
==
err
)
err
=
wait_on_sync_kiocb
(
&
iocb
);
return
err
;
}
...
...
@@ -799,10 +809,13 @@ static int rfcomm_send_msc(struct rfcomm_session *s, int cr, u8 dlci, u8 v24_sig
static
int
rfcomm_send_test
(
struct
rfcomm_session
*
s
,
int
cr
,
u8
*
pattern
,
int
len
)
{
struct
kiocb
iocb
;
struct
sock_iocb
*
si
;
struct
socket
*
sock
=
s
->
sock
;
struct
iovec
iv
[
3
];
struct
msghdr
msg
;
unsigned
char
hdr
[
5
],
crc
[
1
];
int
err
;
if
(
len
>
125
)
return
-
EINVAL
;
...
...
@@ -827,7 +840,18 @@ static int rfcomm_send_test(struct rfcomm_session *s, int cr, u8 *pattern, int l
memset
(
&
msg
,
0
,
sizeof
(
msg
));
msg
.
msg_iovlen
=
3
;
msg
.
msg_iov
=
iv
;
return
sock
->
ops
->
sendmsg
(
sock
,
&
msg
,
6
+
len
,
0
);
init_sync_kiocb
(
&
iocb
,
NULL
);
si
=
kiocb_to_siocb
(
&
iocb
);
si
->
scm
=
NULL
;
si
->
sock
=
sock
;
si
->
msg
=
&
msg
;
si
->
size
=
6
+
len
;
err
=
sock
->
ops
->
sendmsg
(
&
iocb
,
sock
,
&
msg
,
6
+
len
,
NULL
);
if
(
-
EIOCBQUEUED
==
err
)
err
=
wait_on_sync_kiocb
(
&
iocb
);
return
err
;
}
static
int
rfcomm_send_credits
(
struct
rfcomm_session
*
s
,
u8
addr
,
u8
credits
)
...
...
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