From 75ec3768e108eab67e90c5675dad30cf0e200f32 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 21 Oct 2013 15:12:46 +0300 Subject: [PATCH] tools/mgmt-tester: Add disable_bredr and discov_limited to generic setup --- tools/mgmt-tester.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 3995fe257..029db772a 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -355,6 +355,8 @@ static void controller_setup(const void *test_data) struct generic_data { const uint16_t *setup_settings; + bool setup_nobredr; + bool setup_limited_discov; uint16_t setup_expect_hci_command; const void *setup_expect_hci_param; uint8_t setup_expect_hci_len; @@ -2375,12 +2377,22 @@ static void test_setup(const void *test_data) func = setup_complete; if (*cmd == MGMT_OP_SET_DISCOVERABLE) { - param = discov_param; + if (test->setup_limited_discov) { + discov_param[0] = 0x02; + discov_param[1] = 0x01; + } param_size = sizeof(discov_param); } mgmt_send(data->mgmt, *cmd, data->mgmt_index, param_size, param, func, data, NULL); + + if (*cmd == MGMT_OP_SET_LE && test->setup_nobredr) { + unsigned char off[] = { 0x00 }; + mgmt_send(data->mgmt, MGMT_OP_SET_BREDR, + data->mgmt_index, sizeof(off), off, + func, data, NULL); + } } } -- 2.47.3