From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This enables use of limited/device privacy mode in some LL Privacy tests that are testing the addition of peer in the resolving list since it does require the use of LE Set Privacy Mode: < HCI Command: LE Add Devi.. (0x08|0x0027) plen 39 Address type: Public (0x00) Address: 66:55:44:33:22:11 (OUI 66-55-44) Peer identity resolving key: 11223344556677881122334455667788 Local identity resolving key: 01020304050607080102030405060708 > HCI Event: Command Complete (0x0e) plen 4 LE Add Device To Resolving List (0x08|0x0027) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Priva.. (0x08|0x004e) plen 8 Peer Identity address type: Public (0x00) Peer Identity address: 66:55:44:33:22:11 (OUI 66-55-44) Privacy Mode: Use Device Privacy (0x01) > HCI Event: Command Complete (0x0e) plen 4 LE Set Privacy Mode (0x08|0x004e) ncmd 1 Status: Success (0x00) < HCI Command: LE Add Devic.. (0x08|0x0011) plen 7 Address type: Public (0x00) Address: 66:55:44:33:22:11 (OUI 66-55-44) > HCI Event: Command Complete (0x0e) plen 4 LE Add Device To Accept List (0x08|0x0011) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Addre.. (0x08|0x002d) plen 1 Address resolution: Enabled (0x01) --- tools/mgmt-tester.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index e9fcb2602..f3a533de5 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -274,6 +274,7 @@ struct generic_data { const uint16_t *setup_settings; bool setup_nobredr; bool setup_limited_discov; + bool setup_limited_priv; const void *setup_exp_feat_param; uint16_t setup_expect_hci_command; const void *setup_expect_hci_param; @@ -7160,6 +7161,8 @@ proceed: } if (*cmd == MGMT_OP_SET_PRIVACY) { + if (test->setup_limited_priv) + privacy_param[0] = 0x02; param_size = sizeof(privacy_param); param = privacy_param; } @@ -10185,6 +10188,7 @@ static const struct generic_data ll_privacy_add_device_3 = { static const struct generic_data ll_privacy_add_device_4 = { .setup_settings = settings_le_privacy_ll_privacy, + .setup_limited_priv = true, .setup_exp_feat_param = set_exp_feat_param_ll_privacy, .send_opcode = MGMT_OP_ADD_DEVICE, .send_param = add_device_le_public_param_2, @@ -10202,6 +10206,7 @@ static const struct generic_data ll_privacy_add_device_4 = { static const struct generic_data ll_privacy_add_device_5 = { .setup_settings = settings_le_privacy_ll_privacy, + .setup_limited_priv = true, .setup_exp_feat_param = set_exp_feat_param_ll_privacy, .send_opcode = MGMT_OP_ADD_DEVICE, .send_param = add_device_le_public_param_2, -- 2.31.1