Linux bluetooth development
 help / color / mirror / Atom feed
From: Cheng Jiang <cheng.jiang@oss.qualcomm.com>
To: linux-bluetooth@vger.kernel.org
Cc: jinwang.li@oss.qualcomm.com, wei.deng@oss.qualcomm.com,
	xiuzhuo.shang@oss.qualcomm.com, shuai.zhang@oss.qualcomm.com,
	Cheng Jiang <cheng.jiang@oss.qualcomm.com>
Subject: [PATCH v2 03/14] unit: Take the ATT opcode in the notify callbacks
Date: Fri,  9 Oct 2026 17:25:19 +0800	[thread overview]
Message-ID: <20261009092532.3600749-4-cheng.jiang@oss.qualcomm.com> (raw)
In-Reply-To: <20261009092532.3600749-1-cheng.jiang@oss.qualcomm.com>

gatt_db_notify_t now passes the opcode of the operation it is serving.
Update the test callbacks to match; none of them needs to look at it.

Assisted-by: Claude:claude-opus-4.8
---
 unit/test-bap.c  | 3 ++-
 unit/test-bass.c | 3 ++-
 unit/test-mcp.c  | 3 ++-
 unit/test-micp.c | 3 ++-
 unit/test-rap.c  | 3 ++-
 unit/test-vcp.c  | 3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/unit/test-bap.c b/unit/test-bap.c
index 4e89ba6af..d16fbd96c 100644
--- a/unit/test-bap.c
+++ b/unit/test-bap.c
@@ -637,7 +637,8 @@ static struct ccc_state *get_ccc_state(struct test_data *data,
 static void gatt_notify_cb(struct gatt_db_attribute *attrib,
 					struct gatt_db_attribute *ccc,
 					const uint8_t *value, size_t len,
-					struct bt_att *att, void *user_data)
+					uint8_t opcode, struct bt_att *att,
+					void *user_data)
 {
 	struct test_data *data = user_data;
 	uint16_t handle = gatt_db_attribute_get_handle(attrib);
diff --git a/unit/test-bass.c b/unit/test-bass.c
index 0cdee043e..302501249 100644
--- a/unit/test-bass.c
+++ b/unit/test-bass.c
@@ -625,7 +625,8 @@ done:
 static void gatt_notify_cb(struct gatt_db_attribute *attrib,
 				struct gatt_db_attribute *ccc,
 				const uint8_t *value, size_t len,
-				struct bt_att *att, void *user_data)
+				uint8_t opcode, struct bt_att *att,
+				void *user_data)
 {
 	struct test_data *data = user_data;
 	struct ccc_state *ccc_state;
diff --git a/unit/test-mcp.c b/unit/test-mcp.c
index 21997915d..7ecb0d353 100644
--- a/unit/test-mcp.c
+++ b/unit/test-mcp.c
@@ -371,7 +371,8 @@ static struct ccc_state *get_ccc_state(struct test_data *data,
 static void gatt_notify_cb(struct gatt_db_attribute *attrib,
 					struct gatt_db_attribute *ccc,
 					const uint8_t *value, size_t len,
-					struct bt_att *att, void *user_data)
+					uint8_t opcode, struct bt_att *att,
+					void *user_data)
 {
 	struct test_data *data = user_data;
 	uint16_t handle = gatt_db_attribute_get_handle(attrib);
diff --git a/unit/test-micp.c b/unit/test-micp.c
index ff17300d5..1723ffa66 100644
--- a/unit/test-micp.c
+++ b/unit/test-micp.c
@@ -222,7 +222,8 @@ static struct ccc_state *get_ccc_state(struct test_data_mics *data,
 static void gatt_notify_cb(struct gatt_db_attribute *attrib,
 					struct gatt_db_attribute *ccc,
 					const uint8_t *value, size_t len,
-					struct bt_att *att, void *user_data)
+					uint8_t opcode, struct bt_att *att,
+					void *user_data)
 {
 	struct test_data_mics *data = user_data;
 	struct notify notify;
diff --git a/unit/test-rap.c b/unit/test-rap.c
index d7da2ff45..8e2759654 100644
--- a/unit/test-rap.c
+++ b/unit/test-rap.c
@@ -153,7 +153,8 @@ static struct ccc_state *get_ccc_state(struct test_data_ras *data,
 static void gatt_notify_cb(struct gatt_db_attribute *attrib,
 					struct gatt_db_attribute *ccc,
 					const uint8_t *value, size_t len,
-					struct bt_att *att, void *user_data)
+					uint8_t opcode, struct bt_att *att,
+					void *user_data)
 {
 	struct test_data_ras *data = user_data;
 	struct notify notify;
diff --git a/unit/test-vcp.c b/unit/test-vcp.c
index 4a60842e5..4ec4da428 100644
--- a/unit/test-vcp.c
+++ b/unit/test-vcp.c
@@ -127,7 +127,8 @@ static struct ccc_state *get_ccc_state(struct test_data *data,
 static void gatt_notify_cb(struct gatt_db_attribute *attrib,
 					struct gatt_db_attribute *ccc,
 					const uint8_t *value, size_t len,
-					struct bt_att *att, void *user_data)
+					uint8_t opcode, struct bt_att *att,
+					void *user_data)
 {
 	struct test_data *data = user_data;
 	uint16_t handle = gatt_db_attribute_get_handle(attrib);
-- 
2.43.0


  parent reply	other threads:[~2026-10-09  9:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  9:25 [PATCH v2 00/14] Ranging Profile and Ranging Service PTS fixes Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 01/14] shared/gatt-client: Allow registering notify with explicit CCC value Cheng Jiang
2026-10-09 15:42   ` Ranging Profile and Ranging Service PTS fixes bluez.test.bot
2026-10-09  9:25 ` [PATCH v2 02/14] shared/gatt-db: Pass the ATT opcode to the notify callback Cheng Jiang
2026-10-09  9:25 ` Cheng Jiang [this message]
2026-10-09  9:25 ` [PATCH v2 04/14] shared/gatt-db: Add gatt_db_attribute_indicate() Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 05/14] shared/rap: Honor CCCD transport for RAS on-demand ranging data Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 06/14] shared/rap: Add RAS Control Point Abort Operation Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 07/14] unit/test-rap: Expect Abort Operation in RAS Features Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 08/14] shared/rap: Shorten the requester Control Point response timeout Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 09/14] shared/rap: Add real-time ranging data delivery on the responder Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 10/14] shared/rap: Add requester ranging data subscription API Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 11/14] profiles/ranging: Expose requester ranging data mode over D-Bus Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 12/14] client: Add Channel Sounding ranging data mode control Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 13/14] doc: Document " Cheng Jiang
2026-10-09  9:25 ` [PATCH v2 14/14] doc/qualification: Add RAP/RAS PTS qualification results Cheng Jiang
2026-10-09 17:20 ` [PATCH v2 00/14] Ranging Profile and Ranging Service PTS fixes patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261009092532.3600749-4-cheng.jiang@oss.qualcomm.com \
    --to=cheng.jiang@oss.qualcomm.com \
    --cc=jinwang.li@oss.qualcomm.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=shuai.zhang@oss.qualcomm.com \
    --cc=wei.deng@oss.qualcomm.com \
    --cc=xiuzhuo.shang@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox