Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d7175d55
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d7175d55
编写于
2月 04, 2011
作者:
G
Gustavo F. Padovan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bluetooth: move l2cap_sock_getname() to l2cap_sock.c
Signed-off-by:
N
Gustavo F. Padovan
<
padovan@profusion.mobi
>
上级
c47b7c72
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
23 addition
and
24 deletion
+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
未找到文件。
include/net/bluetooth/l2cap.h
浏览文件 @
d7175d55
...
...
@@ -439,7 +439,6 @@ struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
int
proto
,
gfp_t
prio
);
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_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
size_t
len
,
int
flags
);
int
l2cap_sock_shutdown
(
struct
socket
*
sock
,
int
how
);
...
...
net/bluetooth/l2cap_core.c
浏览文件 @
d7175d55
...
...
@@ -993,29 +993,6 @@ int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int
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
)
{
DECLARE_WAITQUEUE
(
wait
,
current
);
...
...
net/bluetooth/l2cap_sock.c
浏览文件 @
d7175d55
...
...
@@ -253,6 +253,29 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl
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
)
{
struct
sock
*
sk
=
sock
->
sk
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录