linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 6/9] Bluetooth: Flush inquiry cache when starting mgmt triggered inquiry
Date: Thu,  5 Jan 2012 17:16:19 +0200	[thread overview]
Message-ID: <1325776582-10314-7-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1325776582-10314-1-git-send-email-johan.hedberg@gmail.com>

From: Johan Hedberg <johan.hedberg@intel.com>

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>
---
 net/bluetooth/hci_core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 67b0bd6..5c0a1e7 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;
-- 
1.7.7.3


  parent reply	other threads:[~2012-01-05 15:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 15:16 [PATCH 0/9] Bluetooth: Legacy name discovery support for mgmt johan.hedberg
2012-01-05 15:16 ` [PATCH 1/9] Bluetooth: Fix persistency of the HCI_MGMT flag johan.hedberg
2012-01-05 23:10   ` Marcel Holtmann
2012-01-06 12:42     ` Johan Hedberg
2012-01-06 21:57       ` Marcel Holtmann
2012-01-08 20:21         ` Johan Hedberg
2012-01-05 15:16 ` [PATCH 2/9] Bluetooth: Convert inquiry cache to use standard list types johan.hedberg
2012-01-06  5:47   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 3/9] Bluetooth: Move Extended Inquiry Response defines to hci.h johan.hedberg
2012-01-06  5:48   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 4/9] Bluetooth: Add initial mgmt_confirm_name support johan.hedberg
2012-01-06  5:50   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 5/9] Bluetooth: Return updated name state with hci_inquiry_cache_update johan.hedberg
2012-01-06  5:51   ` Marcel Holtmann
2012-01-05 15:16 ` johan.hedberg [this message]
2012-01-06  5:51   ` [PATCH 6/9] Bluetooth: Flush inquiry cache when starting mgmt triggered inquiry Marcel Holtmann
2012-01-05 15:16 ` [PATCH 7/9] Bluetooth: Rename hdev->inq_cache to hdev->discovery johan.hedberg
2012-01-06  5:54   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 8/9] Bluetooth: Add discovery state tracking johan.hedberg
2012-01-06  5:53   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 9/9] Bluetooth: Add name resolving support for mgmt based discovery johan.hedberg
2012-01-06  5:54   ` Marcel Holtmann

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=1325776582-10314-7-git-send-email-johan.hedberg@gmail.com \
    --to=johan.hedberg@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).