Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
220b881a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
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看板
提交
220b881a
编写于
3月 31, 2011
作者:
G
Gustavo F. Padovan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
上级
80a1e1db
6f5ef998
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
7 deletion
+26
-7
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+5
-1
include/net/bluetooth/hci.h
include/net/bluetooth/hci.h
+2
-0
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+8
-2
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+3
-1
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+3
-1
net/bluetooth/l2cap_sock.c
net/bluetooth/l2cap_sock.c
+3
-2
net/bluetooth/mgmt.c
net/bluetooth/mgmt.c
+2
-0
未找到文件。
drivers/bluetooth/btusb.c
浏览文件 @
220b881a
...
@@ -71,6 +71,9 @@ static struct usb_device_id btusb_table[] = {
...
@@ -71,6 +71,9 @@ static struct usb_device_id btusb_table[] = {
/* Apple MacBookAir3,1, MacBookAir3,2 */
/* Apple MacBookAir3,1, MacBookAir3,2 */
{
USB_DEVICE
(
0x05ac
,
0x821b
)
},
{
USB_DEVICE
(
0x05ac
,
0x821b
)
},
/* Apple MacBookPro8,2 */
{
USB_DEVICE
(
0x05ac
,
0x821a
)
},
/* AVM BlueFRITZ! USB v2.0 */
/* AVM BlueFRITZ! USB v2.0 */
{
USB_DEVICE
(
0x057c
,
0x3800
)
},
{
USB_DEVICE
(
0x057c
,
0x3800
)
},
...
@@ -690,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb)
...
@@ -690,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb)
break
;
break
;
case
HCI_ACLDATA_PKT
:
case
HCI_ACLDATA_PKT
:
if
(
!
data
->
bulk_tx_ep
||
hdev
->
conn_hash
.
acl_num
<
1
)
if
(
!
data
->
bulk_tx_ep
||
(
hdev
->
conn_hash
.
acl_num
<
1
&&
hdev
->
conn_hash
.
le_num
<
1
))
return
-
ENODEV
;
return
-
ENODEV
;
urb
=
usb_alloc_urb
(
0
,
GFP_ATOMIC
);
urb
=
usb_alloc_urb
(
0
,
GFP_ATOMIC
);
...
...
include/net/bluetooth/hci.h
浏览文件 @
220b881a
...
@@ -84,6 +84,8 @@ enum {
...
@@ -84,6 +84,8 @@ enum {
HCI_SERVICE_CACHE
,
HCI_SERVICE_CACHE
,
HCI_LINK_KEYS
,
HCI_LINK_KEYS
,
HCI_DEBUG_KEYS
,
HCI_DEBUG_KEYS
,
HCI_RESET
,
};
};
/* HCI ioctl defines */
/* HCI ioctl defines */
...
...
net/bluetooth/hci_core.c
浏览文件 @
220b881a
...
@@ -185,6 +185,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt)
...
@@ -185,6 +185,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt)
BT_DBG
(
"%s %ld"
,
hdev
->
name
,
opt
);
BT_DBG
(
"%s %ld"
,
hdev
->
name
,
opt
);
/* Reset device */
/* Reset device */
set_bit
(
HCI_RESET
,
&
hdev
->
flags
);
hci_send_cmd
(
hdev
,
HCI_OP_RESET
,
0
,
NULL
);
hci_send_cmd
(
hdev
,
HCI_OP_RESET
,
0
,
NULL
);
}
}
...
@@ -212,8 +213,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
...
@@ -212,8 +213,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
/* Mandatory initialization */
/* Mandatory initialization */
/* Reset */
/* Reset */
if
(
!
test_bit
(
HCI_QUIRK_NO_RESET
,
&
hdev
->
quirks
))
if
(
!
test_bit
(
HCI_QUIRK_NO_RESET
,
&
hdev
->
quirks
))
{
set_bit
(
HCI_RESET
,
&
hdev
->
flags
);
hci_send_cmd
(
hdev
,
HCI_OP_RESET
,
0
,
NULL
);
hci_send_cmd
(
hdev
,
HCI_OP_RESET
,
0
,
NULL
);
}
/* Read Local Supported Features */
/* Read Local Supported Features */
hci_send_cmd
(
hdev
,
HCI_OP_READ_LOCAL_FEATURES
,
0
,
NULL
);
hci_send_cmd
(
hdev
,
HCI_OP_READ_LOCAL_FEATURES
,
0
,
NULL
);
...
@@ -583,6 +586,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
...
@@ -583,6 +586,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
hci_req_cancel
(
hdev
,
ENODEV
);
hci_req_cancel
(
hdev
,
ENODEV
);
hci_req_lock
(
hdev
);
hci_req_lock
(
hdev
);
/* Stop timer, it might be running */
del_timer_sync
(
&
hdev
->
cmd_timer
);
if
(
!
test_and_clear_bit
(
HCI_UP
,
&
hdev
->
flags
))
{
if
(
!
test_and_clear_bit
(
HCI_UP
,
&
hdev
->
flags
))
{
hci_req_unlock
(
hdev
);
hci_req_unlock
(
hdev
);
return
0
;
return
0
;
...
@@ -622,7 +628,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
...
@@ -622,7 +628,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
/* Drop last sent command */
/* Drop last sent command */
if
(
hdev
->
sent_cmd
)
{
if
(
hdev
->
sent_cmd
)
{
del_timer_sync
(
&
hdev
->
cmd_timer
);
kfree_skb
(
hdev
->
sent_cmd
);
kfree_skb
(
hdev
->
sent_cmd
);
hdev
->
sent_cmd
=
NULL
;
hdev
->
sent_cmd
=
NULL
;
}
}
...
@@ -1073,6 +1078,7 @@ static void hci_cmd_timer(unsigned long arg)
...
@@ -1073,6 +1078,7 @@ static void hci_cmd_timer(unsigned long arg)
BT_ERR
(
"%s command tx timeout"
,
hdev
->
name
);
BT_ERR
(
"%s command tx timeout"
,
hdev
->
name
);
atomic_set
(
&
hdev
->
cmd_cnt
,
1
);
atomic_set
(
&
hdev
->
cmd_cnt
,
1
);
clear_bit
(
HCI_RESET
,
&
hdev
->
flags
);
tasklet_schedule
(
&
hdev
->
cmd_task
);
tasklet_schedule
(
&
hdev
->
cmd_task
);
}
}
...
...
net/bluetooth/hci_event.c
浏览文件 @
220b881a
...
@@ -183,6 +183,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
...
@@ -183,6 +183,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
BT_DBG
(
"%s status 0x%x"
,
hdev
->
name
,
status
);
BT_DBG
(
"%s status 0x%x"
,
hdev
->
name
,
status
);
clear_bit
(
HCI_RESET
,
&
hdev
->
flags
);
hci_req_complete
(
hdev
,
HCI_OP_RESET
,
status
);
hci_req_complete
(
hdev
,
HCI_OP_RESET
,
status
);
}
}
...
@@ -1865,7 +1867,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
...
@@ -1865,7 +1867,7 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
if
(
ev
->
opcode
!=
HCI_OP_NOP
)
if
(
ev
->
opcode
!=
HCI_OP_NOP
)
del_timer
(
&
hdev
->
cmd_timer
);
del_timer
(
&
hdev
->
cmd_timer
);
if
(
ev
->
ncmd
)
{
if
(
ev
->
ncmd
&&
!
test_bit
(
HCI_RESET
,
&
hdev
->
flags
)
)
{
atomic_set
(
&
hdev
->
cmd_cnt
,
1
);
atomic_set
(
&
hdev
->
cmd_cnt
,
1
);
if
(
!
skb_queue_empty
(
&
hdev
->
cmd_q
))
if
(
!
skb_queue_empty
(
&
hdev
->
cmd_q
))
tasklet_schedule
(
&
hdev
->
cmd_task
);
tasklet_schedule
(
&
hdev
->
cmd_task
);
...
...
net/bluetooth/l2cap_core.c
浏览文件 @
220b881a
...
@@ -1115,7 +1115,9 @@ int l2cap_ertm_send(struct sock *sk)
...
@@ -1115,7 +1115,9 @@ int l2cap_ertm_send(struct sock *sk)
bt_cb
(
skb
)
->
tx_seq
=
pi
->
next_tx_seq
;
bt_cb
(
skb
)
->
tx_seq
=
pi
->
next_tx_seq
;
pi
->
next_tx_seq
=
(
pi
->
next_tx_seq
+
1
)
%
64
;
pi
->
next_tx_seq
=
(
pi
->
next_tx_seq
+
1
)
%
64
;
pi
->
unacked_frames
++
;
if
(
bt_cb
(
skb
)
->
retries
==
1
)
pi
->
unacked_frames
++
;
pi
->
frames_sent
++
;
pi
->
frames_sent
++
;
if
(
skb_queue_is_last
(
TX_QUEUE
(
sk
),
skb
))
if
(
skb_queue_is_last
(
TX_QUEUE
(
sk
),
skb
))
...
...
net/bluetooth/l2cap_sock.c
浏览文件 @
220b881a
...
@@ -923,8 +923,9 @@ void __l2cap_sock_close(struct sock *sk, int reason)
...
@@ -923,8 +923,9 @@ void __l2cap_sock_close(struct sock *sk, int reason)
rsp
.
status
=
cpu_to_le16
(
L2CAP_CS_NO_INFO
);
rsp
.
status
=
cpu_to_le16
(
L2CAP_CS_NO_INFO
);
l2cap_send_cmd
(
conn
,
l2cap_pi
(
sk
)
->
ident
,
l2cap_send_cmd
(
conn
,
l2cap_pi
(
sk
)
->
ident
,
L2CAP_CONN_RSP
,
sizeof
(
rsp
),
&
rsp
);
L2CAP_CONN_RSP
,
sizeof
(
rsp
),
&
rsp
);
}
else
}
l2cap_chan_del
(
sk
,
reason
);
l2cap_chan_del
(
sk
,
reason
);
break
;
break
;
case
BT_CONNECT
:
case
BT_CONNECT
:
...
...
net/bluetooth/mgmt.c
浏览文件 @
220b881a
...
@@ -1389,6 +1389,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data,
...
@@ -1389,6 +1389,8 @@ static int user_confirm_reply(struct sock *sk, u16 index, unsigned char *data,
if
(
!
hdev
)
if
(
!
hdev
)
return
cmd_status
(
sk
,
index
,
mgmt_op
,
ENODEV
);
return
cmd_status
(
sk
,
index
,
mgmt_op
,
ENODEV
);
hci_dev_lock_bh
(
hdev
);
if
(
!
test_bit
(
HCI_UP
,
&
hdev
->
flags
))
{
if
(
!
test_bit
(
HCI_UP
,
&
hdev
->
flags
))
{
err
=
cmd_status
(
sk
,
index
,
mgmt_op
,
ENETDOWN
);
err
=
cmd_status
(
sk
,
index
,
mgmt_op
,
ENETDOWN
);
goto
failed
;
goto
failed
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录