summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorAndre Guedes2012-02-03 21:47:57 +0100
committerJohan Hedberg2012-02-13 16:01:34 +0100
commitc599008f8f999dab8cb4a6404be99bdc4716ba15 (patch)
treec67e858a2ef7e8ebebeeaec95e6d3f9ec9afe0a6 /net/bluetooth/hci_core.c
parentBluetooth: Add missing QUIRK_NO_RESET test to hci_dev_do_close (diff)
downloadkernel-qcow2-linux-c599008f8f999dab8cb4a6404be99bdc4716ba15.tar.gz
kernel-qcow2-linux-c599008f8f999dab8cb4a6404be99bdc4716ba15.tar.xz
kernel-qcow2-linux-c599008f8f999dab8cb4a6404be99bdc4716ba15.zip
Bluetooth: LE scan should send Discovering events
Send MGMT Discovering events once LE scan starts/stops so the userspace can track when local adapters are discovering LE devices. This way, we also keep the same behavior of inquiry which sends MGMT Discovering events once inquiry starts/stops even if it is triggered by an external tool (e.g. hcitool). Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8bffd3eb344d..1705d9372725 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -361,6 +361,7 @@ bool hci_discovery_active(struct hci_dev *hdev)
struct discovery_state *discov = &hdev->discovery;
if (discov->state == DISCOVERY_INQUIRY ||
+ discov->state == DISCOVERY_LE_SCAN ||
discov->state == DISCOVERY_RESOLVING)
return true;
@@ -381,6 +382,7 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
case DISCOVERY_STARTING:
break;
case DISCOVERY_INQUIRY:
+ case DISCOVERY_LE_SCAN:
mgmt_discovering(hdev, 1);
break;
case DISCOVERY_RESOLVING: