* [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend
@ 2024-01-05 16:10 Luiz Augusto von Dentz
2024-01-06 9:50 ` Paul Menzel
2024-01-08 18:00 ` patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-01-05 16:10 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
During suspend, only wakeable devices can be in acceptlist, so if the
device was previously added it needs to be removed otherwise the can end
up waking up the system prematurely.
Fixes: 3b42055388c3 ("Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan")
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/hci_sync.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index b3141e3f9cf6..5716345a26df 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2206,8 +2206,11 @@ static int hci_le_add_accept_list_sync(struct hci_dev *hdev,
/* During suspend, only wakeable devices can be in acceptlist */
if (hdev->suspended &&
- !(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP))
+ !(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP)) {
+ hci_le_del_accept_list_sync(hdev, ¶ms->addr,
+ params->addr_type);
return 0;
+ }
/* Select filter policy to accept all advertising */
if (*num_entries >= hdev->le_accept_list_size)
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend
2024-01-05 16:10 [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend Luiz Augusto von Dentz
@ 2024-01-06 9:50 ` Paul Menzel
2024-01-08 18:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2024-01-06 9:50 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: Clancy Shang, linux-bluetooth
Dear Luiz,
Thank you for your patch.
Am 05.01.24 um 17:10 schrieb Luiz Augusto von Dentz:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> During suspend, only wakeable devices can be in acceptlist, so if the
> device was previously added it needs to be removed otherwise the can end
… the *device* can?
> up waking up the system prematurely.
>
> Fixes: 3b42055388c3 ("Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan")
> Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
> net/bluetooth/hci_sync.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index b3141e3f9cf6..5716345a26df 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -2206,8 +2206,11 @@ static int hci_le_add_accept_list_sync(struct hci_dev *hdev,
>
> /* During suspend, only wakeable devices can be in acceptlist */
> if (hdev->suspended &&
> - !(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP))
> + !(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP)) {
> + hci_le_del_accept_list_sync(hdev, ¶ms->addr,
> + params->addr_type);
> return 0;
> + }
>
> /* Select filter policy to accept all advertising */
> if (*num_entries >= hdev->le_accept_list_size)
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend
2024-01-05 16:10 [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend Luiz Augusto von Dentz
2024-01-06 9:50 ` Paul Menzel
@ 2024-01-08 18:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-01-08 18:00 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 5 Jan 2024 11:10:42 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> During suspend, only wakeable devices can be in acceptlist, so if the
> device was previously added it needs to be removed otherwise the can end
> up waking up the system prematurely.
>
> Fixes: 3b42055388c3 ("Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan")
> Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> [...]
Here is the summary with links:
- [v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend
https://git.kernel.org/bluetooth/bluetooth-next/c/0bcd317e8b31
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:[~2024-01-08 18:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 16:10 [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend Luiz Augusto von Dentz
2024-01-06 9:50 ` Paul Menzel
2024-01-08 18:00 ` 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).