All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
@ 2023-03-16 10:11 Howard Chung
  2023-03-16 10:34 ` [v3] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Howard Chung @ 2023-03-16 10:11 UTC (permalink / raw)
  To: linux-bluetooth, marcel
  Cc: chromeos-bluetooth-upstreaming, Howard Chung, Archie Pusaka,
	Brian Gix, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Johan Hedberg, Luiz Augusto von Dentz, Paolo Abeni, linux-kernel,
	netdev

The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
length argument. This causes host not able to register advmon with rssi.

This patch has been locally tested by adding monitor with rssi via
btmgmt on a kernel 6.1 machine.

Reviewed-by: Archie Pusaka <apusaka@chromium.org>
Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
Signed-off-by: Howard Chung <howardchung@google.com>
---

Changes in v3:
- Moved commit-notes to commit message
- Fixed a typo

Changes in v2:
- Fixed git user name
- Included commit notes for the test step.

 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


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

* RE: [v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
  2023-03-16 10:11 [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command Howard Chung
@ 2023-03-16 10:34 ` bluez.test.bot
  2023-03-16 17:34 ` [PATCH v3] " Luiz Augusto von Dentz
  2023-03-16 17:40 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2023-03-16 10:34 UTC (permalink / raw)
  To: linux-bluetooth, howardchung

[-- Attachment #1: Type: text/plain, Size: 1420 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=730713

---Test result---

Test Summary:
CheckPatch                    PASS      0.57 seconds
GitLint                       PASS      0.25 seconds
SubjectPrefix                 PASS      0.08 seconds
BuildKernel                   PASS      30.95 seconds
CheckAllWarning               PASS      34.51 seconds
CheckSparse                   PASS      38.78 seconds
CheckSmatch                   PASS      107.82 seconds
BuildKernel32                 PASS      30.34 seconds
TestRunnerSetup               PASS      438.31 seconds
TestRunner_l2cap-tester       PASS      16.53 seconds
TestRunner_iso-tester         PASS      16.55 seconds
TestRunner_bnep-tester        PASS      5.43 seconds
TestRunner_mgmt-tester        PASS      107.89 seconds
TestRunner_rfcomm-tester      PASS      8.51 seconds
TestRunner_sco-tester         PASS      7.92 seconds
TestRunner_ioctl-tester       PASS      9.13 seconds
TestRunner_mesh-tester        PASS      6.75 seconds
TestRunner_smp-tester         PASS      7.77 seconds
TestRunner_userchan-tester    PASS      5.58 seconds
IncrementalBuild              PASS      28.36 seconds



---
Regards,
Linux Bluetooth


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

* Re: [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
  2023-03-16 10:11 [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command Howard Chung
  2023-03-16 10:34 ` [v3] " bluez.test.bot
@ 2023-03-16 17:34 ` Luiz Augusto von Dentz
  2023-03-16 17:40 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2023-03-16 17:34 UTC (permalink / raw)
  To: Howard Chung
  Cc: linux-bluetooth, marcel, chromeos-bluetooth-upstreaming,
	Archie Pusaka, Brian Gix, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Johan Hedberg, Paolo Abeni, linux-kernel, netdev

Hi Howard,

On Thu, Mar 16, 2023 at 3:11 AM Howard Chung <howardchung@google.com> wrote:
>
> The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
> length argument. This causes host not able to register advmon with rssi.

There is a way to prevent these regression, which would be to actually
implement tests for these commands in the likes of mgmt-tester so we
can catch regressions via CI, so I hope to see some work in this
direction.

> This patch has been locally tested by adding monitor with rssi via
> btmgmt on a kernel 6.1 machine.
>
> Reviewed-by: Archie Pusaka <apusaka@chromium.org>
> Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
> Signed-off-by: Howard Chung <howardchung@google.com>
> ---
>
> Changes in v3:
> - Moved commit-notes to commit message
> - Fixed a typo
>
> Changes in v2:
> - Fixed git user name
> - Included commit notes for the test step.
>
>  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
>


-- 
Luiz Augusto von Dentz

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

* Re: [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
  2023-03-16 10:11 [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command Howard Chung
  2023-03-16 10:34 ` [v3] " bluez.test.bot
  2023-03-16 17:34 ` [PATCH v3] " Luiz Augusto von Dentz
@ 2023-03-16 17:40 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2023-03-16 17:40 UTC (permalink / raw)
  To: Howard Chung
  Cc: linux-bluetooth, marcel, chromeos-bluetooth-upstreaming, apusaka,
	brian.gix, davem, edumazet, kuba, johan.hedberg, luiz.dentz,
	pabeni, linux-kernel, netdev

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 16 Mar 2023 18:11:38 +0800 you wrote:
> The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
> length argument. This causes host not able to register advmon with rssi.
> 
> This patch has been locally tested by adding monitor with rssi via
> btmgmt on a kernel 6.1 machine.
> 
> Reviewed-by: Archie Pusaka <apusaka@chromium.org>
> Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
> Signed-off-by: Howard Chung <howardchung@google.com>
> 
> [...]

Here is the summary with links:
  - [v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
    https://git.kernel.org/bluetooth/bluetooth-next/c/8abee3773899

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-03-16 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 10:11 [PATCH v3] Bluetooth: mgmt: Fix MGMT add advmon with RSSI command Howard Chung
2023-03-16 10:34 ` [v3] " bluez.test.bot
2023-03-16 17:34 ` [PATCH v3] " Luiz Augusto von Dentz
2023-03-16 17:40 ` patchwork-bot+bluetooth

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.