All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Sathish Narasimman <sathish.narasimman@intel.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Chethan T N <chethan.tumkur.narayan@intel.com>,
	"Srivatsa, Ravishankar" <ravishankar.srivatsa@intel.com>
Subject: Re: [Bluez PATCH] btmgmt: Add support to enable LL privacy
Date: Tue, 6 Apr 2021 10:00:56 +0200	[thread overview]
Message-ID: <588F99C8-E5B4-47D3-84C3-72F9E6FCC9EC@holtmann.org> (raw)
In-Reply-To: <CABBYNZLTU1t=UEsvxsu8F0kP8f5-Nvi_Xysy8ftg57j9Snu99w@mail.gmail.com>

Hi Luiz,

>> If the Bluetooth controller supports LL privacy this command will be
>> used to test the same.
>> "sudo btmgmt power off"
>> "sudo btmgmt llprivacy on"
>> "sudo btmgmt power on"
>> 
>> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
>> ---
>> tools/btmgmt.c | 38 ++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 38 insertions(+)
>> 
>> diff --git a/tools/btmgmt.c b/tools/btmgmt.c
>> index 93d244ff8ec8..4a53c3768fe9 100644
>> --- a/tools/btmgmt.c
>> +++ b/tools/btmgmt.c
>> @@ -2261,6 +2261,42 @@ static void cmd_bredr(int argc, char **argv)
>>        cmd_setting(MGMT_OP_SET_BREDR, argc, argv);
>> }
>> 
>> +static void ll_rpa_resoln_rsp(uint8_t status, uint16_t len, const void *param,
>> +                             void *user_data)
>> +{
>> +       if (status != 0)
>> +               error("Could not set LL RPA resolution with status 0x%02x (%s)",
>> +                     status, mgmt_errstr(status));
>> +       else
>> +               print("LL RPA Resolution successfully set");
>> +
>> +       bt_shell_noninteractive_quit(EXIT_SUCCESS);
>> +}
>> +
>> +static void cmd_set_ll_rpa_resoln(int argc, char **argv)
>> +{
>> +       /* 15c0a148-c273-11ea-b3de-0242ac130004 */
>> +       static const uint8_t rpa_resolution_uuid[16] = {
>> +                               0x04, 0x00, 0x13, 0xac, 0x42, 0x02, 0xde, 0xb3,
>> +                               0xea, 0x11, 0x73, 0xc2, 0x48, 0xa1, 0xc0, 0x15,
>> +       };
>> +       struct mgmt_cp_set_exp_feature cp;
>> +       uint16_t index;
>> +
>> +       memset(&cp, 0, sizeof(cp));
>> +       memcpy(cp.uuid, rpa_resolution_uuid, 16);
>> +
>> +       index = mgmt_index;
>> +       if (index == MGMT_INDEX_NONE)
>> +               index = 0;
>> +
>> +       if (parse_setting(argc, argv, &cp.action) == false)
>> +               return bt_shell_noninteractive_quit(EXIT_FAILURE);
>> +
>> +       mgmt_send(mgmt, MGMT_OP_SET_EXP_FEATURE, index,
>> +                 sizeof(cp), &cp, ll_rpa_resoln_rsp, NULL, NULL);
>> +}
>> +
>> static void cmd_privacy(int argc, char **argv)
>> {
>>        struct mgmt_cp_set_privacy cp;
>> @@ -5243,6 +5279,8 @@ static const struct bt_shell_menu main_menu = {
>>                cmd_bredr,              "Toggle BR/EDR support",        },
>>        { "privacy",            "<on/off>",
>>                cmd_privacy,            "Toggle privacy support"        },
>> +       { "llprivacy",          "<on/off>",
>> +               cmd_set_ll_rpa_resoln,  "Toggle LL privacy support"     },
> 
> Let's have it as a parameter of privacy command <on/off/ll> so when a
> user enters ll it enables link-layer privacy.

please don’t. The privacy setting means that we start using RPAs.

Also what is wrong with exp-privacy command that I already added.

Regards

Marcel


  reply	other threads:[~2021-04-06  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 14:58 [Bluez PATCH] btmgmt: Add support to enable LL privacy Sathish Narasimman
2021-04-05 15:42 ` [Bluez] " bluez.test.bot
2021-04-06  3:08 ` [Bluez PATCH] " Luiz Augusto von Dentz
2021-04-06  8:00   ` Marcel Holtmann [this message]
2021-04-14  5:13     ` Narasimman, Sathish
2021-04-14 10:06       ` Marcel Holtmann
2021-04-14 11:14         ` Narasimman, Sathish

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=588F99C8-E5B4-47D3-84C3-72F9E6FCC9EC@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=ravishankar.srivatsa@intel.com \
    --cc=sathish.narasimman@intel.com \
    /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 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.