[PATCH 11/14] android/tester-ng: Set scan enable for dual mode devices

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

 



This is needed for socket HAL connect test cases.
---
 android/tester-main.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/android/tester-main.c b/android/tester-main.c
index bbb3375..40416d7 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
@@ -1029,16 +1029,27 @@ static void emu_connectable_complete(uint16_t opcode, uint8_t status,
 					const void *param, uint8_t len,
 					void *user_data)
 {
-	struct step *step = g_new0(struct step, 1);
+	struct step *step;
+	struct test_data *data = user_data;
 
 	switch (opcode) {
 	case BT_HCI_CMD_WRITE_SCAN_ENABLE:
+		break;
 	case BT_HCI_CMD_LE_SET_ADV_ENABLE:
+		/*
+		 * For BREDRLE emulator we want to verify step after scan
+		 * enable and not after le_set_adv_enable
+		 */
+		if (data->hciemu_type == HCIEMU_TYPE_BREDRLE)
+			return;
+
 		break;
 	default:
 		return;
 	}
 
+	step = g_new0(struct step, 1);
+
 	if (status) {
 		tester_warn("Emulated remote setup failed.");
 		step->action_status = BT_STATUS_FAIL;
@@ -1061,7 +1072,8 @@ void emu_setup_powered_remote_action(void)
 	if ((data->hciemu_type == HCIEMU_TYPE_LE) ||
 				(data->hciemu_type == HCIEMU_TYPE_BREDRLE))
 		bthost_set_adv_enable(bthost, 0x01, 0x02);
-	else
+
+	if (data->hciemu_type != HCIEMU_TYPE_LE)
 		bthost_write_scan_enable(bthost, 0x03);
 }
 
-- 
1.9.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