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 v2 1/2] android: Always enable SSP if supported by controller
Date: Thu, 31 Oct 2013 14:15:08 +0100	[thread overview]
Message-ID: <1383225309-7260-1-git-send-email-szymon.janc@tieto.com> (raw)

There is no HAL function to enable/disable SSP so always enable it if
supported by controller.
---

v2:
  use missing_settings mask for checking if setting is enabled

 android/adapter.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/android/adapter.c b/android/adapter.c
index a3f9aa6..c6fcf96 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -490,6 +490,7 @@ static void read_info_complete(uint8_t status, uint16_t length, const void *para
 							void *user_data)
 {
 	const struct mgmt_rp_read_info *rp = param;
+	uint32_t missing_settings;
 	int err;
 
 	DBG("");
@@ -528,6 +529,13 @@ static void read_info_complete(uint8_t status, uint16_t length, const void *para
 	load_link_keys(NULL);
 
 	set_io_capability();
+
+	missing_settings = adapter->current_settings ^
+						adapter->supported_settings;
+
+	if (missing_settings & MGMT_SETTING_SSP)
+		set_mode(MGMT_OP_SET_SSP, 0x01);
+
 	set_mode(MGMT_OP_SET_PAIRABLE, 0x01);
 
 	return;
-- 
1.8.4.1


             reply	other threads:[~2013-10-31 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 13:15 Szymon Janc [this message]
2013-10-31 13:15 ` [PATCH v2 2/2] android: Set pairable mode only if it is not set Szymon Janc
2013-10-31 13:47 ` [PATCH v2 1/2] android: Always enable SSP if supported by controller 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=1383225309-7260-1-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