From: Andre Guedes <andre.guedes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Bluetooth: Don't force DISCOVERY_STOPPED state in inquiry_cache_flush
Date: Thu, 1 Mar 2012 18:19:57 -0300 [thread overview]
Message-ID: <1330636797-16171-1-git-send-email-andre.guedes@openbossa.org> (raw)
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>
---
net/bluetooth/hci_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index d3ddc0b..661d65f 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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)
--
1.7.9.2
next reply other threads:[~2012-03-01 21:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 21:19 Andre Guedes [this message]
2012-03-01 22:32 ` [PATCH] Bluetooth: Don't force DISCOVERY_STOPPED state in inquiry_cache_flush Johan Hedberg
2012-03-02 13:48 ` Andre Guedes
2012-03-02 23:40 ` Johan Hedberg
2012-03-02 23:44 ` Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330636797-16171-1-git-send-email-andre.guedes@openbossa.org \
--to=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox