From: Tedd Ho-Jeong An <hj.tedd.an@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [BlueZ PATCH 4/4] tools/mgmt-tester: Add support for experimental feature in setup
Date: Mon, 25 Oct 2021 13:31:20 -0700 [thread overview]
Message-ID: <20211025203120.513189-4-hj.tedd.an@gmail.com> (raw)
In-Reply-To: <20211025203120.513189-1-hj.tedd.an@gmail.com>
From: Tedd Ho-Jeong An <tedd.an@intel.com>
This patch adds support for experimental feature in setup_settings
options.
---
tools/mgmt-tester.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index f490dc261..1ccce0ad6 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -260,6 +260,7 @@ struct generic_data {
const uint16_t *setup_settings;
bool setup_nobredr;
bool setup_limited_discov;
+ const void *setup_exp_feat_param;
uint16_t setup_expect_hci_command;
const void *setup_expect_hci_param;
uint8_t setup_expect_hci_len;
@@ -7222,6 +7223,7 @@ proceed:
unsigned char privacy_param[] = { 0x01,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
+ unsigned char set_exp_feat_param[17] = { 0x00 };
unsigned char *param = simple_param;
size_t param_size = sizeof(simple_param);
mgmt_request_func_t func = NULL;
@@ -7250,14 +7252,30 @@ proceed:
memcpy(param, test->setup_discovery_param, 1);
}
+ if (*cmd == MGMT_OP_SET_EXP_FEATURE) {
+ if (test->setup_exp_feat_param) {
+ memcpy(set_exp_feat_param,
+ test->setup_exp_feat_param, 17);
+ param_size = sizeof(set_exp_feat_param);
+ param = set_exp_feat_param;
+ }
+ }
+
if (*cmd == MGMT_OP_SET_LE && test->setup_nobredr) {
unsigned char off[] = { 0x00 };
+ tester_print("Setup sending %s (0x%04x)",
+ mgmt_opstr(*cmd), *cmd);
mgmt_send(data->mgmt, *cmd, data->mgmt_index,
param_size, param, NULL, NULL, NULL);
+ tester_print("Setup sending %s (0x%04x)",
+ mgmt_opstr(MGMT_OP_SET_BREDR),
+ MGMT_OP_SET_BREDR);
mgmt_send(data->mgmt, MGMT_OP_SET_BREDR,
data->mgmt_index, sizeof(off), off,
func, data, NULL);
} else {
+ tester_print("Setup sending %s (0x%04x)",
+ mgmt_opstr(*cmd), *cmd);
mgmt_send(data->mgmt, *cmd, data->mgmt_index,
param_size, param, func, data, NULL);
}
--
2.25.1
next prev parent reply other threads:[~2021-10-25 20:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 20:31 [BlueZ PATCH 1/4] emulator: Add support to config the accept and resolve list Tedd Ho-Jeong An
2021-10-25 20:31 ` [BlueZ PATCH 2/4] emulator: bthost: Add support LE Ext Adv Report Tedd Ho-Jeong An
2021-10-25 20:31 ` [BlueZ PATCH 3/4] emulator: Add support to get the advertising address Tedd Ho-Jeong An
2021-10-25 20:31 ` Tedd Ho-Jeong An [this message]
2021-10-25 20:44 ` [BlueZ PATCH 1/4] emulator: Add support to config the accept and resolve list Luiz Augusto von Dentz
-- strict thread matches above, loose matches on Subject: below --
2021-10-25 4:47 Tedd Ho-Jeong An
2021-10-25 4:47 ` [BlueZ PATCH 4/4] tools/mgmt-tester: Add support for experimental feature in setup Tedd Ho-Jeong An
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211025203120.513189-4-hj.tedd.an@gmail.com \
--to=hj.tedd.an@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).