2023-03-16 07:12:12

by Yun-hao Chung

[permalink] [raw]
Subject: [PATCH v1] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command

From: howardchung <[email protected]>

The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
length argumenent. This patch adds right the field.

Reviewed-by: Archie Pusaka <[email protected]>
Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
Signed-off-by: howardchung <[email protected]>
---

net/bluetooth/mgmt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 39589f864ea7..249dc6777fb4 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -9357,7 +9357,8 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
{ add_ext_adv_data, MGMT_ADD_EXT_ADV_DATA_SIZE,
HCI_MGMT_VAR_LEN },
{ add_adv_patterns_monitor_rssi,
- MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE },
+ MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE,
+ HCI_MGMT_VAR_LEN },
{ set_mesh, MGMT_SET_MESH_RECEIVER_SIZE,
HCI_MGMT_VAR_LEN },
{ mesh_features, MGMT_MESH_READ_FEATURES_SIZE },
--
2.40.0.rc2.332.ga46443480c-goog



2023-03-16 09:47:30

by Paul Menzel

[permalink] [raw]
Subject: Re: [PATCH v1] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command

Dear Howard,


Thank you for your patch.

Am 16.03.23 um 08:10 schrieb Howard Chung:
> From: howardchung <[email protected]>

Please configure your full name:

git config --global user.name "Howard Chung"
git commit -s --amend --author="Howard Chung <[email protected]>"

> The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
> length argumenent. This patch adds right the field.

argument

Were you seeing actual problems? If so, please describe the test setup.

> Reviewed-by: Archie Pusaka <[email protected]>
> Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
> Signed-off-by: howardchung <[email protected]>
> ---
>
> net/bluetooth/mgmt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 39589f864ea7..249dc6777fb4 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -9357,7 +9357,8 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
> { add_ext_adv_data, MGMT_ADD_EXT_ADV_DATA_SIZE,
> HCI_MGMT_VAR_LEN },
> { add_adv_patterns_monitor_rssi,
> - MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE },
> + MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE,
> + HCI_MGMT_VAR_LEN },
> { set_mesh, MGMT_SET_MESH_RECEIVER_SIZE,
> HCI_MGMT_VAR_LEN },
> { mesh_features, MGMT_MESH_READ_FEATURES_SIZE },

Acked-by: Paul Menzel <[email protected]>


Kind regards,

Paul

2023-03-16 09:55:26

by Yun-hao Chung

[permalink] [raw]
Subject: Re: [PATCH v1] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command

Thanks for the reply!
A new patch has been sent.
Please take a look when available.

Thanks,
Howard


On Thu, Mar 16, 2023 at 5:47 PM Paul Menzel <[email protected]> wrote:
>
> Dear Howard,
>
>
> Thank you for your patch.
>
> Am 16.03.23 um 08:10 schrieb Howard Chung:
> > From: howardchung <[email protected]>
>
> Please configure your full name:
>
> git config --global user.name "Howard Chung"
> git commit -s --amend --author="Howard Chung <[email protected]>"
>
> > The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
> > length argumenent. This patch adds right the field.
>
> argument
>
> Were you seeing actual problems? If so, please describe the test setup.
>
> > Reviewed-by: Archie Pusaka <[email protected]>
> > Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
> > Signed-off-by: howardchung <[email protected]>
> > ---
> >
> > net/bluetooth/mgmt.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> > index 39589f864ea7..249dc6777fb4 100644
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -9357,7 +9357,8 @@ static const struct hci_mgmt_handler mgmt_handlers[] = {
> > { add_ext_adv_data, MGMT_ADD_EXT_ADV_DATA_SIZE,
> > HCI_MGMT_VAR_LEN },
> > { add_adv_patterns_monitor_rssi,
> > - MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE },
> > + MGMT_ADD_ADV_PATTERNS_MONITOR_RSSI_SIZE,
> > + HCI_MGMT_VAR_LEN },
> > { set_mesh, MGMT_SET_MESH_RECEIVER_SIZE,
> > HCI_MGMT_VAR_LEN },
> > { mesh_features, MGMT_MESH_READ_FEATURES_SIZE },
>
> Acked-by: Paul Menzel <[email protected]>
>
>
> Kind regards,
>
> Paul