All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] gas: Fix reading attributes on every connection
@ 2024-06-18 19:59 Luiz Augusto von Dentz
  2024-06-18 21:42 ` [BlueZ,v1] " bluez.test.bot
  2024-06-19 14:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-06-18 19:59 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Attributes only need to be read once after that they will be persisted
by the core so there is no need to keep reading them on every
reconnection.
---
 profiles/gap/gas.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/profiles/gap/gas.c b/profiles/gap/gas.c
index dbe5f003bfba..08aaf19cb332 100644
--- a/profiles/gap/gas.c
+++ b/profiles/gap/gas.c
@@ -342,6 +342,10 @@ static int gap_accept(struct btd_service *service)
 		goto _finish;
 	}
 
+	/* Check if attribute already has been discovered */
+	if (gas->attr)
+		goto _finish;
+
 	gas->db = gatt_db_ref(db);
 	gas->client = bt_gatt_client_clone(client);
 
@@ -364,10 +368,6 @@ _finish:
 
 static int gap_disconnect(struct btd_service *service)
 {
-	struct gas *gas = btd_service_get_user_data(service);
-
-	gas_reset(gas);
-
 	btd_service_disconnecting_complete(service, 0);
 
 	return 0;
-- 
2.45.2


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

* RE: [BlueZ,v1] gas: Fix reading attributes on every connection
  2024-06-18 19:59 [PATCH BlueZ v1] gas: Fix reading attributes on every connection Luiz Augusto von Dentz
@ 2024-06-18 21:42 ` bluez.test.bot
  2024-06-19 14:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-06-18 21:42 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       PASS      0.30 seconds
BuildEll                      PASS      25.24 seconds
BluezMake                     PASS      1704.22 seconds
MakeCheck                     PASS      13.18 seconds
MakeDistcheck                 PASS      177.53 seconds
CheckValgrind                 PASS      251.05 seconds
CheckSmatch                   PASS      354.30 seconds
bluezmakeextell               PASS      120.32 seconds
IncrementalBuild              PASS      1491.98 seconds
ScanBuild                     PASS      1009.63 seconds



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ v1] gas: Fix reading attributes on every connection
  2024-06-18 19:59 [PATCH BlueZ v1] gas: Fix reading attributes on every connection Luiz Augusto von Dentz
  2024-06-18 21:42 ` [BlueZ,v1] " bluez.test.bot
@ 2024-06-19 14:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-06-19 14:10 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

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

On Tue, 18 Jun 2024 15:59:14 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Attributes only need to be read once after that they will be persisted
> by the core so there is no need to keep reading them on every
> reconnection.
> ---
>  profiles/gap/gas.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Here is the summary with links:
  - [BlueZ,v1] gas: Fix reading attributes on every connection
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0dc5bb2ed679

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-06-19 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-18 19:59 [PATCH BlueZ v1] gas: Fix reading attributes on every connection Luiz Augusto von Dentz
2024-06-18 21:42 ` [BlueZ,v1] " bluez.test.bot
2024-06-19 14:10 ` [PATCH BlueZ v1] " 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.