Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
7c6a4acc
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7c6a4acc
编写于
9月 26, 2013
作者:
J
John W. Linville
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
上级
b75ff5e8
5bcecf32
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
42 addition
and
40 deletion
+42
-40
drivers/bluetooth/ath3k.c
drivers/bluetooth/ath3k.c
+2
-0
drivers/bluetooth/btusb.c
drivers/bluetooth/btusb.c
+5
-0
include/net/bluetooth/hci.h
include/net/bluetooth/hci.h
+1
-0
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+20
-6
net/bluetooth/hci_event.c
net/bluetooth/hci_event.c
+5
-1
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_core.c
+7
-0
net/bluetooth/rfcomm/tty.c
net/bluetooth/rfcomm/tty.c
+2
-33
未找到文件。
drivers/bluetooth/ath3k.c
浏览文件 @
7c6a4acc
...
...
@@ -85,6 +85,7 @@ static struct usb_device_id ath3k_table[] = {
{
USB_DEVICE
(
0x04CA
,
0x3008
)
},
{
USB_DEVICE
(
0x13d3
,
0x3362
)
},
{
USB_DEVICE
(
0x0CF3
,
0xE004
)
},
{
USB_DEVICE
(
0x0CF3
,
0xE005
)
},
{
USB_DEVICE
(
0x0930
,
0x0219
)
},
{
USB_DEVICE
(
0x0489
,
0xe057
)
},
{
USB_DEVICE
(
0x13d3
,
0x3393
)
},
...
...
@@ -126,6 +127,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
{
USB_DEVICE
(
0x04ca
,
0x3008
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3362
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe004
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe005
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0930
,
0x0219
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0489
,
0xe057
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3393
),
.
driver_info
=
BTUSB_ATH3012
},
...
...
drivers/bluetooth/btusb.c
浏览文件 @
7c6a4acc
...
...
@@ -102,6 +102,7 @@ static struct usb_device_id btusb_table[] = {
/* Broadcom BCM20702A0 */
{
USB_DEVICE
(
0x0b05
,
0x17b5
)
},
{
USB_DEVICE
(
0x0b05
,
0x17cb
)
},
{
USB_DEVICE
(
0x04ca
,
0x2003
)
},
{
USB_DEVICE
(
0x0489
,
0xe042
)
},
{
USB_DEVICE
(
0x413c
,
0x8197
)
},
...
...
@@ -112,6 +113,9 @@ static struct usb_device_id btusb_table[] = {
/*Broadcom devices with vendor specific id */
{
USB_VENDOR_AND_INTERFACE_INFO
(
0x0a5c
,
0xff
,
0x01
,
0x01
)
},
/* Belkin F8065bf - Broadcom based */
{
USB_VENDOR_AND_INTERFACE_INFO
(
0x050d
,
0xff
,
0x01
,
0x01
)
},
{
}
/* Terminating entry */
};
...
...
@@ -148,6 +152,7 @@ static struct usb_device_id blacklist_table[] = {
{
USB_DEVICE
(
0x04ca
,
0x3008
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3362
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe004
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0cf3
,
0xe005
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0930
,
0x0219
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x0489
,
0xe057
),
.
driver_info
=
BTUSB_ATH3012
},
{
USB_DEVICE
(
0x13d3
,
0x3393
),
.
driver_info
=
BTUSB_ATH3012
},
...
...
include/net/bluetooth/hci.h
浏览文件 @
7c6a4acc
...
...
@@ -104,6 +104,7 @@ enum {
enum
{
HCI_SETUP
,
HCI_AUTO_OFF
,
HCI_RFKILLED
,
HCI_MGMT
,
HCI_PAIRABLE
,
HCI_SERVICE_CACHE
,
...
...
net/bluetooth/hci_core.c
浏览文件 @
7c6a4acc
...
...
@@ -1146,7 +1146,11 @@ int hci_dev_open(__u16 dev)
goto
done
;
}
if
(
hdev
->
rfkill
&&
rfkill_blocked
(
hdev
->
rfkill
))
{
/* Check for rfkill but allow the HCI setup stage to proceed
* (which in itself doesn't cause any RF activity).
*/
if
(
test_bit
(
HCI_RFKILLED
,
&
hdev
->
dev_flags
)
&&
!
test_bit
(
HCI_SETUP
,
&
hdev
->
dev_flags
))
{
ret
=
-
ERFKILL
;
goto
done
;
}
...
...
@@ -1566,10 +1570,13 @@ static int hci_rfkill_set_block(void *data, bool blocked)
BT_DBG
(
"%p name %s blocked %d"
,
hdev
,
hdev
->
name
,
blocked
);
if
(
!
blocked
)
return
0
;
hci_dev_do_close
(
hdev
);
if
(
blocked
)
{
set_bit
(
HCI_RFKILLED
,
&
hdev
->
dev_flags
);
if
(
!
test_bit
(
HCI_SETUP
,
&
hdev
->
dev_flags
))
hci_dev_do_close
(
hdev
);
}
else
{
clear_bit
(
HCI_RFKILLED
,
&
hdev
->
dev_flags
);
}
return
0
;
}
...
...
@@ -1591,9 +1598,13 @@ static void hci_power_on(struct work_struct *work)
return
;
}
if
(
test_bit
(
HCI_AUTO_OFF
,
&
hdev
->
dev_flags
))
if
(
test_bit
(
HCI_RFKILLED
,
&
hdev
->
dev_flags
))
{
clear_bit
(
HCI_AUTO_OFF
,
&
hdev
->
dev_flags
);
hci_dev_do_close
(
hdev
);
}
else
if
(
test_bit
(
HCI_AUTO_OFF
,
&
hdev
->
dev_flags
))
{
queue_delayed_work
(
hdev
->
req_workqueue
,
&
hdev
->
power_off
,
HCI_AUTO_OFF_TIMEOUT
);
}
if
(
test_and_clear_bit
(
HCI_SETUP
,
&
hdev
->
dev_flags
))
mgmt_index_added
(
hdev
);
...
...
@@ -2209,6 +2220,9 @@ int hci_register_dev(struct hci_dev *hdev)
}
}
if
(
hdev
->
rfkill
&&
rfkill_blocked
(
hdev
->
rfkill
))
set_bit
(
HCI_RFKILLED
,
&
hdev
->
dev_flags
);
set_bit
(
HCI_SETUP
,
&
hdev
->
dev_flags
);
if
(
hdev
->
dev_type
!=
HCI_AMP
)
...
...
net/bluetooth/hci_event.c
浏览文件 @
7c6a4acc
...
...
@@ -3557,7 +3557,11 @@ static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
cp
.
handle
=
cpu_to_le16
(
conn
->
handle
);
if
(
ltk
->
authenticated
)
conn
->
sec_level
=
BT_SECURITY_HIGH
;
conn
->
pending_sec_level
=
BT_SECURITY_HIGH
;
else
conn
->
pending_sec_level
=
BT_SECURITY_MEDIUM
;
conn
->
enc_key_size
=
ltk
->
enc_size
;
hci_send_cmd
(
hdev
,
HCI_OP_LE_LTK_REPLY
,
sizeof
(
cp
),
&
cp
);
...
...
net/bluetooth/l2cap_core.c
浏览文件 @
7c6a4acc
...
...
@@ -3755,6 +3755,13 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
sk
=
chan
->
sk
;
/* For certain devices (ex: HID mouse), support for authentication,
* pairing and bonding is optional. For such devices, inorder to avoid
* the ACL alive for too long after L2CAP disconnection, reset the ACL
* disc_timeout back to HCI_DISCONN_TIMEOUT during L2CAP connect.
*/
conn
->
hcon
->
disc_timeout
=
HCI_DISCONN_TIMEOUT
;
bacpy
(
&
bt_sk
(
sk
)
->
src
,
conn
->
src
);
bacpy
(
&
bt_sk
(
sk
)
->
dst
,
conn
->
dst
);
chan
->
psm
=
psm
;
...
...
net/bluetooth/rfcomm/tty.c
浏览文件 @
7c6a4acc
...
...
@@ -569,7 +569,6 @@ static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb)
static
void
rfcomm_dev_state_change
(
struct
rfcomm_dlc
*
dlc
,
int
err
)
{
struct
rfcomm_dev
*
dev
=
dlc
->
owner
;
struct
tty_struct
*
tty
;
if
(
!
dev
)
return
;
...
...
@@ -581,38 +580,8 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
DPM_ORDER_DEV_AFTER_PARENT
);
wake_up_interruptible
(
&
dev
->
port
.
open_wait
);
}
else
if
(
dlc
->
state
==
BT_CLOSED
)
{
tty
=
tty_port_tty_get
(
&
dev
->
port
);
if
(
!
tty
)
{
if
(
test_bit
(
RFCOMM_RELEASE_ONHUP
,
&
dev
->
flags
))
{
/* Drop DLC lock here to avoid deadlock
* 1. rfcomm_dev_get will take rfcomm_dev_lock
* but in rfcomm_dev_add there's lock order:
* rfcomm_dev_lock -> dlc lock
* 2. tty_port_put will deadlock if it's
* the last reference
*
* FIXME: when we release the lock anything
* could happen to dev, even its destruction
*/
rfcomm_dlc_unlock
(
dlc
);
if
(
rfcomm_dev_get
(
dev
->
id
)
==
NULL
)
{
rfcomm_dlc_lock
(
dlc
);
return
;
}
if
(
!
test_and_set_bit
(
RFCOMM_TTY_RELEASED
,
&
dev
->
flags
))
tty_port_put
(
&
dev
->
port
);
tty_port_put
(
&
dev
->
port
);
rfcomm_dlc_lock
(
dlc
);
}
}
else
{
tty_hangup
(
tty
);
tty_kref_put
(
tty
);
}
}
}
else
if
(
dlc
->
state
==
BT_CLOSED
)
tty_port_tty_hangup
(
&
dev
->
port
,
false
);
}
static
void
rfcomm_dev_modem_status
(
struct
rfcomm_dlc
*
dlc
,
u8
v24_sig
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录