Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4dcc0637
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4dcc0637
编写于
4月 27, 2012
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-upstream' of
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
上级
afa762f6
98514036
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
16 deletion
+29
-16
drivers/bluetooth/ath3k.c
drivers/bluetooth/ath3k.c
+4
-0
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+6
-0
include/net/bluetooth/hci_core.h
include/net/bluetooth/hci_core.h
+2
-1
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+13
-14
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+3
-0
net/bluetooth/mgmt.c
net/bluetooth/mgmt.c
+1
-1
未找到文件。
drivers/bluetooth/ath3k.c
浏览文件 @
4dcc0637
...
...
@@ -75,6 +75,8 @@ static struct usb_device_id ath3k_table[] = {
{
USB_DEVICE
(
0x0CF3
,
0x311D
)
},
{
USB_DEVICE
(
0x13d3
,
0x3375
)
},
{
USB_DEVICE
(
0x04CA
,
0x3005
)
},
{
USB_DEVICE
(
0x13d3
,
0x3362
)
},
{
USB_DEVICE
(
0x0CF3
,
0xE004
)
},
/* Atheros AR5BBU12 with sflash firmware */
{
USB_DEVICE
(
0x0489
,
0xE02C
)
},
...
...
@@ -94,6 +96,8 @@ static struct usb_device_id ath3k_blist_tbl[] = {
{
USB_DEVICE
(
0x0cf3
,
0x311D
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3375
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x04ca
,
0x3005
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3362
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe004
),
.
driver_info
=
BTUSB_ATH3012
},
{
}
/* Terminating entry */
};
...
...
drivers/bluetooth/btusb.c
浏览文件 @
4dcc0637
...
...
@@ -101,12 +101,16 @@ static struct usb_device_id btusb_table[] = {
{
USB_DEVICE
(
0x0c10
,
0x0000
)
},
/* Broadcom BCM20702A0 */
{
USB_DEVICE
(
0x0489
,
0xe042
)
},
{
USB_DEVICE
(
0x0a5c
,
0x21e3
)
},
{
USB_DEVICE
(
0x0a5c
,
0x21e6
)
},
{
USB_DEVICE
(
0x0a5c
,
0x21e8
)
},
{
USB_DEVICE
(
0x0a5c
,
0x21f3
)
},
{
USB_DEVICE
(
0x413c
,
0x8197
)
},
/* Foxconn - Hon Hai */
{
USB_DEVICE
(
0x0489
,
0xe033
)
},
{
}
/* Terminating entry */
};
...
...
@@ -133,6 +137,8 @@ static struct usb_device_id blacklist_table[] = {
{
USB_DEVICE
(
0x0cf3
,
0x311d
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3375
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x04ca
,
0x3005
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3362
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe004
),
.
driver_info
=
BTUSB_ATH3012
},
/* Atheros AR5BBU12 with sflash firmware */
{
USB_DEVICE
(
0x0489
,
0xe02c
),
.
driver_info
=
BTUSB_IGNORE
},
...
...
include/net/bluetooth/hci_core.h
浏览文件 @
4dcc0637
...
...
@@ -314,6 +314,7 @@ struct hci_conn {
__u8
remote_cap
;
__u8
remote_auth
;
bool
flush_key
;
unsigned
int
sent
;
...
...
@@ -980,7 +981,7 @@ int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable);
int
mgmt_connectable
(
struct
hci_dev
*
hdev
,
u8
connectable
);
int
mgmt_write_scan_failed
(
struct
hci_dev
*
hdev
,
u8
scan
,
u8
status
);
int
mgmt_new_link_key
(
struct
hci_dev
*
hdev
,
struct
link_key
*
key
,
u8
persistent
);
bool
persistent
);
int
mgmt_device_connected
(
struct
hci_dev
*
hdev
,
bdaddr_t
*
bdaddr
,
u8
link_type
,
u8
addr_type
,
u32
flags
,
u8
*
name
,
u8
name_len
,
u8
*
dev_class
);
...
...
net/bluetooth/hci_core.c
浏览文件 @
4dcc0637
...
...
@@ -1215,40 +1215,40 @@ struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr)
return
NULL
;
}
static
int
hci_persistent_key
(
struct
hci_dev
*
hdev
,
struct
hci_conn
*
conn
,
static
bool
hci_persistent_key
(
struct
hci_dev
*
hdev
,
struct
hci_conn
*
conn
,
u8
key_type
,
u8
old_key_type
)
{
/* Legacy key */
if
(
key_type
<
0x03
)
return
1
;
return
true
;
/* Debug keys are insecure so don't store them persistently */
if
(
key_type
==
HCI_LK_DEBUG_COMBINATION
)
return
0
;
return
false
;
/* Changed combination key and there's no previous one */
if
(
key_type
==
HCI_LK_CHANGED_COMBINATION
&&
old_key_type
==
0xff
)
return
0
;
return
false
;
/* Security mode 3 case */
if
(
!
conn
)
return
1
;
return
true
;
/* Neither local nor remote side had no-bonding as requirement */
if
(
conn
->
auth_type
>
0x01
&&
conn
->
remote_auth
>
0x01
)
return
1
;
return
true
;
/* Local side had dedicated bonding as requirement */
if
(
conn
->
auth_type
==
0x02
||
conn
->
auth_type
==
0x03
)
return
1
;
return
true
;
/* Remote side had dedicated bonding as requirement */
if
(
conn
->
remote_auth
==
0x02
||
conn
->
remote_auth
==
0x03
)
return
1
;
return
true
;
/* If none of the above criteria match, then don't store the key
* persistently */
return
0
;
return
false
;
}
struct
smp_ltk
*
hci_find_ltk
(
struct
hci_dev
*
hdev
,
__le16
ediv
,
u8
rand
[
8
])
...
...
@@ -1285,7 +1285,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
bdaddr_t
*
bdaddr
,
u8
*
val
,
u8
type
,
u8
pin_len
)
{
struct
link_key
*
key
,
*
old_key
;
u8
old_key_type
,
persistent
;
u8
old_key_type
;
bool
persistent
;
old_key
=
hci_find_link_key
(
hdev
,
bdaddr
);
if
(
old_key
)
{
...
...
@@ -1328,10 +1329,8 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
mgmt_new_link_key
(
hdev
,
key
,
persistent
);
if
(
!
persistent
)
{
list_del
(
&
key
->
list
);
kfree
(
key
);
}
if
(
conn
)
conn
->
flush_key
=
!
persistent
;
return
0
;
}
...
...
net/bluetooth/hci_event.c
浏览文件 @
4dcc0637
...
...
@@ -1901,6 +1901,8 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff
}
if
(
ev
->
status
==
0
)
{
if
(
conn
->
type
==
ACL_LINK
&&
conn
->
flush_key
)
hci_remove_link_key
(
hdev
,
&
conn
->
dst
);
hci_proto_disconn_cfm
(
conn
,
ev
->
reason
);
hci_conn_del
(
conn
);
}
...
...
@@ -2311,6 +2313,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
case
HCI_OP_USER_PASSKEY_NEG_REPLY
:
hci_cc_user_passkey_neg_reply
(
hdev
,
skb
);
break
;
case
HCI_OP_LE_SET_SCAN_PARAM
:
hci_cc_le_set_scan_param
(
hdev
,
skb
);
...
...
net/bluetooth/mgmt.c
浏览文件 @
4dcc0637
...
...
@@ -2884,7 +2884,7 @@ int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status)
return
0
;
}
int
mgmt_new_link_key
(
struct
hci_dev
*
hdev
,
struct
link_key
*
key
,
u8
persistent
)
int
mgmt_new_link_key
(
struct
hci_dev
*
hdev
,
struct
link_key
*
key
,
bool
persistent
)
{
struct
mgmt_ev_new_link_key
ev
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录