[PATCH v2 1/2] android: Always enable SSP if supported by controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux