summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-01-02 16:06:08 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 17:01:20 +0200
commit4663262c294c71aa1139616ae7f24dd345a69c15 (patch)
tree73ca73f55dd4c00d0f5deaf9639a8313e19e8161
parent3175405b906a85ed2bad21e09c444266e4a05a8e (diff)
Bluetooth: Flush inquiry cache when starting mgmt triggered inquiry
For the remote name state tracking for the management interface to work the cache needs to be flushed whenever inquiry is started. The hci_do_inquiry function is only used by the management interface so by having the flushing done from it ensures that old ioctl based functionality isn't affected. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
-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 162176151db9..5dbfb276edf2 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2611,6 +2611,8 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)
if (test_bit(HCI_INQUIRY, &hdev->flags))
return -EINPROGRESS;
+ inquiry_cache_flush(hdev);
+
memset(&cp, 0, sizeof(cp));
memcpy(&cp.lap, lap, sizeof(cp.lap));
cp.length = length;