2024-01-05 09:52:51

by clancy_shang

[permalink] [raw]
Subject: [PATCH] Bluetooth: mgmt: Fix wrong param be used

From: Clancy Shang <[email protected]>

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 <[email protected]>
---
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



2024-01-05 10:33:35

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: mgmt: Fix wrong param be used

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=814609

---Test result---

Test Summary:
CheckPatch PASS 0.67 seconds
GitLint PASS 0.33 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 28.02 seconds
CheckAllWarning PASS 30.53 seconds
CheckSparse PASS 36.29 seconds
CheckSmatch PASS 100.05 seconds
BuildKernel32 PASS 27.21 seconds
TestRunnerSetup PASS 433.78 seconds
TestRunner_l2cap-tester PASS 25.88 seconds
TestRunner_iso-tester PASS 47.64 seconds
TestRunner_bnep-tester PASS 6.86 seconds
TestRunner_mgmt-tester PASS 165.62 seconds
TestRunner_rfcomm-tester PASS 10.84 seconds
TestRunner_sco-tester PASS 14.47 seconds
TestRunner_ioctl-tester PASS 12.04 seconds
TestRunner_mesh-tester PASS 8.86 seconds
TestRunner_smp-tester PASS 9.66 seconds
TestRunner_userchan-tester PASS 7.27 seconds
IncrementalBuild PASS 27.05 seconds



---
Regards,
Linux Bluetooth