Commit 4663262c authored by Johan Hedberg's avatar Johan Hedberg

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: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 3175405b
...@@ -2611,6 +2611,8 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length) ...@@ -2611,6 +2611,8 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)
if (test_bit(HCI_INQUIRY, &hdev->flags)) if (test_bit(HCI_INQUIRY, &hdev->flags))
return -EINPROGRESS; return -EINPROGRESS;
inquiry_cache_flush(hdev);
memset(&cp, 0, sizeof(cp)); memset(&cp, 0, sizeof(cp));
memcpy(&cp.lap, lap, sizeof(cp.lap)); memcpy(&cp.lap, lap, sizeof(cp.lap));
cp.length = length; cp.length = length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment