linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17
@ 2022-06-30  7:39 Andrew Drake
  2022-06-30  9:37 ` [BlueZ] " bluez.test.bot
  2022-07-13 21:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Drake @ 2022-06-30  7:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Andrew Drake

The existing code assumes that, if a device supports advertising monitor
offload, DEVICE_FOUND events can be ignored since the kernel will send
ADV_MONITOR_DEVICE_FOUND events instead. Unfortunately, these new events
were added in 5.18, but offload was added in 5.12. This patch adds a
check on the MGMT API version so we can process the older DEVICE_FOUND
events when the new events are not supported.

Fixes: https://github.com/bluez/bluez/issues/357
---
 src/adapter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index 16da20034..62ca42ffb 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -6909,7 +6909,9 @@ void btd_adapter_update_found_device(struct btd_adapter *adapter,
 	bool duplicate = false;
 	struct queue *matched_monitors = NULL;
 
-	if (!btd_adv_monitor_offload_enabled(adapter->adv_monitor_manager)) {
+	if (!btd_adv_monitor_offload_enabled(adapter->adv_monitor_manager) ||
+				(MGMT_VERSION(mgmt_version, mgmt_revision) <
+							MGMT_VERSION(1, 22))) {
 		if (bdaddr_type != BDADDR_BREDR)
 			ad = bt_ad_new_with_data(data_len, data);
 
-- 
2.35.3


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

* RE: [BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17
  2022-06-30  7:39 [PATCH BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17 Andrew Drake
@ 2022-06-30  9:37 ` bluez.test.bot
  2022-07-13 21:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-06-30  9:37 UTC (permalink / raw)
  To: linux-bluetooth, adrake

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

---Test result---

Test Summary:
CheckPatch                    PASS      1.45 seconds
GitLint                       PASS      1.01 seconds
Prep - Setup ELL              PASS      43.79 seconds
Build - Prep                  PASS      0.66 seconds
Build - Configure             PASS      8.75 seconds
Build - Make                  PASS      1446.34 seconds
Make Check                    PASS      11.94 seconds
Make Check w/Valgrind         PASS      451.64 seconds
Make Distcheck                PASS      238.86 seconds
Build w/ext ELL - Configure   PASS      8.74 seconds
Build w/ext ELL - Make        PASS      1428.94 seconds
Incremental Build with patchesPASS      0.00 seconds



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17
  2022-06-30  7:39 [PATCH BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17 Andrew Drake
  2022-06-30  9:37 ` [BlueZ] " bluez.test.bot
@ 2022-07-13 21:30 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-07-13 21:30 UTC (permalink / raw)
  To: Andrew Drake; +Cc: linux-bluetooth

Hello:

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

On Thu, 30 Jun 2022 00:39:58 -0700 you wrote:
> The existing code assumes that, if a device supports advertising monitor
> offload, DEVICE_FOUND events can be ignored since the kernel will send
> ADV_MONITOR_DEVICE_FOUND events instead. Unfortunately, these new events
> were added in 5.18, but offload was added in 5.12. This patch adds a
> check on the MGMT API version so we can process the older DEVICE_FOUND
> events when the new events are not supported.
> 
> [...]

Here is the summary with links:
  - [BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a69fa692b094

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] 3+ messages in thread

end of thread, other threads:[~2022-07-13 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-30  7:39 [PATCH BlueZ] adapter: Fix advertising monitor on Linux 5.12-5.17 Andrew Drake
2022-06-30  9:37 ` [BlueZ] " bluez.test.bot
2022-07-13 21:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth

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).