All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mgmt: Set offload codec mgmt feature
@ 2021-08-15  0:15 Kiran K
  2021-08-15  1:26 ` bluez.test.bot
  2021-08-16 21:59 ` [PATCH] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 5+ messages in thread
From: Kiran K @ 2021-08-15  0:15 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.von.dentz, Kiran K

Signed-off-by: Kiran K <kiran.k@intel.com>
---
 tools/btmgmt.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 7d908238156d..c5f55ae1290c 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -2554,6 +2554,48 @@ static void cmd_privacy(int argc, char **argv)
 	}
 }
 
+static void exp_offload_rsp(uint8_t status, uint16_t len, const void *param,
+							void *user_data)
+{
+	if (status != 0)
+		error("Set offload codec feature failed with status 0x%02x (%s)",
+						status, mgmt_errstr(status));
+	else
+		print("Offload codec feature successfully set");
+
+	bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
+static void cmd_exp_offload_codecs(int argc, char **argv)
+{
+	/* a6695ace-ee7f-4fb9-881a-5fac66c629af */
+	static const uint8_t uuid[16] = {
+				0xaf, 0x29, 0xc6, 0x66, 0xac, 0x5f, 0x1a, 0x88,
+				0xb9, 0x4f, 0x7f, 0xee, 0xce, 0x5a, 0x69, 0xa6,
+	};
+
+	struct mgmt_cp_set_exp_feature cp;
+	uint8_t val;
+	uint16_t index;
+
+	if (parse_setting(argc, argv, &val) == false)
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+
+	index = mgmt_index;
+	if (index == MGMT_INDEX_NONE)
+		index = 0;
+
+	memset(&cp, 0, sizeof(cp));
+	memcpy(cp.uuid, uuid, 16);
+	cp.action = val;
+
+	if (mgmt_send(mgmt, MGMT_OP_SET_EXP_FEATURE, index,
+			sizeof(cp), &cp, exp_offload_rsp, NULL, NULL) == 0) {
+		error("Unable to send offload codecs feature cmd");
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+	}
+}
+
 static void class_rsp(uint16_t op, uint16_t id, uint8_t status, uint16_t len,
 							const void *param)
 {
@@ -5595,6 +5637,8 @@ static const struct bt_shell_menu main_menu = {
 		cmd_exp_privacy,	"Set LL privacy feature"	},
 	{ "exp-quality",	"<on/off>", cmd_exp_quality,
 		"Set bluetooth quality report feature"			},
+	{ "exp-offload",		"<on/off>",
+		cmd_exp_offload_codecs,	"Toggle codec support support"	},
 	{ "read-sysconfig",	NULL,
 		cmd_read_sysconfig,	"Read System Configuration"	},
 	{ "set-sysconfig",	"<-v|-h> [options...]",
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: mgmt: Set offload codec mgmt feature
  2021-08-15  0:15 [PATCH] mgmt: Set offload codec mgmt feature Kiran K
@ 2021-08-15  1:26 ` bluez.test.bot
  2021-08-16 21:56   ` Luiz Augusto von Dentz
  2021-08-16 21:59 ` [PATCH] " Luiz Augusto von Dentz
  1 sibling, 1 reply; 5+ messages in thread
From: bluez.test.bot @ 2021-08-15  1:26 UTC (permalink / raw)
  To: linux-bluetooth, kiran.k

[-- Attachment #1: Type: text/plain, Size: 2732 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=531599

---Test result---

Test Summary:
CheckPatch                    FAIL      0.33 seconds
GitLint                       PASS      0.13 seconds
Prep - Setup ELL              PASS      49.03 seconds
Build - Prep                  PASS      0.11 seconds
Build - Configure             PASS      8.66 seconds
Build - Make                  PASS      212.24 seconds
Make Check                    PASS      9.79 seconds
Make Distcheck                PASS      250.51 seconds
Build w/ext ELL - Configure   PASS      8.76 seconds
Build w/ext ELL - Make        PASS      199.76 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
mgmt: Set offload codec mgmt feature
WARNING:LONG_LINE_STRING: line length of 81 exceeds 80 columns
#20: FILE: tools/btmgmt.c:2561:
+		error("Set offload codec feature failed with status 0x%02x (%s)",

- total: 0 errors, 1 warnings, 56 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] mgmt: Set offload codec mgmt feature" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mgmt: Set offload codec mgmt feature
  2021-08-15  1:26 ` bluez.test.bot
@ 2021-08-16 21:56   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-08-16 21:56 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Kiran K

Hi Kiran,

On Sat, Aug 14, 2021 at 6:31 PM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=531599
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    FAIL      0.33 seconds
> GitLint                       PASS      0.13 seconds
> Prep - Setup ELL              PASS      49.03 seconds
> Build - Prep                  PASS      0.11 seconds
> Build - Configure             PASS      8.66 seconds
> Build - Make                  PASS      212.24 seconds
> Make Check                    PASS      9.79 seconds
> Make Distcheck                PASS      250.51 seconds
> Build w/ext ELL - Configure   PASS      8.76 seconds
> Build w/ext ELL - Make        PASS      199.76 seconds
>
> Details
> ##############################
> Test: CheckPatch - FAIL
> Desc: Run checkpatch.pl script with rule in .checkpatch.conf
> Output:
> mgmt: Set offload codec mgmt feature
> WARNING:LONG_LINE_STRING: line length of 81 exceeds 80 columns
> #20: FILE: tools/btmgmt.c:2561:
> +               error("Set offload codec feature failed with status 0x%02x (%s)",

This will need to be fixed.

> - total: 0 errors, 1 warnings, 56 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
>       mechanically convert to the typical style using --fix or --fix-inplace.
>
> "[PATCH] mgmt: Set offload codec mgmt feature" has style problems, please review.
>
> NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
>
> NOTE: If any of the errors are false positives, please report
>       them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
>
> ##############################
> Test: GitLint - PASS
> Desc: Run gitlint with rule in .gitlint
>
> ##############################
> Test: Prep - Setup ELL - PASS
> Desc: Clone, build, and install ELL
>
> ##############################
> Test: Build - Prep - PASS
> Desc: Prepare environment for build
>
> ##############################
> Test: Build - Configure - PASS
> Desc: Configure the BlueZ source tree
>
> ##############################
> Test: Build - Make - PASS
> Desc: Build the BlueZ source tree
>
> ##############################
> Test: Make Check - PASS
> Desc: Run 'make check'
>
> ##############################
> Test: Make Distcheck - PASS
> Desc: Run distcheck to check the distribution
>
> ##############################
> Test: Build w/ext ELL - Configure - PASS
> Desc: Configure BlueZ source with '--enable-external-ell' configuration
>
> ##############################
> Test: Build w/ext ELL - Make - PASS
> Desc: Build BlueZ source with '--enable-external-ell' configuration
>
>
>
> ---
> Regards,
> Linux Bluetooth
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mgmt: Set offload codec mgmt feature
  2021-08-15  0:15 [PATCH] mgmt: Set offload codec mgmt feature Kiran K
  2021-08-15  1:26 ` bluez.test.bot
@ 2021-08-16 21:59 ` Luiz Augusto von Dentz
  2021-08-17  3:04   ` K, Kiran
  1 sibling, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-08-16 21:59 UTC (permalink / raw)
  To: Kiran K; +Cc: linux-bluetooth, Luiz Augusto Von Dentz

Hi Kiran,

On Sat, Aug 14, 2021 at 5:13 PM Kiran K <kiran.k@intel.com> wrote:
>
> Signed-off-by: Kiran K <kiran.k@intel.com>

We don't use Signed-off-by on userspace patches.

> ---
>  tools/btmgmt.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>
> diff --git a/tools/btmgmt.c b/tools/btmgmt.c
> index 7d908238156d..c5f55ae1290c 100644
> --- a/tools/btmgmt.c
> +++ b/tools/btmgmt.c
> @@ -2554,6 +2554,48 @@ static void cmd_privacy(int argc, char **argv)
>         }
>  }
>
> +static void exp_offload_rsp(uint8_t status, uint16_t len, const void *param,
> +                                                       void *user_data)
> +{
> +       if (status != 0)
> +               error("Set offload codec feature failed with status 0x%02x (%s)",
> +                                               status, mgmt_errstr(status));
> +       else
> +               print("Offload codec feature successfully set");
> +
> +       bt_shell_noninteractive_quit(EXIT_SUCCESS);
> +}
> +
> +static void cmd_exp_offload_codecs(int argc, char **argv)
> +{
> +       /* a6695ace-ee7f-4fb9-881a-5fac66c629af */
> +       static const uint8_t uuid[16] = {
> +                               0xaf, 0x29, 0xc6, 0x66, 0xac, 0x5f, 0x1a, 0x88,
> +                               0xb9, 0x4f, 0x7f, 0xee, 0xce, 0x5a, 0x69, 0xa6,
> +       };

This also should be added to src/shared/util.c:uuid128_table so we are
able to decode it when using the likes of btmon and bluetoothctl.

> +       struct mgmt_cp_set_exp_feature cp;
> +       uint8_t val;
> +       uint16_t index;
> +
> +       if (parse_setting(argc, argv, &val) == false)
> +               return bt_shell_noninteractive_quit(EXIT_FAILURE);
> +
> +       index = mgmt_index;
> +       if (index == MGMT_INDEX_NONE)
> +               index = 0;
> +
> +       memset(&cp, 0, sizeof(cp));
> +       memcpy(cp.uuid, uuid, 16);
> +       cp.action = val;
> +
> +       if (mgmt_send(mgmt, MGMT_OP_SET_EXP_FEATURE, index,
> +                       sizeof(cp), &cp, exp_offload_rsp, NULL, NULL) == 0) {
> +               error("Unable to send offload codecs feature cmd");
> +               return bt_shell_noninteractive_quit(EXIT_FAILURE);
> +       }
> +}
> +
>  static void class_rsp(uint16_t op, uint16_t id, uint8_t status, uint16_t len,
>                                                         const void *param)
>  {
> @@ -5595,6 +5637,8 @@ static const struct bt_shell_menu main_menu = {
>                 cmd_exp_privacy,        "Set LL privacy feature"        },
>         { "exp-quality",        "<on/off>", cmd_exp_quality,
>                 "Set bluetooth quality report feature"                  },
> +       { "exp-offload",                "<on/off>",
> +               cmd_exp_offload_codecs, "Toggle codec support support"  },
>         { "read-sysconfig",     NULL,
>                 cmd_read_sysconfig,     "Read System Configuration"     },
>         { "set-sysconfig",      "<-v|-h> [options...]",
> --
> 2.17.1
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] mgmt: Set offload codec mgmt feature
  2021-08-16 21:59 ` [PATCH] " Luiz Augusto von Dentz
@ 2021-08-17  3:04   ` K, Kiran
  0 siblings, 0 replies; 5+ messages in thread
From: K, Kiran @ 2021-08-17  3:04 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth, Von Dentz, Luiz

Hi Luiz,

I will send an updated patch addressing your comments.

> -----Original Message-----
> From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Sent: Tuesday, August 17, 2021 3:30 AM
> To: K, Kiran <kiran.k@intel.com>
> Cc: linux-bluetooth@vger.kernel.org; Von Dentz, Luiz
> <luiz.von.dentz@intel.com>
> Subject: Re: [PATCH] mgmt: Set offload codec mgmt feature
> 
> Hi Kiran,
> 
> On Sat, Aug 14, 2021 at 5:13 PM Kiran K <kiran.k@intel.com> wrote:
> >
> > Signed-off-by: Kiran K <kiran.k@intel.com>
> 
> We don't use Signed-off-by on userspace patches.
> 
> > ---
> >  tools/btmgmt.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 44 insertions(+)
> >
> > diff --git a/tools/btmgmt.c b/tools/btmgmt.c index
> > 7d908238156d..c5f55ae1290c 100644
> > --- a/tools/btmgmt.c
> > +++ b/tools/btmgmt.c
> > @@ -2554,6 +2554,48 @@ static void cmd_privacy(int argc, char **argv)
> >         }
> >  }
> >
> > +static void exp_offload_rsp(uint8_t status, uint16_t len, const void
> *param,
> > +                                                       void
> > +*user_data) {
> > +       if (status != 0)
> > +               error("Set offload codec feature failed with status 0x%02x (%s)",
> > +                                               status, mgmt_errstr(status));
> > +       else
> > +               print("Offload codec feature successfully set");
> > +
> > +       bt_shell_noninteractive_quit(EXIT_SUCCESS);
> > +}
> > +
> > +static void cmd_exp_offload_codecs(int argc, char **argv) {
> > +       /* a6695ace-ee7f-4fb9-881a-5fac66c629af */
> > +       static const uint8_t uuid[16] = {
> > +                               0xaf, 0x29, 0xc6, 0x66, 0xac, 0x5f, 0x1a, 0x88,
> > +                               0xb9, 0x4f, 0x7f, 0xee, 0xce, 0x5a, 0x69, 0xa6,
> > +       };
> 
> This also should be added to src/shared/util.c:uuid128_table so we are able
> to decode it when using the likes of btmon and bluetoothctl.
> 
> > +       struct mgmt_cp_set_exp_feature cp;
> > +       uint8_t val;
> > +       uint16_t index;
> > +
> > +       if (parse_setting(argc, argv, &val) == false)
> > +               return bt_shell_noninteractive_quit(EXIT_FAILURE);
> > +
> > +       index = mgmt_index;
> > +       if (index == MGMT_INDEX_NONE)
> > +               index = 0;
> > +
> > +       memset(&cp, 0, sizeof(cp));
> > +       memcpy(cp.uuid, uuid, 16);
> > +       cp.action = val;
> > +
> > +       if (mgmt_send(mgmt, MGMT_OP_SET_EXP_FEATURE, index,
> > +                       sizeof(cp), &cp, exp_offload_rsp, NULL, NULL) == 0) {
> > +               error("Unable to send offload codecs feature cmd");
> > +               return bt_shell_noninteractive_quit(EXIT_FAILURE);
> > +       }
> > +}
> > +
> >  static void class_rsp(uint16_t op, uint16_t id, uint8_t status, uint16_t len,
> >                                                         const void
> > *param)  { @@ -5595,6 +5637,8 @@ static const struct bt_shell_menu
> > main_menu = {
> >                 cmd_exp_privacy,        "Set LL privacy feature"        },
> >         { "exp-quality",        "<on/off>", cmd_exp_quality,
> >                 "Set bluetooth quality report feature"                  },
> > +       { "exp-offload",                "<on/off>",
> > +               cmd_exp_offload_codecs, "Toggle codec support support"
> > + },
> >         { "read-sysconfig",     NULL,
> >                 cmd_read_sysconfig,     "Read System Configuration"     },
> >         { "set-sysconfig",      "<-v|-h> [options...]",
> > --
> > 2.17.1
> >
> 
> 
> --
> Luiz Augusto von Dentz

Thanks,
Kiran


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-17  3:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-15  0:15 [PATCH] mgmt: Set offload codec mgmt feature Kiran K
2021-08-15  1:26 ` bluez.test.bot
2021-08-16 21:56   ` Luiz Augusto von Dentz
2021-08-16 21:59 ` [PATCH] " Luiz Augusto von Dentz
2021-08-17  3:04   ` K, Kiran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.