Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
9270fd61
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看板
提交
9270fd61
编写于
11月 08, 2011
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth
上级
24b9c373
d13431ca
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
11 deletion
+17
-11
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+3
-0
include/net/bluetooth/l2cap.h
include/net/bluetooth/l2cap.h
+5
-2
net/bluetooth/hci_conn.c
net/bluetooth/hci_conn.c
+1
-1
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+8
-8
未找到文件。
drivers/bluetooth/btusb.c
浏览文件 @
9270fd61
...
...
@@ -100,6 +100,9 @@ static struct usb_device_id btusb_table[] = {
/* Canyon CN-BTU1 with HID interfaces */
{
USB_DEVICE
(
0x0c10
,
0x0000
)
},
/* Broadcom BCM20702A0 */
{
USB_DEVICE
(
0x413c
,
0x8197
)
},
{
}
/* Terminating entry */
};
...
...
include/net/bluetooth/l2cap.h
浏览文件 @
9270fd61
...
...
@@ -39,8 +39,11 @@
#define L2CAP_DEFAULT_ACK_TO 200
#define L2CAP_LE_DEFAULT_MTU 23
#define L2CAP_CONN_TIMEOUT (40000)
/* 40 seconds */
#define L2CAP_INFO_TIMEOUT (4000)
/* 4 seconds */
#define L2CAP_DISC_TIMEOUT (100)
#define L2CAP_DISC_REJ_TIMEOUT (5000)
/* 5 seconds */
#define L2CAP_ENC_TIMEOUT (5000)
/* 5 seconds */
#define L2CAP_CONN_TIMEOUT (40000)
/* 40 seconds */
#define L2CAP_INFO_TIMEOUT (4000)
/* 4 seconds */
/* L2CAP socket address */
struct
sockaddr_l2
{
...
...
net/bluetooth/hci_conn.c
浏览文件 @
9270fd61
...
...
@@ -673,7 +673,7 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
goto
encrypt
;
auth:
if
(
test_bit
(
HCI_CONN_ENCRYPT_PEND
,
&
conn
->
pend
))
if
(
test_
and_set_
bit
(
HCI_CONN_ENCRYPT_PEND
,
&
conn
->
pend
))
return
0
;
if
(
!
hci_conn_auth
(
conn
,
sec_level
,
auth_type
))
...
...
net/bluetooth/l2cap_core.c
浏览文件 @
9270fd61
...
...
@@ -251,7 +251,7 @@ static void l2cap_chan_timeout(unsigned long arg)
if
(
sock_owned_by_user
(
sk
))
{
/* sk is owned by user. Try again later */
__set_chan_timer
(
chan
,
HZ
/
5
);
__set_chan_timer
(
chan
,
L2CAP_DISC_TIMEOUT
);
bh_unlock_sock
(
sk
);
chan_put
(
chan
);
return
;
...
...
@@ -2488,7 +2488,7 @@ static inline int l2cap_connect_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hd
if
(
sock_owned_by_user
(
sk
))
{
l2cap_state_change
(
chan
,
BT_DISCONN
);
__clear_chan_timer
(
chan
);
__set_chan_timer
(
chan
,
HZ
/
5
);
__set_chan_timer
(
chan
,
L2CAP_DISC_TIMEOUT
);
break
;
}
...
...
@@ -2661,7 +2661,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
default:
sk
->
sk_err
=
ECONNRESET
;
__set_chan_timer
(
chan
,
HZ
*
5
);
__set_chan_timer
(
chan
,
L2CAP_DISC_REJ_TIMEOUT
);
l2cap_send_disconn_req
(
conn
,
chan
,
ECONNRESET
);
goto
done
;
}
...
...
@@ -2718,7 +2718,7 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn, struct l2cap_cmd
if
(
sock_owned_by_user
(
sk
))
{
l2cap_state_change
(
chan
,
BT_DISCONN
);
__clear_chan_timer
(
chan
);
__set_chan_timer
(
chan
,
HZ
/
5
);
__set_chan_timer
(
chan
,
L2CAP_DISC_TIMEOUT
);
bh_unlock_sock
(
sk
);
return
0
;
}
...
...
@@ -2752,7 +2752,7 @@ static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, struct l2cap_cmd
if
(
sock_owned_by_user
(
sk
))
{
l2cap_state_change
(
chan
,
BT_DISCONN
);
__clear_chan_timer
(
chan
);
__set_chan_timer
(
chan
,
HZ
/
5
);
__set_chan_timer
(
chan
,
L2CAP_DISC_TIMEOUT
);
bh_unlock_sock
(
sk
);
return
0
;
}
...
...
@@ -3998,7 +3998,7 @@ static inline void l2cap_check_encryption(struct l2cap_chan *chan, u8 encrypt)
if
(
encrypt
==
0x00
)
{
if
(
chan
->
sec_level
==
BT_SECURITY_MEDIUM
)
{
__clear_chan_timer
(
chan
);
__set_chan_timer
(
chan
,
HZ
*
5
);
__set_chan_timer
(
chan
,
L2CAP_ENC_TIMEOUT
);
}
else
if
(
chan
->
sec_level
==
BT_SECURITY_HIGH
)
l2cap_chan_close
(
chan
,
ECONNREFUSED
);
}
else
{
...
...
@@ -4066,7 +4066,7 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
L2CAP_CONN_REQ
,
sizeof
(
req
),
&
req
);
}
else
{
__clear_chan_timer
(
chan
);
__set_chan_timer
(
chan
,
HZ
/
10
);
__set_chan_timer
(
chan
,
L2CAP_DISC_TIMEOUT
);
}
}
else
if
(
chan
->
state
==
BT_CONNECT2
)
{
struct
l2cap_conn_rsp
rsp
;
...
...
@@ -4086,7 +4086,7 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
}
}
else
{
l2cap_state_change
(
chan
,
BT_DISCONN
);
__set_chan_timer
(
chan
,
HZ
/
10
);
__set_chan_timer
(
chan
,
L2CAP_DISC_TIMEOUT
);
res
=
L2CAP_CR_SEC_BLOCK
;
stat
=
L2CAP_CS_NO_INFO
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录