* [PATCH] Bluetooth: mgmt: Fix wrong param be used
@ 2024-02-29 8:40 clancy_shang
2024-02-29 9:33 ` bluez.test.bot
2024-02-29 14:14 ` [PATCH] " Luiz Augusto von Dentz
0 siblings, 2 replies; 9+ messages in thread
From: clancy_shang @ 2024-02-29 8:40 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjun.yu, Clancy Shang
From: Clancy Shang <clancy.shang@quectel.com>
if the BlueZ library calls the API interface "adapter_set_device_flags",
which sends the "MGMT_OP_SET_DEVICE_FLAGS" opcode to the kernel, but
does not receive the callback message "MGMT_EV_DEVICE_FLAGS_CHANGED"
from the kernel. it fixs this bug.
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9dd815b6603f..c74abdf3618f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
done:
if (status == MGMT_STATUS_SUCCESS)
- device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
+ device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
supported_flags, current_flags);
return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: Bluetooth: mgmt: Fix wrong param be used
2024-02-29 8:40 [PATCH] Bluetooth: mgmt: Fix wrong param be used clancy_shang
@ 2024-02-29 9:33 ` bluez.test.bot
2024-02-29 14:14 ` [PATCH] " Luiz Augusto von Dentz
1 sibling, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2024-02-29 9:33 UTC (permalink / raw)
To: linux-bluetooth, clancy_shang
[-- Attachment #1: Type: text/plain, Size: 1420 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=831013
---Test result---
Test Summary:
CheckPatch PASS 0.48 seconds
GitLint PASS 0.21 seconds
SubjectPrefix PASS 0.06 seconds
BuildKernel PASS 28.00 seconds
CheckAllWarning PASS 30.85 seconds
CheckSparse PASS 36.39 seconds
CheckSmatch PASS 99.08 seconds
BuildKernel32 PASS 27.03 seconds
TestRunnerSetup PASS 502.24 seconds
TestRunner_l2cap-tester PASS 19.46 seconds
TestRunner_iso-tester PASS 32.42 seconds
TestRunner_bnep-tester PASS 4.74 seconds
TestRunner_mgmt-tester PASS 109.42 seconds
TestRunner_rfcomm-tester PASS 8.42 seconds
TestRunner_sco-tester PASS 14.95 seconds
TestRunner_ioctl-tester PASS 7.88 seconds
TestRunner_mesh-tester PASS 5.90 seconds
TestRunner_smp-tester PASS 6.91 seconds
TestRunner_userchan-tester PASS 5.01 seconds
IncrementalBuild PASS 26.91 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Bluetooth: mgmt: Fix wrong param be used
2024-02-29 8:40 [PATCH] Bluetooth: mgmt: Fix wrong param be used clancy_shang
2024-02-29 9:33 ` bluez.test.bot
@ 2024-02-29 14:14 ` Luiz Augusto von Dentz
1 sibling, 0 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2024-02-29 14:14 UTC (permalink / raw)
To: clancy_shang
Cc: marcel, johan.hedberg, linux-bluetooth, linux-kernel,
zhongjun.yu, Clancy Shang
Hi,
On Thu, Feb 29, 2024 at 3:41 AM <clancy_shang@163.com> wrote:
>
> From: Clancy Shang <clancy.shang@quectel.com>
>
> if the BlueZ library calls the API interface "adapter_set_device_flags",
> which sends the "MGMT_OP_SET_DEVICE_FLAGS" opcode to the kernel, but
> does not receive the callback message "MGMT_EV_DEVICE_FLAGS_CHANGED"
> from the kernel. it fixs this bug.
Please stop sending this change, the client who sent
MGMT_OP_SET_DEVICE_FLAGS is not supposed to get
MGMT_EV_DEVICE_FLAGS_CHANGED back:
https://github.com/bluez/bluez/blob/master/doc/mgmt-api.txt#L4975
If there is a problem with that then perhaps it is in userspace not
setting the flag on command complete.
> Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 9dd815b6603f..c74abdf3618f 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
>
> done:
> if (status == MGMT_STATUS_SUCCESS)
> - device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
> + device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
> supported_flags, current_flags);
>
> return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
> --
> 2.25.1
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Bluetooth: mgmt: Fix wrong param be used
@ 2024-01-25 10:57 clancy_shang
0 siblings, 0 replies; 9+ messages in thread
From: clancy_shang @ 2024-01-25 10:57 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjun.yu, Clancy Shang
From: Clancy Shang <clancy.shang@quectel.com>
if the BlueZ library calls the API interface "adapter_set_device_flags",
which sends the "MGMT_OP_SET_DEVICE_FLAGS" opcode to the kernel, but
does not receive the callback message "MGMT_EV_DEVICE_FLAGS_CHANGED"
from the kernel. it fixs this bug.
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9dd815b6603f..c74abdf3618f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
done:
if (status == MGMT_STATUS_SUCCESS)
- device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
+ device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
supported_flags, current_flags);
return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] Bluetooth: mgmt: Fix wrong param be used
@ 2024-01-18 7:49 clancy_shang
0 siblings, 0 replies; 9+ messages in thread
From: clancy_shang @ 2024-01-18 7:49 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjun.yu, Clancy Shang
From: Clancy Shang <clancy.shang@quectel.com>
if the BlueZ library calls the API interface "adapter_set_device_flags",
which sends the "MGMT_OP_SET_DEVICE_FLAGS" opcode to the kernel, but
does not receive the callback message "MGMT_EV_DEVICE_FLAGS_CHANGED"
from the kernel. it fixs this bug.
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9dd815b6603f..c74abdf3618f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
done:
if (status == MGMT_STATUS_SUCCESS)
- device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
+ device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
supported_flags, current_flags);
return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] Bluetooth: mgmt: Fix wrong param be used
@ 2024-01-10 7:01 clancy_shang
0 siblings, 0 replies; 9+ messages in thread
From: clancy_shang @ 2024-01-10 7:01 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjun.yu, Clancy Shang
From: Clancy Shang <clancy.shang@quectel.com>
if the BlueZ library calls the API interface "adapter_set_device_flags",
which sends the "MGMT_OP_SET_DEVICE_FLAGS" opcode to the kernel, but
does not receive the callback message "MGMT_EV_DEVICE_FLAGS_CHANGED"
from the kernel. it fixs this bug.
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9dd815b6603f..c74abdf3618f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
done:
if (status == MGMT_STATUS_SUCCESS)
- device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
+ device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
supported_flags, current_flags);
return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] Bluetooth: mgmt: Fix wrong param be used
@ 2024-01-05 9:52 clancy_shang
0 siblings, 0 replies; 9+ messages in thread
From: clancy_shang @ 2024-01-05 9:52 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjun.yu, Clancy Shang
From: Clancy Shang <clancy.shang@quectel.com>
if the BlueZ library calls the API interface "adapter_set_device_flags",
which sends the "MGMT_OP_SET_DEVICE_FLAGS" opcode to the kernel, but
does not receive the callback message "MGMT_EV_DEVICE_FLAGS_CHANGED"
from the kernel. it fixs this bug.
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9dd815b6603f..c74abdf3618f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
done:
if (status == MGMT_STATUS_SUCCESS)
- device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
+ device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
supported_flags, current_flags);
return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Bluetooth: mgmt: Fix wrong param be used
2024-01-05 3:11 clancy_shang
@ 2024-01-05 8:03 ` Paul Menzel
0 siblings, 0 replies; 9+ messages in thread
From: Paul Menzel @ 2024-01-05 8:03 UTC (permalink / raw)
To: Clancy Shang
Cc: marcel, johan.hedberg, luiz.dentz, linux-bluetooth, linux-kernel,
zhongjun.yu, Clancy Shang
Dear Clancy,
Thank you for your patch.
Am 05.01.24 um 04:11 schrieb clancy_shang@163.com:
> From: Clancy Shang <clancy.shang@quectel.com>
>
> bluez lib could not receive MGMT_EV_DEVICE_FLAGS_CHANGED notifications
> after sending MGMT_OP_SET_DEVICE_FLAGS
Please add a dot/period at the end of sentences.
Please extend the commit message to describe your fix, and why it fixes
the problem.
> Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 9dd815b6603f..c74abdf3618f 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
>
> done:
> if (status == MGMT_STATUS_SUCCESS)
> - device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
> + device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
> supported_flags, current_flags);
>
> return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
Kind regards,
Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Bluetooth: mgmt: Fix wrong param be used
@ 2024-01-05 3:11 clancy_shang
2024-01-05 8:03 ` Paul Menzel
0 siblings, 1 reply; 9+ messages in thread
From: clancy_shang @ 2024-01-05 3:11 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-bluetooth, linux-kernel, zhongjun.yu, Clancy Shang
From: Clancy Shang <clancy.shang@quectel.com>
bluez lib could not receive MGMT_EV_DEVICE_FLAGS_CHANGED notifications
after sending MGMT_OP_SET_DEVICE_FLAGS
Signed-off-by: Clancy Shang <clancy.shang@quectel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9dd815b6603f..c74abdf3618f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5177,7 +5177,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
done:
if (status == MGMT_STATUS_SUCCESS)
- device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
+ device_flags_changed(NULL, hdev, &cp->addr.bdaddr, cp->addr.type,
supported_flags, current_flags);
return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-02-29 14:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 8:40 [PATCH] Bluetooth: mgmt: Fix wrong param be used clancy_shang
2024-02-29 9:33 ` bluez.test.bot
2024-02-29 14:14 ` [PATCH] " Luiz Augusto von Dentz
-- strict thread matches above, loose matches on Subject: below --
2024-01-25 10:57 clancy_shang
2024-01-18 7:49 clancy_shang
2024-01-10 7:01 clancy_shang
2024-01-05 9:52 clancy_shang
2024-01-05 3:11 clancy_shang
2024-01-05 8:03 ` Paul Menzel
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.