diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-08 13:05:05 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-08 13:09:46 (GMT) |
commit | 34722277045f84d0ee618865d02030a44b1ed257 (patch) | |
tree | b44d9c9b5fa0653a822a6d6047e9137a69d559f9 | |
parent | e8bb6b9739e2e80e0e413f56816af3871388cfe8 (diff) | |
download | linux-34722277045f84d0ee618865d02030a44b1ed257.tar.xz |
Bluetooth: Fix check for re-enabling advertising
There are many different places that can disable LE scanning but we only
want to re-enable advertising in hci_cc_le_set_scan_enable() for a very
specific use case, which is when the active scanning part of Start
Discovery is complete. Because of this, fix the discovery state check to
test for the exact state.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/hci_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 5d3095d..2b3d366 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -1188,7 +1188,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev, &hdev->dev_flags)) hci_discovery_set_state(hdev, DISCOVERY_STOPPED); else if (!test_bit(HCI_LE_ADV, &hdev->dev_flags) && - hdev->discovery.state != DISCOVERY_STARTING) + hdev->discovery.state == DISCOVERY_FINDING) mgmt_reenable_advertising(hdev); break; |