diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-07-01 13:28:23 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:54 -0400 |
commit | b8221770c984bcd185c93cb3a31acab27b67c94a (patch) | |
tree | 2ad09f7954dea15bd0ac1a4ecf1839c43e0dfdd7 /net | |
parent | 9ab65d60c212c23f1605f35aea229f4c94df2334 (diff) |
Bluetooth: Do not trigger background scanning when HCI_AUTO_OFF is set
When a new controller is initialized, but not powered from userspace
at the moment, the HCI_AUTO_OFF flag is still set. During this period,
userspace might program device for auto-connection, but never power
on the controller. In this case do not try to start background
scanning and leave it for later to be started.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 0aa392406629..25ed6d3de410 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -5306,6 +5306,7 @@ void hci_update_background_scan(struct hci_dev *hdev) | |||
5306 | if (!test_bit(HCI_UP, &hdev->flags) || | 5306 | if (!test_bit(HCI_UP, &hdev->flags) || |
5307 | test_bit(HCI_INIT, &hdev->flags) || | 5307 | test_bit(HCI_INIT, &hdev->flags) || |
5308 | test_bit(HCI_SETUP, &hdev->dev_flags) || | 5308 | test_bit(HCI_SETUP, &hdev->dev_flags) || |
5309 | test_bit(HCI_AUTO_OFF, &hdev->dev_flags) || | ||
5309 | test_bit(HCI_UNREGISTER, &hdev->dev_flags)) | 5310 | test_bit(HCI_UNREGISTER, &hdev->dev_flags)) |
5310 | return; | 5311 | return; |
5311 | 5312 | ||