Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
704278cc
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
704278cc
编写于
7月 31, 2013
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Conflicts: net/bluetooth/hci_core.c
上级
d6158a55
53e21fbc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
65 addition
and
25 deletion
+65
-25
drivers/bluetooth/ath3k.c
drivers/bluetooth/ath3k.c
+37
-9
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+11
-7
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+17
-9
未找到文件。
drivers/bluetooth/ath3k.c
浏览文件 @
704278cc
...
...
@@ -91,6 +91,10 @@ static struct usb_device_id ath3k_table[] = {
{
USB_DEVICE
(
0x0489
,
0xe04e
)
},
{
USB_DEVICE
(
0x0489
,
0xe056
)
},
{
USB_DEVICE
(
0x0489
,
0xe04d
)
},
{
USB_DEVICE
(
0x04c5
,
0x1330
)
},
{
USB_DEVICE
(
0x13d3
,
0x3402
)
},
{
USB_DEVICE
(
0x0cf3
,
0x3121
)
},
{
USB_DEVICE
(
0x0cf3
,
0xe003
)
},
/* Atheros AR5BBU12 with sflash firmware */
{
USB_DEVICE
(
0x0489
,
0xE02C
)
},
...
...
@@ -128,6 +132,10 @@ static struct usb_device_id ath3k_blist_tbl[] = {
{
USB_DEVICE
(
0x0489
,
0xe04e
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0489
,
0xe056
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0489
,
0xe04d
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x04c5
,
0x1330
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3402
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0x3121
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe003
),
.
driver_info
=
BTUSB_ATH3012
},
/* Atheros AR5BBU22 with sflash firmware */
{
USB_DEVICE
(
0x0489
,
0xE03C
),
.
driver_info
=
BTUSB_ATH3012
},
...
...
@@ -193,24 +201,44 @@ static int ath3k_load_firmware(struct usb_device *udev,
static
int
ath3k_get_state
(
struct
usb_device
*
udev
,
unsigned
char
*
state
)
{
int
pipe
=
0
;
int
ret
,
pipe
=
0
;
char
*
buf
;
buf
=
kmalloc
(
sizeof
(
*
buf
),
GFP_KERNEL
);
if
(
!
buf
)
return
-
ENOMEM
;
pipe
=
usb_rcvctrlpipe
(
udev
,
0
);
return
usb_control_msg
(
udev
,
pipe
,
ATH3K_GETSTATE
,
USB_TYPE_VENDOR
|
USB_DIR_IN
,
0
,
0
,
state
,
0x01
,
USB_CTRL_SET_TIMEOUT
);
ret
=
usb_control_msg
(
udev
,
pipe
,
ATH3K_GETSTATE
,
USB_TYPE_VENDOR
|
USB_DIR_IN
,
0
,
0
,
buf
,
sizeof
(
*
buf
),
USB_CTRL_SET_TIMEOUT
);
*
state
=
*
buf
;
kfree
(
buf
);
return
ret
;
}
static
int
ath3k_get_version
(
struct
usb_device
*
udev
,
struct
ath3k_version
*
version
)
{
int
pipe
=
0
;
int
ret
,
pipe
=
0
;
struct
ath3k_version
*
buf
;
const
int
size
=
sizeof
(
*
buf
);
buf
=
kmalloc
(
size
,
GFP_KERNEL
);
if
(
!
buf
)
return
-
ENOMEM
;
pipe
=
usb_rcvctrlpipe
(
udev
,
0
);
return
usb_control_msg
(
udev
,
pipe
,
ATH3K_GETVERSION
,
USB_TYPE_VENDOR
|
USB_DIR_IN
,
0
,
0
,
version
,
sizeof
(
struct
ath3k_version
),
USB_CTRL_SET_TIMEOUT
);
ret
=
usb_control_msg
(
udev
,
pipe
,
ATH3K_GETVERSION
,
USB_TYPE_VENDOR
|
USB_DIR_IN
,
0
,
0
,
buf
,
size
,
USB_CTRL_SET_TIMEOUT
);
memcpy
(
version
,
buf
,
size
);
kfree
(
buf
);
return
ret
;
}
static
int
ath3k_load_fwfile
(
struct
usb_device
*
udev
,
...
...
drivers/bluetooth/btusb.c
浏览文件 @
704278cc
...
...
@@ -154,6 +154,10 @@ static struct usb_device_id blacklist_table[] = {
{
USB_DEVICE
(
0x0489
,
0xe04e
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0489
,
0xe056
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0489
,
0xe04d
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x04c5
,
0x1330
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3402
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0x3121
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe003
),
.
driver_info
=
BTUSB_ATH3012
},
/* Atheros AR5BBU12 with sflash firmware */
{
USB_DEVICE
(
0x0489
,
0xe02c
),
.
driver_info
=
BTUSB_IGNORE
},
...
...
@@ -1095,7 +1099,7 @@ static int btusb_setup_intel_patching(struct hci_dev *hdev,
if
(
IS_ERR
(
skb
))
{
BT_ERR
(
"%s sending Intel patch command (0x%4.4x) failed (%ld)"
,
hdev
->
name
,
cmd
->
opcode
,
PTR_ERR
(
skb
));
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
/* It ensures that the returned event matches the event data read from
...
...
@@ -1147,7 +1151,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
if
(
IS_ERR
(
skb
))
{
BT_ERR
(
"%s sending initial HCI reset command failed (%ld)"
,
hdev
->
name
,
PTR_ERR
(
skb
));
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
kfree_skb
(
skb
);
...
...
@@ -1161,7 +1165,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
if
(
IS_ERR
(
skb
))
{
BT_ERR
(
"%s reading Intel fw version command failed (%ld)"
,
hdev
->
name
,
PTR_ERR
(
skb
));
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
if
(
skb
->
len
!=
sizeof
(
*
ver
))
{
...
...
@@ -1219,7 +1223,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
BT_ERR
(
"%s entering Intel manufacturer mode failed (%ld)"
,
hdev
->
name
,
PTR_ERR
(
skb
));
release_firmware
(
fw
);
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
if
(
skb
->
data
[
0
])
{
...
...
@@ -1276,7 +1280,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
if
(
IS_ERR
(
skb
))
{
BT_ERR
(
"%s exiting Intel manufacturer mode failed (%ld)"
,
hdev
->
name
,
PTR_ERR
(
skb
));
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
kfree_skb
(
skb
);
...
...
@@ -1292,7 +1296,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
if
(
IS_ERR
(
skb
))
{
BT_ERR
(
"%s exiting Intel manufacturer mode failed (%ld)"
,
hdev
->
name
,
PTR_ERR
(
skb
));
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
kfree_skb
(
skb
);
...
...
@@ -1310,7 +1314,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
if
(
IS_ERR
(
skb
))
{
BT_ERR
(
"%s exiting Intel manufacturer mode failed (%ld)"
,
hdev
->
name
,
PTR_ERR
(
skb
));
return
-
PTR_ERR
(
skb
);
return
PTR_ERR
(
skb
);
}
kfree_skb
(
skb
);
...
...
net/bluetooth/hci_core.c
浏览文件 @
704278cc
...
...
@@ -513,7 +513,10 @@ static void hci_init2_req(struct hci_request *req, unsigned long opt)
hci_setup_event_mask
(
req
);
if
(
hdev
->
hci_ver
>
BLUETOOTH_VER_1_1
)
/* AVM Berlin (31), aka "BlueFRITZ!", doesn't support the read
* local supported commands HCI command.
*/
if
(
hdev
->
manufacturer
!=
31
&&
hdev
->
hci_ver
>
BLUETOOTH_VER_1_1
)
hci_req_add
(
req
,
HCI_OP_READ_LOCAL_COMMANDS
,
0
,
NULL
);
if
(
lmp_ssp_capable
(
hdev
))
{
...
...
@@ -2165,10 +2168,6 @@ int hci_register_dev(struct hci_dev *hdev)
BT_DBG
(
"%p name %s bus %d"
,
hdev
,
hdev
->
name
,
hdev
->
bus
);
write_lock
(
&
hci_dev_list_lock
);
list_add
(
&
hdev
->
list
,
&
hci_dev_list
);
write_unlock
(
&
hci_dev_list_lock
);
hdev
->
workqueue
=
alloc_workqueue
(
"%s"
,
WQ_HIGHPRI
|
WQ_UNBOUND
|
WQ_MEM_RECLAIM
,
1
,
hdev
->
name
);
if
(
!
hdev
->
workqueue
)
{
...
...
@@ -2203,6 +2202,10 @@ int hci_register_dev(struct hci_dev *hdev)
if
(
hdev
->
dev_type
!=
HCI_AMP
)
set_bit
(
HCI_AUTO_OFF
,
&
hdev
->
dev_flags
);
write_lock
(
&
hci_dev_list_lock
);
list_add
(
&
hdev
->
list
,
&
hci_dev_list
);
write_unlock
(
&
hci_dev_list_lock
);
hci_notify
(
hdev
,
HCI_DEV_REG
);
hci_dev_hold
(
hdev
);
...
...
@@ -2215,9 +2218,6 @@ int hci_register_dev(struct hci_dev *hdev)
destroy_workqueue
(
hdev
->
req_workqueue
);
err:
ida_simple_remove
(
&
hci_index_ida
,
hdev
->
id
);
write_lock
(
&
hci_dev_list_lock
);
list_del
(
&
hdev
->
list
);
write_unlock
(
&
hci_dev_list_lock
);
return
error
;
}
...
...
@@ -3399,8 +3399,16 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status)
*/
if
(
hdev
->
sent_cmd
)
{
req_complete
=
bt_cb
(
hdev
->
sent_cmd
)
->
req
.
complete
;
if
(
req_complete
)
if
(
req_complete
)
{
/* We must set the complete callback to NULL to
* avoid calling the callback more than once if
* this function gets called again.
*/
bt_cb
(
hdev
->
sent_cmd
)
->
req
.
complete
=
NULL
;
goto
call_complete
;
}
}
/* Remove all pending commands belonging to this request */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录