[PATCH 2/2] mgmt: Add wrapper for Set LE

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

 



Wrap mgmt_set_mode for Set LE into separate function to be consistent
with other calls and have debug printout.
---
 src/mgmt.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mgmt.c b/src/mgmt.c
index 6dc87e1..19e2972 100644
--- a/src/mgmt.c
+++ b/src/mgmt.c
@@ -251,6 +251,12 @@ static int mgmt_set_ssp(int index, gboolean ssp)
 	return mgmt_set_mode(index, MGMT_OP_SET_SSP, ssp);
 }
 
+static int mgmt_set_low_energy(int index, gboolean le)
+{
+	DBG("index %d le %d", index, le);
+	return mgmt_set_mode(index, MGMT_OP_SET_LE, le);
+}
+
 static inline int mgmt_powered(uint32_t settings)
 {
 	return (settings & MGMT_SETTING_POWERED) != 0;
@@ -343,7 +349,7 @@ static void update_settings(struct btd_adapter *adapter, uint32_t settings)
 
 	if (mgmt_low_energy(info->supported_settings) &&
 						!mgmt_low_energy(settings))
-		mgmt_set_mode(index, MGMT_OP_SET_LE, 1);
+		mgmt_set_low_energy(index, TRUE);
 }
 
 static int mgmt_update_powered(struct btd_adapter *adapter,
-- 
1.7.11.3

--
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