Diff between dd64e9f908bbb980aea34362bcce0560eaaed58c and 04f68f5418beb960ee97588437576012ce916e8c

Changed Files

File Additions Deletions Status
emulator/btdev.c +1 -1 modified
emulator/btdev.h +1 -1 modified
emulator/hciemu.c +2 -2 modified
emulator/hciemu.h +1 -1 modified
tools/l2cap-tester.c +3 -3 modified
tools/mgmt-tester.c +1 -1 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index aee7a48..7f00b47 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -675,7 +675,7 @@ uint8_t *btdev_get_features(struct btdev *btdev)
 	return btdev->features;
 }
 
-bool btdev_is_le_scan_enabled(struct btdev *btdev)
+uint8_t btdev_get_le_scan_enable(struct btdev *btdev)
 {
 	return btdev->le_scan_enable;
 }
diff --git a/emulator/btdev.h b/emulator/btdev.h
index 8b116e4..324e63b 100644
--- a/emulator/btdev.h
+++ b/emulator/btdev.h
@@ -80,7 +80,7 @@ void btdev_destroy(struct btdev *btdev);
 const uint8_t *btdev_get_bdaddr(struct btdev *btdev);
 uint8_t *btdev_get_features(struct btdev *btdev);
 
-bool btdev_is_le_scan_enabled(struct btdev *btdev);
+uint8_t btdev_get_le_scan_enable(struct btdev *btdev);
 
 void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler,
 							void *user_data);
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index 725fbd4..dd6cf12 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
@@ -427,12 +427,12 @@ const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu)
 	return btdev_get_bdaddr(hciemu->client_dev);
 }
 
-bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu)
+uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu)
 {
 	if (!hciemu || !hciemu->master_dev)
 		return NULL;
 
-	return btdev_is_le_scan_enabled(hciemu->master_dev);
+	return btdev_get_le_scan_enable(hciemu->master_dev);
 }
 
 bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index 04bfab7..bfc184d 100644
--- a/emulator/hciemu.h
+++ b/emulator/hciemu.h
@@ -53,7 +53,7 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu);
 const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu);
 const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);
 
-bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);
+uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu);
 
 typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,
 						uint8_t len, void *user_data);
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index c16312d..945f82c 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -1305,7 +1305,7 @@ static gboolean test_close_socket_1_part_3(gpointer arg)
 		return FALSE;
 	}
 
-	if (hciemu_is_master_le_scan_enabled(data->hciemu)) {
+	if (hciemu_get_master_le_scan_enable(data->hciemu)) {
 		tester_print("Delayed check whether scann is off failed");
 		tester_test_failed();
 		return FALSE;
@@ -1326,7 +1326,7 @@ static gboolean test_close_socket_1_part_2(gpointer args)
 	 * was added to kernel whitelist, and scan was started. We
 	 * should be still scanning.
 	 */
-	if (!hciemu_is_master_le_scan_enabled(data->hciemu)) {
+	if (!hciemu_get_master_le_scan_enable(data->hciemu)) {
 		tester_print("Error - should be still scanning");
 		tester_test_failed();
 		return FALSE;
@@ -1353,7 +1353,7 @@ static gboolean test_close_socket_2_part_3(gpointer arg)
 	int err;
 
 	/* Scan should be already over, we're trying to create connection */
-	if (hciemu_is_master_le_scan_enabled(data->hciemu)) {
+	if (hciemu_get_master_le_scan_enable(data->hciemu)) {
 		tester_print("Error - should no longer scan");
 		tester_test_failed();
 		return FALSE;
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index b224543..d591775 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -5848,7 +5848,7 @@ static void check_scan(void *user_data)
 {
 	struct test_data *data = tester_get_data();
 
-	if (hciemu_is_master_le_scan_enabled(data->hciemu)) {
+	if (hciemu_get_master_le_scan_enable(data->hciemu)) {
 		tester_warn("LE scan still enabled");
 		tester_test_failed();
 		return;