Parent: 7a45038dc1e505afbaa49f8dd64fd41dab627f23
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-07-11 22:24:32
Tree: 0e58ab4d3fc7c12690bfdd9c2a964620f01f01bd
device: Fix overwritting current_flags MGMT Set Device Flags overwrites the current_flags so only the last flags set this way would remain active which can be seem in the following sequence when LL Privacy is enabled: @ MGMT Command: Set Device Flags (0x0050) plen 11 LE Address: CF:AC:A6:79:3D:B9 (Static) Current Flags: 0x00000001 Remote Wakeup @ MGMT Event: Command Complete (0x0001) plen 10 Set Device Flags (0x0050) plen 7 Status: Success (0x00) LE Address: CF:AC:A6:79:3D:B9 (Static) @ MGMT Command: Set Device Flags (0x0050) plen 11 LE Address: CF:AC:A6:79:3D:B9 (Static) Current Flags: 0x00000002 Device Privacy Mode @ MGMT Event: Command Complete (0x0001) plen 10 Set Device Flags (0x0050) plen 7 Status: Success (0x00) LE Address: CF:AC:A6:79:3D:B9 (Static) In order to do this properly the code needs to track the pending_flags being set and also call btd_device_flags_changed whenever a change is complete since that event is not generated when MGMT_OP_SET_DEVICE_FLAGS is sent by bluetoothd itself.
Diffstat
| M | src/adapter.c | | | 20 | +++++++++++++++++- - - |
| M | src/device.c | | | 20 | +++++++++++++++++++- |
| M | src/device.h | | | 2 | ++ |
3 files changed, 38 insertions(+), 4 deletions(-)