if (data->hciemu_type == HCIEMU_TYPE_LE ||
test->client_enable_adv) {
- if (data->hciemu_type >= HCIEMU_TYPE_BREDRLE50)
+ if (data->hciemu_type >= HCIEMU_TYPE_BREDRLE50) {
+ bthost_set_ext_adv_params(bthost);
bthost_set_ext_adv_enable(bthost, 0x01);
- else
+ } else
bthost_set_adv_enable(bthost, 0x01);
} else
bthost_write_scan_enable(bthost, 0x03);
0xff, 0xff, 0x01, 0x00, /* supported flags */
0x1f, /* max_adv_data_len */
0x1f, /* max_scan_rsp_len */
- 0x01, /* max_instances */
+ 0x03, /* max_instances */
0x00, /* num_instances */
};
.expect_alt_ev = MGMT_EV_ADVERTISING_REMOVED,
.expect_alt_ev_param = advertising_instance1_param,
.expect_alt_ev_len = sizeof(advertising_instance1_param),
- .expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_ENABLE,
- .expect_hci_param = set_ext_adv_disable_param,
- .expect_hci_len = sizeof(set_ext_adv_disable_param),
};
static const struct generic_data remove_ext_advertising_fail_1 = {
};
static const uint8_t set_ext_adv_data_test2[] = {
- 0x01, /* handle */
+ 0x02, /* handle */
0x03, /* complete data */
0x01, /* controller should not fragment */
0x07, /* adv data len */
0x74, 0x65, 0x73, 0x74, 0x32, /* "test2" */
};
-static const struct generic_data multi_ext_advertising_switch = {
+static const struct generic_data multi_ext_advertising = {
.expect_alt_ev = MGMT_EV_ADVERTISING_REMOVED,
.expect_alt_ev_param = advertising_instance1_param,
.expect_alt_ev_len = sizeof(advertising_instance1_param),
- .expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_DATA,
- .expect_hci_param = set_ext_adv_data_test2,
- .expect_hci_len = sizeof(set_ext_adv_data_test2),
};
static const struct generic_data multi_ext_advertising_add_second = {
bthost_set_adv_enable(bthost, 0x01);
} else if (data->hciemu_type >= HCIEMU_TYPE_BREDRLE50) {
+ bthost_set_ext_adv_params(bthost);
if (test->set_adv)
bthost_set_ext_adv_data(bthost, test->adv_data,
test->adv_data_len);
tester_print("Device connected");
- test_add_condition(data);
-
- if (data->hciemu_type >= HCIEMU_TYPE_BREDRLE50)
- hciemu_add_hook(data->hciemu, HCIEMU_HOOK_POST_CMD,
- BT_HCI_CMD_LE_SET_EXT_ADV_ENABLE,
- test_adv_enable_hook, data);
- else
+ if (data->hciemu_type < HCIEMU_TYPE_BREDRLE50) {
+ test_add_condition(data);
hciemu_add_hook(data->hciemu, HCIEMU_HOOK_POST_CMD,
BT_HCI_CMD_LE_SET_ADV_ENABLE,
test_adv_enable_hook, data);
+ }
/* Make sure we get not disconnected during the testaces */
mgmt_register(data->mgmt_alt, MGMT_EV_DEVICE_DISCONNECTED,
data->mgmt_index, disconnected_event,
-
NULL, NULL);
test_condition_complete(data);
&add_advertising_name_data_appear,
setup_command_generic,
test_command_generic);
-
test_le_full("Adv. connectable & connected (slave) - Success",
&conn_slave_adv_conneactable_test,
setup_advertise_while_connected,
/* When advertising two instances, the instances should be
* advertised in a round-robin fashion.
*/
- test_bredrle50("Multi Ext Advertising - Success 1 (Instance Switch)",
- &multi_ext_advertising_switch,
+ test_bredrle50("Multi Ext Advertising - Success 1",
+ &multi_ext_advertising,
setup_multi_adv,
test_command_generic);
NULL, test_command_generic);
test_bredrle50("Set PHY 1m 2m coded Succcess", &set_phy_all_success,
- NULL, test_command_generic);
+ NULL, test_command_generic);
test_bredrle50("Set PHY 2m tx success", &set_phy_2m_tx_success,
NULL, test_command_generic);