Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 2/5] adapter/hal: Implement adapter enable call
Date: Tue, 22 Oct 2013 15:24:56 +0200	[thread overview]
Message-ID: <1382448299-16887-2-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1382448299-16887-1-git-send-email-szymon.janc@tieto.com>

---
 android/hal-bluetooth.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 2c8a902..d5019a4 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -98,9 +98,19 @@ fail:
 
 static int enable(void)
 {
+	int ret;
+
 	DBG("");
 
-	return BT_STATUS_UNSUPPORTED;
+	if (!interface_ready())
+		return BT_STATUS_NOT_READY;
+
+	ret = hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_MSG_OP_BT_ENABLE, 0, NULL,
+								0, NULL, NULL);
+	if (ret < 0)
+		return -ret;
+
+	return BT_STATUS_SUCCESS;
 }
 
 static int disable(void)
-- 
1.8.4


  reply	other threads:[~2013-10-22 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 13:24 [PATCH 1/5] android/hal: Unify HALs callbacks pointers definition Szymon Janc
2013-10-22 13:24 ` Szymon Janc [this message]
2013-10-22 13:24 ` [PATCH 3/5] adapter/hal: Implement adapter disable call Szymon Janc
2013-10-22 13:24 ` [PATCH 4/5] android/hal: Use notification socket for daemon lifetime tracking Szymon Janc
2013-10-22 13:24 ` [PATCH 5/5] android: Remove not needed include Szymon Janc
2013-10-22 14:19 ` [PATCH 1/5] android/hal: Unify HALs callbacks pointers definition 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=1382448299-16887-2-git-send-email-szymon.janc@tieto.com \
    --to=szymon.janc@tieto.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