Skip to contentSkip to conversation

Add PAN test cases

PATCH In review Ravi kumar Veeramally 2 participants 10 messages Aug 5, 2014 – Aug 6, 2014 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

cover Add PAN test cases

v2: Fixed comments.

Ravi kumar Veeramally (8):
android/tester: Add PAN init test case android/tester: Add PAN Connect test case android/tester: Add PAN Disconnect test case android/tester: Add PAN Get Local Role test case android/pan: Notify control state callback on HAL .enable call android/tester: Add PAN Enable NAP test case android/tester: Add PAN Enable PANU test case android/tester: Add PAN Enable None test case

 android/Makefile.am   |   1 +
 android/pan.c         |  21 +++--
 android/tester-main.c | 109 +++++++++++++++++++++
 android/tester-main.h |  29 ++++++
 android/tester-pan.c  | 256 ++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 409 insertions(+), 7 deletions(-)
 create mode 100644 android/tester-pan.c
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/8 android/tester: Add PAN init test case

---
 android/Makefile.am   |   1 +
 android/tester-main.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++
 android/tester-main.h |  29 ++++++++++++++
 android/tester-pan.c  |  48 ++++++++++++++++++++++
 4 files changed, 187 insertions(+)
 create mode 100644 android/tester-pan.c
android/Makefile.am +1 -0
index a3067bb..79f6a0d 100644
@@ -157,6 +157,7 @@ android_android_tester_SOURCES = emulator/btdev.h emulator/btdev.c \
 				android/tester-bluetooth.c \
 				android/tester-socket.c \
 				android/tester-hidhost.c \
+				android/tester-pan.c \
 				android/tester-gatt.c \
 				android/tester-main.h android/tester-main.c
 
android/tester-main.c +109 -0

145 lines not on this page · raw message

android/tester-main.h +29 -0
index 778bdc4..5a5cba4 100644
@@ -46,6 +46,7 @@
 #include <hardware/bluetooth.h>
 #include <hardware/bt_sock.h>
 #include <hardware/bt_hh.h>
+#include <hardware/bt_pan.h>
 #include <hardware/bt_gatt.h>
 #include <hardware/bt_gatt_client.h>
 #include <hardware/bt_gatt_server.h>
@@ -145,6 +146,22 @@
 		.callback_result.client_id = cb_client_id, \
 	}
 
+#define CALLBACK_PAN_CTRL_STATE(cb, cb_res, cb_state, cb_local_role) { \
+		.callback = cb, \
+		.callback_result.status = cb_res, \
+		.callback_result.ctrl_state = cb_state, \
+		.callback_result.local_role = cb_local_role, \
+	}
+
+#define CALLBACK_PAN_CONN_STATE(cb, cb_res, cb_state, cb_local_role, \
+							cb_remote_role) { \
+		.callback = cb, \
+		.callback_result.status = cb_res, \
+		.callback_result.conn_state = cb_state, \
+		.callback_result.local_role = cb_local_role, \
+		.callback_result.remote_role = cb_remote_role, \
+	}
+
 #define CALLBACK_DEVICE_PROPS(props, prop_cnt) \
 	CALLBACK_PROPS(CB_BT_REMOTE_DEVICE_PROPERTIES, props, prop_cnt)
 
@@ -200,6 +217,10 @@ typedef enum {
 	CB_HH_GET_REPORT,
 	CB_HH_VIRTUAL_UNPLUG,
 
+	/* PAN cb */
+	CB_PAN_CONTROL_STATE,
+	CB_PAN_CONNECTION_STATE,
+
 	/* Gatt client */
 	CB_GATTC_REGISTER_CLIENT,
 	CB_GATTC_SCAN_RESULT,
@@ -245,6 +266,7 @@ struct test_data {
 	const bt_interface_t *if_bluetooth;
 	const btsock_interface_t *if_sock;
 	const bthh_interface_t *if_hid;
+	const btpan_interface_t *if_pan;
 	const btgatt_interface_t *if_gatt;
 
 	const void *test_data;
@@ -310,6 +332,11 @@ struct bt_callback_data {
 
 	int client_id;
 	int conn_id;
+
+	btpan_control_state_t ctrl_state;
+	btpan_connection_state_t conn_state;
+	int local_role;
+	int remote_role;
 };
 
 /*
@@ -341,6 +368,8 @@ struct queue *get_socket_tests(void);
 void remove_socket_tests(void);
 struct queue *get_hidhost_tests(void);
 void remove_hidhost_tests(void);
+struct queue *get_pan_tests(void);
+void remove_pan_tests(void);
 struct queue *get_gatt_tests(void);
 void remove_gatt_tests(void);
 
android/tester-pan.c new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/8 android/tester: Add PAN Connect test case

In reply to Ravi kumar Veeramally
---
 android/tester-pan.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)
android/tester-pan.c +79 -0
index caead9c..df0e4ec 100644
@@ -23,10 +23,89 @@
 
 static struct queue *list; /* List of pan test cases */
 
+struct emu_cid_data {
+	uint16_t nap_handle;
+	uint16_t nap_cid;
+};
+
+struct emu_cid_data cid_data;
+static uint8_t pan_conn_req_pdu[] = {0x01, 0x01, 0x02, 0x11, 0x16, 0x11, 0x15};
+static uint8_t pan_conn_rsp_pdu[] = {0x01, 0x02, 0x00, 0x00};
+
+static void pan_nap_cid_hook_cb(const void *data, uint16_t len, void *user_data)
+{
+	struct test_data *t_data = tester_get_data();
+	struct emu_cid_data *cid_data = user_data;
+	struct bthost *bthost = hciemu_client_get_host(t_data->hciemu);
+
+	if (!memcmp((uint8_t *) data, pan_conn_req_pdu,
+						sizeof(pan_conn_req_pdu)))
+		bthost_send_cid(bthost, cid_data->nap_handle, cid_data->nap_cid,
+				pan_conn_rsp_pdu, sizeof(pan_conn_rsp_pdu));
+}
+
+static void pan_connect_request_cb(uint16_t handle, uint16_t cid,
+							void *user_data)
+{
+	struct test_data *data = tester_get_data();
+	struct bthost *bthost = hciemu_client_get_host(data->hciemu);
+
+	cid_data.nap_handle = handle;
+	cid_data.nap_cid = cid;
+
+	bthost_add_cid_hook(bthost, handle, cid, pan_nap_cid_hook_cb,
+								&cid_data);
+}
+
+static struct emu_set_l2cap_data l2cap_setup_data = {
+	.psm = 15,
+	.func = pan_connect_request_cb,
+	.user_data = NULL,
+};
+
+static void pan_connect_action(void)
+{
+	struct test_data *data = tester_get_data();
+	const uint8_t *pan_addr = hciemu_get_client_bdaddr(data->hciemu);
+	struct step *step = g_new0(struct step, 1);
+	bt_bdaddr_t bdaddr;
+
+	bdaddr2android((const bdaddr_t *) pan_addr, &bdaddr);
+
+	step->action_status = data->if_pan->connect(&bdaddr,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP);
+
+	schedule_action_verification(step);
+}
+
 static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Init",
 		ACTION_SUCCESS(dummy_action, NULL),
 	),
+	TEST_CASE_BREDRLE("PAN Connect - Success",
+		ACTION_SUCCESS(bluetooth_enable_action, NULL),
+		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
+		ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
+		ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+		ACTION_SUCCESS(emu_add_l2cap_server_action, &l2cap_setup_data),
+		ACTION_SUCCESS(pan_connect_action, NULL),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_CONNECTING,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+					BTPAN_STATE_ENABLED, BTPAN_ROLE_PANU),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_CONNECTED,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		ACTION_SUCCESS(bluetooth_disable_action, NULL),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_DISCONNECTED,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
+	),
 };
 
 struct queue *get_pan_tests(void)
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/8 android/tester: Add PAN Disconnect test case

In reply to Ravi kumar Veeramally
---
 android/tester-pan.c | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
android/tester-pan.c +40 -0
index df0e4ec..848cc83 100644
@@ -78,6 +78,20 @@ static void pan_connect_action(void)
 	schedule_action_verification(step);
 }
 
+static void pan_disconnect_action(void)
+{
+	struct test_data *data = tester_get_data();
+	const uint8_t *pan_addr = hciemu_get_client_bdaddr(data->hciemu);
+	struct step *step = g_new0(struct step, 1);
+	bt_bdaddr_t bdaddr;
+
+	bdaddr2android((const bdaddr_t *) pan_addr, &bdaddr);
+
+	step->action_status = data->if_pan->disconnect(&bdaddr);
+
+	schedule_action_verification(step);
+}
+
 static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Init",
 		ACTION_SUCCESS(dummy_action, NULL),
@@ -106,6 +120,32 @@ static struct test_case test_cases[] = {
 					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
 		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
 	),
+	TEST_CASE_BREDRLE("PAN Disconnect - Success",
+		ACTION_SUCCESS(bluetooth_enable_action, NULL),
+		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
+		ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
+		ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+		ACTION_SUCCESS(emu_add_l2cap_server_action, &l2cap_setup_data),
+		ACTION_SUCCESS(pan_connect_action, NULL),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_CONNECTING,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+					BTPAN_STATE_ENABLED, BTPAN_ROLE_PANU),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_CONNECTED,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		ACTION_SUCCESS(pan_disconnect_action, NULL),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_DISCONNECTED,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		ACTION_SUCCESS(bluetooth_disable_action, NULL),
+		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
+	),
+
 };
 
 struct queue *get_pan_tests(void)
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/8 android/tester: Add PAN Get Local Role test case

In reply to Ravi kumar Veeramally
---
 android/tester-pan.c | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)
android/tester-pan.c +44 -1
index 848cc83..abf4b34 100644
@@ -92,6 +92,25 @@ static void pan_disconnect_action(void)
 	schedule_action_verification(step);
 }
 
+static void pan_get_local_role_action(void)
+{
+	struct test_data *data = tester_get_data();
+	const uint8_t *pan_addr = hciemu_get_client_bdaddr(data->hciemu);
+	struct step *step = g_new0(struct step, 1);
+	bt_bdaddr_t bdaddr;
+	int role;
+
+	bdaddr2android((const bdaddr_t *) pan_addr, &bdaddr);
+
+	role = data->if_pan->get_local_role();
+	if (role == BTPAN_ROLE_PANU)
+		step->action_status = BT_STATUS_SUCCESS;
+	else
+		step->action_status = BT_STATUS_FAIL;
+
+	schedule_action_verification(step);
+}
+
 static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Init",
 		ACTION_SUCCESS(dummy_action, NULL),
@@ -145,7 +164,31 @@ static struct test_case test_cases[] = {
 		ACTION_SUCCESS(bluetooth_disable_action, NULL),
 		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
 	),
-
+	TEST_CASE_BREDRLE("PAN GetLocalRole - Success",
+		ACTION_SUCCESS(bluetooth_enable_action, NULL),
+		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
+		ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
+		ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+		ACTION_SUCCESS(emu_add_l2cap_server_action, &l2cap_setup_data),
+		ACTION_SUCCESS(pan_connect_action, NULL),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_CONNECTING,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+					BTPAN_STATE_ENABLED, BTPAN_ROLE_PANU),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_CONNECTED,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		ACTION_SUCCESS(pan_get_local_role_action, NULL),
+		ACTION_SUCCESS(bluetooth_disable_action, NULL),
+		CALLBACK_PAN_CONN_STATE(CB_PAN_CONNECTION_STATE,
+					BT_STATUS_SUCCESS,
+					BTPAN_STATE_DISCONNECTED,
+					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
+		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
+	),
 };
 
 struct queue *get_pan_tests(void)
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/8 android/pan: Notify control state callback on HAL .enable call

In reply to Ravi kumar Veeramally
---
 android/pan.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
android/pan.c +14 -7
index c11ee29..d8572cc 100644
@@ -255,7 +255,8 @@ static void bt_pan_notify_conn_state(struct pan_device *dev, uint8_t state)
 		pan_device_remove(dev);
 }
 
-static void bt_pan_notify_ctrl_state(struct pan_device *dev, uint8_t state)
+static void bt_pan_notify_ctrl_state(struct pan_device *dev, uint8_t state,
+								uint8_t status)
 {
 	struct hal_ev_pan_ctrl_state ev;
 
@@ -263,13 +264,13 @@ static void bt_pan_notify_ctrl_state(struct pan_device *dev, uint8_t state)
 
 	ev.state = state;
 	ev.local_role = local_role;
-	ev.status = HAL_STATUS_SUCCESS;
+	ev.status = status;
 
 	memset(ev.name, 0, sizeof(ev.name));
 
 	if (local_role == HAL_PAN_ROLE_NAP)
 		memcpy(ev.name, BNEP_BRIDGE, sizeof(BNEP_BRIDGE));
-	else
+	else if (local_role == HAL_PAN_ROLE_PANU)
 		memcpy(ev.name, dev->iface, sizeof(dev->iface));
 
 	ipc_send_notif(hal_ipc, HAL_SERVICE_ID_PAN, HAL_EV_PAN_CTRL_STATE,
@@ -301,7 +302,7 @@ static void bnep_conn_cb(char *iface, int err, void *data)
 
 	DBG("%s connected", dev->iface);
 
-	bt_pan_notify_ctrl_state(dev, HAL_PAN_CTRL_ENABLED);
+	bt_pan_notify_ctrl_state(dev, HAL_PAN_CTRL_ENABLED, HAL_STATUS_SUCCESS);
 	bt_pan_notify_conn_state(dev, HAL_PAN_STATE_CONNECTED);
 }
 
@@ -534,7 +535,7 @@ static gboolean nap_setup_cb(GIOChannel *chan, GIOCondition cond,
 	g_io_channel_unref(dev->io);
 	dev->io = NULL;
 
-	bt_pan_notify_ctrl_state(dev, HAL_PAN_CTRL_ENABLED);
+	bt_pan_notify_ctrl_state(dev, HAL_PAN_CTRL_ENABLED, HAL_STATUS_SUCCESS);
 	bt_pan_notify_conn_state(dev, HAL_PAN_STATE_CONNECTED);
 
 	return FALSE;
@@ -648,7 +649,7 @@ static int register_nap_server(void)
 static void bt_pan_enable(const void *buf, uint16_t len)
 {
 	const struct hal_cmd_pan_enable *cmd = buf;
-	uint8_t status;
+	uint8_t status, state;
 	int err;
 
 	DBG("");
@@ -665,8 +666,10 @@ static void bt_pan_enable(const void *buf, uint16_t len)
 	case HAL_PAN_ROLE_NAP:
 		break;
 	case HAL_PAN_ROLE_NONE:
+		local_role = HAL_PAN_ROLE_NONE;
 		status = HAL_STATUS_SUCCESS;
-		goto reply;
+		state = HAL_PAN_CTRL_DISABLED;
+		goto notify;
 	default:
 		status = HAL_STATUS_UNSUPPORTED;
 		goto reply;
@@ -681,6 +684,10 @@ static void bt_pan_enable(const void *buf, uint16_t len)
 	}
 
 	status = HAL_STATUS_SUCCESS;
+	state = HAL_PAN_CTRL_ENABLED;
+
+notify:
+	bt_pan_notify_ctrl_state(NULL, state, status);
 
 reply:
 	ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_PAN, HAL_OP_PAN_ENABLE, status);
Signature · 1 line
1.9.1
#6 lore raw

PATCH 6/8 android/tester: Add PAN Enable NAP test case

In reply to Ravi kumar Veeramally
---
 android/tester-pan.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
android/tester-pan.c +15 -0
index abf4b34..74ced79 100644
@@ -111,6 +111,16 @@ static void pan_get_local_role_action(void)
 	schedule_action_verification(step);
 }
 
+static void pan_enable_nap_action(void)
+{
+	struct test_data *data = tester_get_data();
+	struct step *step = g_new0(struct step, 1);
+
+	step->action_status = data->if_pan->enable(BTPAN_ROLE_PANNAP);
+
+	schedule_action_verification(step);
+}
+
 static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Init",
 		ACTION_SUCCESS(dummy_action, NULL),
@@ -189,6 +199,11 @@ static struct test_case test_cases[] = {
 					BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
 		CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
 	),
+	TEST_CASE_BREDRLE("PAN Enable NAP - Success",
+		ACTION_SUCCESS(pan_enable_nap_action, NULL),
+		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+					BTPAN_STATE_ENABLED, BTPAN_ROLE_PANNAP),
+	),
 };
 
 struct queue *get_pan_tests(void)
Signature · 1 line
1.9.1
#7 lore raw

PATCH 7/8 android/tester: Add PAN Enable PANU test case

In reply to Ravi kumar Veeramally
---
 android/tester-pan.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
android/tester-pan.c +13 -0
index 74ced79..96d1ba9 100644
@@ -121,6 +121,16 @@ static void pan_enable_nap_action(void)
 	schedule_action_verification(step);
 }
 
+static void pan_enable_panu_action(void)
+{
+	struct test_data *data = tester_get_data();
+	struct step *step = g_new0(struct step, 1);
+
+	step->action_status = data->if_pan->enable(BTPAN_ROLE_PANU);
+
+	schedule_action_verification(step);
+}
+
 static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Init",
 		ACTION_SUCCESS(dummy_action, NULL),
@@ -204,6 +214,9 @@ static struct test_case test_cases[] = {
 		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
 					BTPAN_STATE_ENABLED, BTPAN_ROLE_PANNAP),
 	),
+	TEST_CASE_BREDRLE("PAN Enable PANU - Success",
+		ACTION(BT_STATUS_UNSUPPORTED, pan_enable_panu_action, NULL),
+	),
 };
 
 struct queue *get_pan_tests(void)
Signature · 1 line
1.9.1
#8 lore raw

PATCH 8/8 android/tester: Add PAN Enable None test case

In reply to Ravi kumar Veeramally
---
 android/tester-pan.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
android/tester-pan.c +18 -0
index 96d1ba9..b679a12 100644
@@ -131,6 +131,16 @@ static void pan_enable_panu_action(void)
 	schedule_action_verification(step);
 }
 
+static void pan_enable_none_action(void)
+{
+	struct test_data *data = tester_get_data();
+	struct step *step = g_new0(struct step, 1);
+
+	step->action_status = data->if_pan->enable(BTPAN_ROLE_NONE);
+
+	schedule_action_verification(step);
+}
+
 static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Init",
 		ACTION_SUCCESS(dummy_action, NULL),
@@ -217,6 +227,14 @@ static struct test_case test_cases[] = {
 	TEST_CASE_BREDRLE("PAN Enable PANU - Success",
 		ACTION(BT_STATUS_UNSUPPORTED, pan_enable_panu_action, NULL),
 	),
+	TEST_CASE_BREDRLE("PAN Enable NONE - Success",
+		ACTION_SUCCESS(pan_enable_nap_action, NULL),
+		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+					BTPAN_STATE_ENABLED, BTPAN_ROLE_PANNAP),
+		ACTION_SUCCESS(pan_enable_none_action, NULL),
+		CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+					BTPAN_STATE_DISABLED, BTPAN_ROLE_NONE),
+	),
 };
 
 struct queue *get_pan_tests(void)
Signature · 1 line
1.9.1
#9 lore raw
In reply to Ravi kumar Veeramally

Hi Ravi,

Quoted 12 lines · Ravi kumar Veeramally

v2: Fixed comments.

Ravi kumar Veeramally (8):
android/tester: Add PAN init test case android/tester: Add PAN Connect test case android/tester: Add PAN Disconnect test case android/tester: Add PAN Get Local Role test case android/pan: Notify control state callback on HAL .enable call android/tester: Add PAN Enable NAP test case android/tester: Add PAN Enable PANU test case android/tester: Add PAN Enable None test case

Quoted 7 lines
 android/Makefile.am   |   1 +
 android/pan.c         |  21 +++--
 android/tester-main.c | 109 +++++++++++++++++++++
 android/tester-main.h |  29 ++++++
 android/tester-pan.c  | 256 ++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 409 insertions(+), 7 deletions(-)
 create mode 100644 android/tester-pan.c

All patches in this set have been applied. Thanks.

Johan