static bool hciemu_post_encr_hook(const void *data, uint16_t len,
void *user_data)
{
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
/*
* Expected data: status (1 octet) + conn. handle (2 octets) +
if (len < 4)
return true;
+ step = g_new0(struct step, 1);
+
step->callback = ((uint8_t *)data)[3] ? CB_EMU_ENCRYPTION_ENABLED :
CB_EMU_ENCRYPTION_DISABLED;
bthost_set_cmd_complete_cb(bthost, emu_connectable_complete, data);
if ((data->hciemu_type == HCIEMU_TYPE_LE) ||
- (data->hciemu_type == HCIEMU_TYPE_BREDRLE))
- bthost_set_adv_enable(bthost, 0x01, 0x02);
+ (data->hciemu_type == HCIEMU_TYPE_BREDRLE)) {
+ uint8_t adv[4];
+
+ adv[0] = 0x02; /* Field length */
+ adv[1] = 0x01; /* Flags */
+ adv[2] = 0x02; /* Flags value */
+ adv[3] = 0x00; /* Field terminator */
+
+ bthost_set_adv_data(bthost, adv, sizeof(adv));
+ bthost_set_adv_enable(bthost, 0x01);
+ }
if (data->hciemu_type != HCIEMU_TYPE_LE)
bthost_write_scan_enable(bthost, 0x03);
struct step *current_data_step = queue_peek_head(data->steps);
struct bt_action_data *rfcomm_data = current_data_step->set_data;
struct bthost *bthost;
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
if (!rfcomm_data) {
tester_warn("Invalid l2cap_data params");
return;
}
+ step = g_new0(struct step, 1);
+
bthost = hciemu_client_get_host(data->hciemu);
bthost_add_rfcomm_server(bthost, rfcomm_data->channel,
void bt_set_property_action(void)
{
struct test_data *data = tester_get_data();
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
struct step *current_data_step = queue_peek_head(data->steps);
bt_property_t *prop;
return;
}
+ step = g_new0(struct step, 1);
+
prop = (bt_property_t *)current_data_step->set_data;
step->action_status = data->if_bluetooth->set_adapter_property(prop);
void bt_get_property_action(void)
{
struct test_data *data = tester_get_data();
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
struct step *current_data_step = queue_peek_head(data->steps);
bt_property_t *prop;
return;
}
+ step = g_new0(struct step, 1);
+
prop = (bt_property_t *)current_data_step->set_data;
step->action_status = data->if_bluetooth->get_adapter_property(
{
struct test_data *data = tester_get_data();
struct step *current_data_step = queue_peek_head(data->steps);
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
if (!current_data_step->set_data) {
tester_debug("bdaddr not defined");
return;
}
+ step = g_new0(struct step, 1);
+
step->action_status =
data->if_bluetooth->get_remote_device_properties(
current_data_step->set_data);
struct test_data *data = tester_get_data();
struct step *current_data_step = queue_peek_head(data->steps);
struct bt_action_data *action_data = current_data_step->set_data;
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
if (!action_data) {
tester_warn("No arguments for 'get remote device prop' req.");
return;
}
+ step = g_new0(struct step, 1);
+
step->action_status = data->if_bluetooth->get_remote_device_property(
action_data->addr,
action_data->prop_type);
struct test_data *data = tester_get_data();
struct step *current_data_step = queue_peek_head(data->steps);
struct bt_action_data *action_data = current_data_step->set_data;
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
if (!action_data) {
tester_warn("No arguments for 'set remote device prop' req.");
return;
}
+ step = g_new0(struct step, 1);
+
step->action_status = data->if_bluetooth->set_remote_device_property(
action_data->addr,
action_data->prop);
struct test_data *data = tester_get_data();
struct step *current_data_step = queue_peek_head(data->steps);
struct bt_action_data *action_data = current_data_step->set_data;
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
if (!action_data || !action_data->addr) {
tester_warn("Bad arguments for 'create bond' req.");
return;
}
+ step = g_new0(struct step, 1);
+
step->action_status =
data->if_bluetooth->create_bond(action_data->addr,
action_data->transport_type ?
struct test_data *data = tester_get_data();
struct step *current_data_step = queue_peek_head(data->steps);
struct bt_action_data *action_data = current_data_step->set_data;
- struct step *step = g_new0(struct step, 1);
+ struct step *step;
if (!action_data || !action_data->addr || !action_data->pin) {
tester_warn("Bad arguments for 'pin reply' req.");
return;
}
+ step = g_new0(struct step, 1);
+
step->action_status = data->if_bluetooth->pin_reply(action_data->addr,
TRUE,
action_data->pin_len,