aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_conn.c3
-rw-r--r--net/bluetooth/hci_core.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 6dcf4523df3c..dc331ceca471 100644
--- 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,
502{ 502{
503 struct hci_conn *le; 503 struct hci_conn *le;
504 504
505 if (test_bit(HCI_LE_PERIPHERAL, &hdev->flags))
506 return ERR_PTR(-ENOTSUPP);
507
505 le = hci_conn_hash_lookup_ba(hdev, LE_LINK, dst); 508 le = hci_conn_hash_lookup_ba(hdev, LE_LINK, dst);
506 if (!le) { 509 if (!le) {
507 le = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT); 510 le = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5a3400d8a6e5..515d0c394f35 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1577,6 +1577,9 @@ int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window,
1577 1577
1578 BT_DBG("%s", hdev->name); 1578 BT_DBG("%s", hdev->name);
1579 1579
1580 if (test_bit(HCI_LE_PERIPHERAL, &hdev->dev_flags))
1581 return -ENOTSUPP;
1582
1580 if (work_busy(&hdev->le_scan)) 1583 if (work_busy(&hdev->le_scan))
1581 return -EINPROGRESS; 1584 return -EINPROGRESS;
1582 1585