From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] mgmt-tester: Enable Kernel Debug Experimental Feature
Date: Mon, 14 Jun 2021 10:46:25 -0700 [thread overview]
Message-ID: <20210614174625.1259675-1-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attempts to enable Kernel Debug Experimental Feature if debug is
enabled.
---
tools/mgmt-tester.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 52cd19a36..fe39506f6 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -308,6 +308,32 @@ struct generic_data {
uint8_t adv_data_len;
};
+static const uint8_t set_exp_feat_param_debug[] = {
+ 0x1c, 0xda, 0x47, 0x1c, 0x48, 0x6c, 0x01, 0xab, /* UUID - Debug */
+ 0x9f, 0x46, 0xec, 0xb9, 0x30, 0x25, 0x99, 0xd4,
+ 0x01, /* Action - enable */
+};
+
+static void debug_exp_callback(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ if (status != MGMT_STATUS_SUCCESS) {
+ tester_print("Debug feature could not be enabled");
+ return;
+ }
+
+ tester_print("Debug feature is enabled");
+}
+
+static void debup_exp_feature(struct test_data *data)
+{
+ tester_print("Enabling Debug feature");
+
+ mgmt_send(data->mgmt, MGMT_OP_SET_EXP_FEATURE, MGMT_INDEX_NONE,
+ sizeof(set_exp_feat_param_debug), set_exp_feat_param_debug,
+ debug_exp_callback, NULL, NULL);
+}
+
static void read_index_list_callback(uint8_t status, uint16_t length,
const void *param, void *user_data)
{
@@ -365,6 +391,7 @@ static void test_pre_setup(const void *test_data)
if (tester_use_debug()) {
mgmt_set_debug(data->mgmt, print_debug, "mgmt: ", NULL);
mgmt_set_debug(data->mgmt_alt, print_debug, "mgmt-alt: ", NULL);
+ debup_exp_feature(data);
}
mgmt_send(data->mgmt, MGMT_OP_READ_VERSION, MGMT_INDEX_NONE, 0, NULL,
--
2.31.1
next reply other threads:[~2021-06-14 17:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 17:46 Luiz Augusto von Dentz [this message]
2021-06-14 18:12 ` [BlueZ] mgmt-tester: Enable Kernel Debug Experimental Feature bluez.test.bot
2021-06-14 21:48 ` Luiz Augusto von Dentz
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=20210614174625.1259675-1-luiz.dentz@gmail.com \
--to=luiz.dentz@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).