projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bluetooth: Disallow LE scanning and connecting in peripheral role
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
net
/
bluetooth
/
hci_conn.c
diff --git
a/net/bluetooth/hci_conn.c
b/net/bluetooth/hci_conn.c
index 6dcf4523df3c6a9fb320703b89e41011bbc489da..dc331ceca471351145b2c44ef3a1af05f53c3d5d 100644
(file)
--- a/
net/bluetooth/hci_conn.c
+++ b/
net/bluetooth/hci_conn.c
@@
-502,6
+502,9
@@
static struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
{
struct hci_conn *le;
+ if (test_bit(HCI_LE_PERIPHERAL, &hdev->flags))
+ return ERR_PTR(-ENOTSUPP);
+
le = hci_conn_hash_lookup_ba(hdev, LE_LINK, dst);
if (!le) {
le = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT);