Skip to content

Commit

Permalink
Bluetooth: Don't force DISCOVERY_STOPPED state in inquiry_cache_flush
Browse files Browse the repository at this point in the history
We are not supposed to force DISCOVERY_STOPPED in inquiry_cache_flush
because we may break the discovery state machine. For instance, during
interleaved discovery, when we are about to start inquiry, the state
machine forcibly goes to DISCOVERY_STOPPED while it should stay in
DISCOVERY_FINDING state.

This problem results in unexpected behaviors such as sending two
mgmt_discovering events to userspace (when only one event is expected)
and Stop Discovery failures.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Andre Guedes authored and Johan Hedberg committed Mar 2, 2012
1 parent 2b4bf39 commit 74fe619
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ static void inquiry_cache_flush(struct hci_dev *hdev)

INIT_LIST_HEAD(&cache->unknown);
INIT_LIST_HEAD(&cache->resolve);
cache->state = DISCOVERY_STOPPED;
}

struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr)
Expand Down

0 comments on commit 74fe619

Please sign in to comment.