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
d7175d55
Commit
d7175d55
authored
Feb 04, 2011
by
Gustavo F. Padovan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bluetooth: move l2cap_sock_getname() to l2cap_sock.c
Signed-off-by:
Gustavo F. Padovan
<
padovan@profusion.mobi
>
parent
c47b7c72
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
24 deletions
+23
-24
include/net/bluetooth/l2cap.h
include/net/bluetooth/l2cap.h
+0
-1
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+0
-23
net/bluetooth/l2cap_sock.c
net/bluetooth/l2cap_sock.c
+23
-0
No files found.
include/net/bluetooth/l2cap.h
View file @
d7175d55
...
@@ -439,7 +439,6 @@ struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
...
@@ -439,7 +439,6 @@ struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
int
proto
,
gfp_t
prio
);
int
proto
,
gfp_t
prio
);
int
l2cap_sock_connect
(
struct
socket
*
sock
,
struct
sockaddr
*
addr
,
int
alen
,
int
flags
);
int
l2cap_sock_connect
(
struct
socket
*
sock
,
struct
sockaddr
*
addr
,
int
alen
,
int
flags
);
int
l2cap_sock_getname
(
struct
socket
*
sock
,
struct
sockaddr
*
addr
,
int
*
len
,
int
peer
);
int
l2cap_sock_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
len
);
int
l2cap_sock_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
len
);
int
l2cap_sock_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
len
,
int
flags
);
int
l2cap_sock_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
len
,
int
flags
);
int
l2cap_sock_shutdown
(
struct
socket
*
sock
,
int
how
);
int
l2cap_sock_shutdown
(
struct
socket
*
sock
,
int
how
);
...
...
net/bluetooth/l2cap_core.c
View file @
d7175d55
...
@@ -993,29 +993,6 @@ int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int
...
@@ -993,29 +993,6 @@ int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int
return
err
;
return
err
;
}
}
int
l2cap_sock_getname
(
struct
socket
*
sock
,
struct
sockaddr
*
addr
,
int
*
len
,
int
peer
)
{
struct
sockaddr_l2
*
la
=
(
struct
sockaddr_l2
*
)
addr
;
struct
sock
*
sk
=
sock
->
sk
;
BT_DBG
(
"sock %p, sk %p"
,
sock
,
sk
);
addr
->
sa_family
=
AF_BLUETOOTH
;
*
len
=
sizeof
(
struct
sockaddr_l2
);
if
(
peer
)
{
la
->
l2_psm
=
l2cap_pi
(
sk
)
->
psm
;
bacpy
(
&
la
->
l2_bdaddr
,
&
bt_sk
(
sk
)
->
dst
);
la
->
l2_cid
=
cpu_to_le16
(
l2cap_pi
(
sk
)
->
dcid
);
}
else
{
la
->
l2_psm
=
l2cap_pi
(
sk
)
->
sport
;
bacpy
(
&
la
->
l2_bdaddr
,
&
bt_sk
(
sk
)
->
src
);
la
->
l2_cid
=
cpu_to_le16
(
l2cap_pi
(
sk
)
->
scid
);
}
return
0
;
}
static
int
__l2cap_wait_ack
(
struct
sock
*
sk
)
static
int
__l2cap_wait_ack
(
struct
sock
*
sk
)
{
{
DECLARE_WAITQUEUE
(
wait
,
current
);
DECLARE_WAITQUEUE
(
wait
,
current
);
...
...
net/bluetooth/l2cap_sock.c
View file @
d7175d55
...
@@ -253,6 +253,29 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
...
@@ -253,6 +253,29 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
return
err
;
return
err
;
}
}
static
int
l2cap_sock_getname
(
struct
socket
*
sock
,
struct
sockaddr
*
addr
,
int
*
len
,
int
peer
)
{
struct
sockaddr_l2
*
la
=
(
struct
sockaddr_l2
*
)
addr
;
struct
sock
*
sk
=
sock
->
sk
;
BT_DBG
(
"sock %p, sk %p"
,
sock
,
sk
);
addr
->
sa_family
=
AF_BLUETOOTH
;
*
len
=
sizeof
(
struct
sockaddr_l2
);
if
(
peer
)
{
la
->
l2_psm
=
l2cap_pi
(
sk
)
->
psm
;
bacpy
(
&
la
->
l2_bdaddr
,
&
bt_sk
(
sk
)
->
dst
);
la
->
l2_cid
=
cpu_to_le16
(
l2cap_pi
(
sk
)
->
dcid
);
}
else
{
la
->
l2_psm
=
l2cap_pi
(
sk
)
->
sport
;
bacpy
(
&
la
->
l2_bdaddr
,
&
bt_sk
(
sk
)
->
src
);
la
->
l2_cid
=
cpu_to_le16
(
l2cap_pi
(
sk
)
->
scid
);
}
return
0
;
}
static
int
l2cap_sock_release
(
struct
socket
*
sock
)
static
int
l2cap_sock_release
(
struct
socket
*
sock
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
...
...
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