summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-02-18 00:39:37 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-19 11:34:09 +0100
commit343f935bfa44189c68527102c409286b0cfc4526 (patch)
tree7597224c044e879c31bda46e32dd5a3f256ffd1b /net/bluetooth/mgmt.c
parentBluetooth: Track discovery type (diff)
downloadlinux-343f935bfa44189c68527102c409286b0cfc4526.tar.xz
linux-343f935bfa44189c68527102c409286b0cfc4526.zip
Bluetooth: Merge INQUIRY and LE_SCAN discovery states
This patch merges DISCOVERY_INQUIRY and DISCOVERY_LE_SCAN states into a new state called DISCOVERY_FINDING. From the discovery perspective, we are pretty much worried about to know just if we are finding devices than what exactly phase of "finding devices" (inquiry or LE scan) we are currently running. Besides, to know if the controller is performing inquiry or LE scan we should check HCI_INQUIRY or HCI_LE_SCAN bits in hdev flags. Moreover, merging this two states will simplify the discovery state machine and will keep interleaved discovery implementation simpler. 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 '')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9d98382e48c7..a9cd38dc2cab 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2250,7 +2250,7 @@ static int stop_discovery(struct sock *sk, u16 index)
goto unlock;
}
- if (hdev->discovery.state == DISCOVERY_INQUIRY) {
+ if (hdev->discovery.state == DISCOVERY_FINDING) {
err = hci_cancel_inquiry(hdev);
if (err < 0)
mgmt_pending_remove(cmd);