Parent: 41cfe55ea759d528db7a0042056eb39e3bab84a6
Author: Ludovico de Nittis <ludovico.denittis@collabora.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2025-03-26 16:20:27
Tree: aadf3044ea9a8d949dfd37f8c3652e6ab4f6ae9e
device: Try to set the wake_allowed property only for bonded devices When the function `device_set_wake_support()` is called, we don't have the guarantees for the device to be already bonded. For example, that function gets called by `hog_probe()`, that is also triggered when bluez scans for new devices. In that instance, we don't want to try setting the `wake_allowed` property, because those devices are only in range of the host and are not connected, paired or bonded yet. This fixes the following Bluez error when we scan for new devices and a new hog or hid is in range: ``` src/device.c:set_wake_allowed_complete() Set device flags return status: Invalid Parameters ``` Additionally, because that initial `device_set_allowed()` call can fail, this commit fixes the issue of hog and hid devices that, after the first pairing, were unexpectedly showing `WakeAllowed: no`. And it required a reboot to let that property be set to the expected `WakeAllowed: yes` by default.
Diffstat
| M | src/device.c | | | 17 | +++++++++++++- - - - |
1 files changed, 13 insertions(+), 4 deletions(-)