linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hemant Gupta <hemant.gupta@stericsson.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Hemant Gupta <hemantgupta.ste@gmail.com>,
	Hemant Gupta <hemant.gupta@stericsson.com>
Subject: [PATCH v1] Adapter: Fix Discovering state while Powering Off
Date: Fri, 30 Mar 2012 22:26:09 +0530	[thread overview]
Message-ID: <1333126569-1606-1-git-send-email-hemant.gupta@stericsson.com> (raw)

This patch fixes the adater discovering state while powering off.
Without this fix, BlueZ sends incorrect discovering state to upper
layers while switching off.
---
 src/adapter.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index f8f46f8..eb9745f 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -289,6 +289,12 @@ static int set_mode(struct btd_adapter *adapter, uint8_t new_mode,
 			return err;
 
 		adapter->off_requested = TRUE;
+		/*
+		 * Change the discovering state to FALSE, otherwise
+		 * inquiry fails to start if BT is switched off and then on
+		 * while inquiry is already active.
+		 */
+		adapter->discovering = FALSE;
 
 		goto done;
 	}
-- 
1.7.0.4


             reply	other threads:[~2012-03-30 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 16:56 Hemant Gupta [this message]
2012-04-03 10:08 ` [PATCH v1] Adapter: Fix Discovering state while Powering Off Hemant Gupta
2012-04-03 10:41 ` Johan Hedberg
2012-04-03 10:50   ` Hemant GUPTA
2012-04-03 11:01     ` Johan Hedberg
2012-04-03 11:57       ` Hemant Gupta

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=1333126569-1606-1-git-send-email-hemant.gupta@stericsson.com \
    --to=hemant.gupta@stericsson.com \
    --cc=hemantgupta.ste@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).