All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id
@ 2025-11-12  9:48 Gongwei Li
  2025-11-12  9:48 ` [PATCH 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Gongwei Li @ 2025-11-12  9:48 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Johan Hedberg, linux-bluetooth, netdev, linux-kernel, Gongwei Li

From: Gongwei Li <ligongwei@kylinos.cn>

hcon->remote_id last use was removed in 2024 by
commit e7b02296fb40 ("Bluetooth: Remove BT_HS").

Remove it.

Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
---
 include/net/bluetooth/hci_core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index b8100dbfe5d7..32b1c08c8bba 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -749,7 +749,6 @@ struct hci_conn {
 
 	__u8		remote_cap;
 	__u8		remote_auth;
-	__u8		remote_id;
 
 	unsigned int	sent;
 
-- 
2.25.1


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

* [PATCH 2/2] Bluetooth: Process Read Remote Version evt
  2025-11-12  9:48 [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Gongwei Li
@ 2025-11-12  9:48 ` Gongwei Li
  2025-11-12  9:55   ` Paul Menzel
  2025-11-12 10:09 ` [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Paul Menzel
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Gongwei Li @ 2025-11-12  9:48 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Johan Hedberg, linux-bluetooth, netdev, linux-kernel, Gongwei Li

From: Gongwei Li <ligongwei@kylinos.cn>

Add processing for HCI Process Read Remote Version event.
Used to query the lmp version of remote devices.

Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
---
 include/net/bluetooth/hci_core.h |  1 +
 net/bluetooth/hci_event.c        | 23 +++++++++++++++++++++++
 net/bluetooth/mgmt.c             |  5 +++++
 3 files changed, 29 insertions(+)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 32b1c08c8bba..bdd5e6ef3616 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -749,6 +749,7 @@ struct hci_conn {
 
 	__u8		remote_cap;
 	__u8		remote_auth;
+	__u8		remote_ver;
 
 	unsigned int	sent;
 
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index f20c826509b6..7f8e3f8ec01e 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3737,6 +3737,26 @@ static void hci_remote_features_evt(struct hci_dev *hdev, void *data,
 	hci_dev_unlock(hdev);
 }
 
+static void hci_remote_version_evt(struct hci_dev *hdev, void *data,
+				   struct sk_buff *skb)
+{
+	struct hci_ev_remote_version *ev = (void *)skb->data;
+	struct hci_conn *conn;
+
+	BT_DBG("%s", hdev->name);
+
+	hci_dev_lock(hdev);
+
+	conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
+	if (!conn)
+		goto unlock;
+
+	conn->remote_ver = ev->lmp_ver;
+
+unlock:
+	hci_dev_unlock(hdev);
+}
+
 static inline void handle_cmd_cnt_and_timer(struct hci_dev *hdev, u8 ncmd)
 {
 	cancel_delayed_work(&hdev->cmd_timer);
@@ -7448,6 +7468,9 @@ static const struct hci_ev {
 	/* [0x0b = HCI_EV_REMOTE_FEATURES] */
 	HCI_EV(HCI_EV_REMOTE_FEATURES, hci_remote_features_evt,
 	       sizeof(struct hci_ev_remote_features)),
+	/* [0x0c = HCI_EV_REMOTE_VERSION] */
+	HCI_EV(HCI_EV_REMOTE_VERSION, hci_remote_version_evt,
+	       sizeof(struct hci_ev_remote_version)),
 	/* [0x0e = HCI_EV_CMD_COMPLETE] */
 	HCI_EV_REQ_VL(HCI_EV_CMD_COMPLETE, hci_cmd_complete_evt,
 		      sizeof(struct hci_ev_cmd_complete), HCI_MAX_EVENT_SIZE),
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 79762bfaea5f..c0bab45648f3 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -9728,6 +9728,9 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
 {
 	struct sk_buff *skb;
 	struct mgmt_ev_device_connected *ev;
+	struct hci_cp_read_remote_version cp;
+
+	memset(&cp, 0, sizeof(cp));
 	u16 eir_len = 0;
 	u32 flags = 0;
 
@@ -9774,6 +9777,8 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
 	ev->eir_len = cpu_to_le16(eir_len);
 
 	mgmt_event_skb(skb, NULL);
+
+	hci_send_cmd(hdev, HCI_OP_READ_REMOTE_VERSION, sizeof(cp), &cp);
 }
 
 static void unpair_device_rsp(struct mgmt_pending_cmd *cmd, void *data)
-- 
2.25.1


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

* Re: [PATCH 2/2] Bluetooth: Process Read Remote Version evt
  2025-11-12  9:48 ` [PATCH 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
@ 2025-11-12  9:55   ` Paul Menzel
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2025-11-12  9:55 UTC (permalink / raw)
  To: Gongwei Li
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Johan Hedberg,
	linux-bluetooth, netdev, linux-kernel, Gongwei Li

Dear Gongwei,


Thank you for your patch. I’d spell out event in the commit message 
summary/title.

Am 12.11.25 um 10:48 schrieb Gongwei Li:
> From: Gongwei Li <ligongwei@kylinos.cn>
> 
> Add processing for HCI Process Read Remote Version event.
> Used to query the lmp version of remote devices.

How did you test it?

> Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
> ---
>   include/net/bluetooth/hci_core.h |  1 +
>   net/bluetooth/hci_event.c        | 23 +++++++++++++++++++++++
>   net/bluetooth/mgmt.c             |  5 +++++
>   3 files changed, 29 insertions(+)
> 
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index 32b1c08c8bba..bdd5e6ef3616 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -749,6 +749,7 @@ struct hci_conn {
>   
>   	__u8		remote_cap;
>   	__u8		remote_auth;
> +	__u8		remote_ver;
>   
>   	unsigned int	sent;
>   
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index f20c826509b6..7f8e3f8ec01e 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -3737,6 +3737,26 @@ static void hci_remote_features_evt(struct hci_dev *hdev, void *data,
>   	hci_dev_unlock(hdev);
>   }
>   
> +static void hci_remote_version_evt(struct hci_dev *hdev, void *data,
> +				   struct sk_buff *skb)
> +{
> +	struct hci_ev_remote_version *ev = (void *)skb->data;
> +	struct hci_conn *conn;
> +
> +	BT_DBG("%s", hdev->name);
> +
> +	hci_dev_lock(hdev);
> +
> +	conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
> +	if (!conn)
> +		goto unlock;
> +
> +	conn->remote_ver = ev->lmp_ver;
> +
> +unlock:
> +	hci_dev_unlock(hdev);
> +}
> +
>   static inline void handle_cmd_cnt_and_timer(struct hci_dev *hdev, u8 ncmd)
>   {
>   	cancel_delayed_work(&hdev->cmd_timer);
> @@ -7448,6 +7468,9 @@ static const struct hci_ev {
>   	/* [0x0b = HCI_EV_REMOTE_FEATURES] */
>   	HCI_EV(HCI_EV_REMOTE_FEATURES, hci_remote_features_evt,
>   	       sizeof(struct hci_ev_remote_features)),
> +	/* [0x0c = HCI_EV_REMOTE_VERSION] */
> +	HCI_EV(HCI_EV_REMOTE_VERSION, hci_remote_version_evt,
> +	       sizeof(struct hci_ev_remote_version)),
>   	/* [0x0e = HCI_EV_CMD_COMPLETE] */
>   	HCI_EV_REQ_VL(HCI_EV_CMD_COMPLETE, hci_cmd_complete_evt,
>   		      sizeof(struct hci_ev_cmd_complete), HCI_MAX_EVENT_SIZE),
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 79762bfaea5f..c0bab45648f3 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -9728,6 +9728,9 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
>   {
>   	struct sk_buff *skb;
>   	struct mgmt_ev_device_connected *ev;
> +	struct hci_cp_read_remote_version cp;
> +
> +	memset(&cp, 0, sizeof(cp));
>   	u16 eir_len = 0;
>   	u32 flags = 0;
>   
> @@ -9774,6 +9777,8 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
>   	ev->eir_len = cpu_to_le16(eir_len);
>   
>   	mgmt_event_skb(skb, NULL);
> +
> +	hci_send_cmd(hdev, HCI_OP_READ_REMOTE_VERSION, sizeof(cp), &cp);
>   }
>   
>   static void unpair_device_rsp(struct mgmt_pending_cmd *cmd, void *data)

The diff looks good. Please feel free to add:

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

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

* Re: [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id
  2025-11-12  9:48 [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Gongwei Li
  2025-11-12  9:48 ` [PATCH 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
@ 2025-11-12 10:09 ` Paul Menzel
  2025-11-12 10:38 ` [1/2] " bluez.test.bot
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2025-11-12 10:09 UTC (permalink / raw)
  To: Gongwei Li
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Johan Hedberg,
	linux-bluetooth, netdev, linux-kernel, Gongwei Li

Dear Gongwei,


Thank you for your patch.

Am 12.11.25 um 10:48 schrieb Gongwei Li:
> From: Gongwei Li <ligongwei@kylinos.cn>
> 
> hcon->remote_id last use was removed in 2024 by
> commit e7b02296fb40 ("Bluetooth: Remove BT_HS").
> 
> Remove it.

Please also add a Fixes: tag.

> Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
> ---
>   include/net/bluetooth/hci_core.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index b8100dbfe5d7..32b1c08c8bba 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -749,7 +749,6 @@ struct hci_conn {
>   
>   	__u8		remote_cap;
>   	__u8		remote_auth;
> -	__u8		remote_id;
>   
>   	unsigned int	sent;
>   

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

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

* RE: [1/2] Bluetooth: Remove unused hcon->remote_id
  2025-11-12  9:48 [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Gongwei Li
  2025-11-12  9:48 ` [PATCH 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
  2025-11-12 10:09 ` [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Paul Menzel
@ 2025-11-12 10:38 ` bluez.test.bot
  2025-11-13  6:10 ` [PATCH v2 1/2] " Gongwei Li
  2025-11-13  6:11 ` [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
  4 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2025-11-12 10:38 UTC (permalink / raw)
  To: linux-bluetooth, 13875017792

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

---Test result---

Test Summary:
CheckPatch                    PENDING   0.29 seconds
GitLint                       PENDING   0.31 seconds
SubjectPrefix                 PASS      0.24 seconds
BuildKernel                   PASS      24.77 seconds
CheckAllWarning               PASS      27.65 seconds
CheckSparse                   WARNING   30.90 seconds
BuildKernel32                 PASS      24.50 seconds
TestRunnerSetup               PASS      491.71 seconds
TestRunner_l2cap-tester       PASS      24.03 seconds
TestRunner_iso-tester         PASS      54.42 seconds
TestRunner_bnep-tester        PASS      6.38 seconds
TestRunner_mgmt-tester        FAIL      113.43 seconds
TestRunner_rfcomm-tester      PASS      9.66 seconds
TestRunner_sco-tester         PASS      14.70 seconds
TestRunner_ioctl-tester       PASS      10.45 seconds
TestRunner_mesh-tester        FAIL      11.73 seconds
TestRunner_smp-tester         PASS      8.67 seconds
TestRunner_userchan-tester    PASS      6.79 seconds
IncrementalBuild              PENDING   0.90 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 487 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.103 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    1.896 seconds
Mesh - Send cancel - 2                               Timed out    1.992 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* [PATCH v2 1/2] Bluetooth: Remove unused hcon->remote_id
  2025-11-12  9:48 [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Gongwei Li
                   ` (2 preceding siblings ...)
  2025-11-12 10:38 ` [1/2] " bluez.test.bot
@ 2025-11-13  6:10 ` Gongwei Li
  2025-11-13  6:43   ` [v2,1/2] " bluez.test.bot
  2025-11-13  6:11 ` [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
  4 siblings, 1 reply; 10+ messages in thread
From: Gongwei Li @ 2025-11-13  6:10 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Johan Hedberg, linux-bluetooth, netdev, linux-kernel, Gongwei Li,
	Paul Menzel

From: Gongwei Li <ligongwei@kylinos.cn>

hcon->remote_id last use was removed in 2024 by
commit e7b02296fb40 ("Bluetooth: Remove BT_HS").

Remove it.

Fixes: e7b02296fb40 ("Bluetooth: Remove BT_HS")
Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
v1->v2: Add Fixes tags
 include/net/bluetooth/hci_core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 18396e369..9efdefed3 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -750,7 +750,6 @@ struct hci_conn {
 
 	__u8		remote_cap;
 	__u8		remote_auth;
-	__u8		remote_id;
 
 	unsigned int	sent;
 
-- 
2.25.1


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

* [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt
  2025-11-12  9:48 [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Gongwei Li
                   ` (3 preceding siblings ...)
  2025-11-13  6:10 ` [PATCH v2 1/2] " Gongwei Li
@ 2025-11-13  6:11 ` Gongwei Li
  2025-11-13  6:25   ` [v2,2/2] " bluez.test.bot
  2025-11-13 15:54   ` [PATCH v2 2/2] " Luiz Augusto von Dentz
  4 siblings, 2 replies; 10+ messages in thread
From: Gongwei Li @ 2025-11-13  6:11 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Johan Hedberg, linux-bluetooth, netdev, linux-kernel, Gongwei Li,
	Paul Menzel

From: Gongwei Li <ligongwei@kylinos.cn>

Add processing for HCI Process Read Remote Version event.
Used to query the lmp version of remote devices.

Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
v1->v2: Add bt_dev_dbg to print remote_ver
 include/net/bluetooth/hci_core.h |  1 +
 net/bluetooth/hci_event.c        | 25 +++++++++++++++++++++++++
 net/bluetooth/mgmt.c             |  5 +++++
 3 files changed, 31 insertions(+)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 9efdefed3..424349b74 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -750,6 +750,7 @@ struct hci_conn {
 
 	__u8		remote_cap;
 	__u8		remote_auth;
+	__u8		remote_ver;
 
 	unsigned int	sent;
 
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 7c4ca14f1..762a3e58b 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3738,6 +3738,28 @@ static void hci_remote_features_evt(struct hci_dev *hdev, void *data,
 	hci_dev_unlock(hdev);
 }
 
+static void hci_remote_version_evt(struct hci_dev *hdev, void *data,
+				   struct sk_buff *skb)
+{
+	struct hci_ev_remote_version *ev = (void *)skb->data;
+	struct hci_conn *conn;
+
+	bt_dev_dbg(hdev, "");
+
+	hci_dev_lock(hdev);
+
+	conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
+	if (!conn)
+		goto unlock;
+
+	conn->remote_ver = ev->lmp_ver;
+
+	bt_dev_dbg(hdev, "remote_ver 0x%2.2x", conn->remote_ver);
+
+unlock:
+	hci_dev_unlock(hdev);
+}
+
 static inline void handle_cmd_cnt_and_timer(struct hci_dev *hdev, u8 ncmd)
 {
 	cancel_delayed_work(&hdev->cmd_timer);
@@ -7523,6 +7545,9 @@ static const struct hci_ev {
 	/* [0x0b = HCI_EV_REMOTE_FEATURES] */
 	HCI_EV(HCI_EV_REMOTE_FEATURES, hci_remote_features_evt,
 	       sizeof(struct hci_ev_remote_features)),
+	/* [0x0c = HCI_EV_REMOTE_VERSION] */
+	HCI_EV(HCI_EV_REMOTE_VERSION, hci_remote_version_evt,
+	       sizeof(struct hci_ev_remote_version)),
 	/* [0x0e = HCI_EV_CMD_COMPLETE] */
 	HCI_EV_REQ_VL(HCI_EV_CMD_COMPLETE, hci_cmd_complete_evt,
 		      sizeof(struct hci_ev_cmd_complete), HCI_MAX_EVENT_SIZE),
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index c11cdef42..9b8add6a2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -9745,6 +9745,9 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
 {
 	struct sk_buff *skb;
 	struct mgmt_ev_device_connected *ev;
+	struct hci_cp_read_remote_version cp;
+
+	memset(&cp, 0, sizeof(cp));
 	u16 eir_len = 0;
 	u32 flags = 0;
 
@@ -9791,6 +9794,8 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
 	ev->eir_len = cpu_to_le16(eir_len);
 
 	mgmt_event_skb(skb, NULL);
+
+	hci_send_cmd(hdev, HCI_OP_READ_REMOTE_VERSION, sizeof(cp), &cp);
 }
 
 static void unpair_device_rsp(struct mgmt_pending_cmd *cmd, void *data)
-- 
2.25.1


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

* RE: [v2,2/2] Bluetooth: Process Read Remote Version evt
  2025-11-13  6:11 ` [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
@ 2025-11-13  6:25   ` bluez.test.bot
  2025-11-13 15:54   ` [PATCH v2 2/2] " Luiz Augusto von Dentz
  1 sibling, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2025-11-13  6:25 UTC (permalink / raw)
  To: linux-bluetooth, 13875017792

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: patch failed: include/net/bluetooth/hci_core.h:750
error: include/net/bluetooth/hci_core.h: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.


---
Regards,
Linux Bluetooth


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

* RE: [v2,1/2] Bluetooth: Remove unused hcon->remote_id
  2025-11-13  6:10 ` [PATCH v2 1/2] " Gongwei Li
@ 2025-11-13  6:43   ` bluez.test.bot
  0 siblings, 0 replies; 10+ messages in thread
From: bluez.test.bot @ 2025-11-13  6:43 UTC (permalink / raw)
  To: linux-bluetooth, 13875017792

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

---Test result---

Test Summary:
CheckPatch                    PENDING   0.30 seconds
GitLint                       PENDING   0.29 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      25.38 seconds
CheckAllWarning               PASS      27.59 seconds
CheckSparse                   PASS      30.99 seconds
BuildKernel32                 PASS      25.10 seconds
TestRunnerSetup               PASS      499.35 seconds
TestRunner_l2cap-tester       PASS      23.83 seconds
TestRunner_iso-tester         PASS      58.80 seconds
TestRunner_bnep-tester        PASS      6.14 seconds
TestRunner_mgmt-tester        FAIL      115.08 seconds
TestRunner_rfcomm-tester      PASS      9.28 seconds
TestRunner_sco-tester         PASS      14.59 seconds
TestRunner_ioctl-tester       PASS      10.10 seconds
TestRunner_mesh-tester        FAIL      11.46 seconds
TestRunner_smp-tester         PASS      9.57 seconds
TestRunner_userchan-tester    PASS      7.25 seconds
IncrementalBuild              PENDING   0.55 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 487 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.099 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    1.946 seconds
Mesh - Send cancel - 2                               Timed out    1.997 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt
  2025-11-13  6:11 ` [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
  2025-11-13  6:25   ` [v2,2/2] " bluez.test.bot
@ 2025-11-13 15:54   ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 10+ messages in thread
From: Luiz Augusto von Dentz @ 2025-11-13 15:54 UTC (permalink / raw)
  To: Gongwei Li
  Cc: Marcel Holtmann, Johan Hedberg, linux-bluetooth, netdev,
	linux-kernel, Gongwei Li, Paul Menzel

Hi,

On Thu, Nov 13, 2025 at 1:12 AM Gongwei Li <13875017792@163.com> wrote:
>
> From: Gongwei Li <ligongwei@kylinos.cn>
>
> Add processing for HCI Process Read Remote Version event.
> Used to query the lmp version of remote devices.
>
> Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> v1->v2: Add bt_dev_dbg to print remote_ver
>  include/net/bluetooth/hci_core.h |  1 +
>  net/bluetooth/hci_event.c        | 25 +++++++++++++++++++++++++
>  net/bluetooth/mgmt.c             |  5 +++++
>  3 files changed, 31 insertions(+)
>
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index 9efdefed3..424349b74 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -750,6 +750,7 @@ struct hci_conn {
>
>         __u8            remote_cap;
>         __u8            remote_auth;
> +       __u8            remote_ver;
>
>         unsigned int    sent;
>
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index 7c4ca14f1..762a3e58b 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -3738,6 +3738,28 @@ static void hci_remote_features_evt(struct hci_dev *hdev, void *data,
>         hci_dev_unlock(hdev);
>  }
>
> +static void hci_remote_version_evt(struct hci_dev *hdev, void *data,
> +                                  struct sk_buff *skb)
> +{
> +       struct hci_ev_remote_version *ev = (void *)skb->data;
> +       struct hci_conn *conn;
> +
> +       bt_dev_dbg(hdev, "");
> +
> +       hci_dev_lock(hdev);
> +
> +       conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
> +       if (!conn)
> +               goto unlock;
> +
> +       conn->remote_ver = ev->lmp_ver;
> +
> +       bt_dev_dbg(hdev, "remote_ver 0x%2.2x", conn->remote_ver);
> +
> +unlock:
> +       hci_dev_unlock(hdev);
> +}
> +
>  static inline void handle_cmd_cnt_and_timer(struct hci_dev *hdev, u8 ncmd)
>  {
>         cancel_delayed_work(&hdev->cmd_timer);
> @@ -7523,6 +7545,9 @@ static const struct hci_ev {
>         /* [0x0b = HCI_EV_REMOTE_FEATURES] */
>         HCI_EV(HCI_EV_REMOTE_FEATURES, hci_remote_features_evt,
>                sizeof(struct hci_ev_remote_features)),
> +       /* [0x0c = HCI_EV_REMOTE_VERSION] */
> +       HCI_EV(HCI_EV_REMOTE_VERSION, hci_remote_version_evt,
> +              sizeof(struct hci_ev_remote_version)),
>         /* [0x0e = HCI_EV_CMD_COMPLETE] */
>         HCI_EV_REQ_VL(HCI_EV_CMD_COMPLETE, hci_cmd_complete_evt,
>                       sizeof(struct hci_ev_cmd_complete), HCI_MAX_EVENT_SIZE),
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index c11cdef42..9b8add6a2 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -9745,6 +9745,9 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
>  {
>         struct sk_buff *skb;
>         struct mgmt_ev_device_connected *ev;
> +       struct hci_cp_read_remote_version cp;
> +
> +       memset(&cp, 0, sizeof(cp));
>         u16 eir_len = 0;
>         u32 flags = 0;
>
> @@ -9791,6 +9794,8 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
>         ev->eir_len = cpu_to_le16(eir_len);
>
>         mgmt_event_skb(skb, NULL);
> +
> +       hci_send_cmd(hdev, HCI_OP_READ_REMOTE_VERSION, sizeof(cp), &cp);

This should probably be made into hci_event.c and write a helper in
hci_sync.c that properly queues the command instead of using the
hci_send_cmd to send the command directly.

>  }
>
>  static void unpair_device_rsp(struct mgmt_pending_cmd *cmd, void *data)
> --
> 2.25.1
>


-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2025-11-13 15:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12  9:48 [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Gongwei Li
2025-11-12  9:48 ` [PATCH 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
2025-11-12  9:55   ` Paul Menzel
2025-11-12 10:09 ` [PATCH 1/2] Bluetooth: Remove unused hcon->remote_id Paul Menzel
2025-11-12 10:38 ` [1/2] " bluez.test.bot
2025-11-13  6:10 ` [PATCH v2 1/2] " Gongwei Li
2025-11-13  6:43   ` [v2,1/2] " bluez.test.bot
2025-11-13  6:11 ` [PATCH v2 2/2] Bluetooth: Process Read Remote Version evt Gongwei Li
2025-11-13  6:25   ` [v2,2/2] " bluez.test.bot
2025-11-13 15:54   ` [PATCH v2 2/2] " Luiz Augusto von Dentz

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.