Bluetooth: btusb: Add support for queuing during polling interval
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 3 Dec 2021 22:38:13 +0000 (14:38 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Dec 2021 16:05:51 +0000 (17:05 +0100)
commit800fe5ec302e1ebbf5e3f891f886deecd49c7132
tree8d265d3db17c9eade894131c421ddd43c5aa42a4
parentfe92ee6425a2c79ee84f0b9b8a14117200d15f7d
Bluetooth: btusb: Add support for queuing during polling interval

This makes btusb to queue ACL and events during a polling interval
by using of a delayed work, with the interval working as a time window
where frames received from different endpoints are considered to be
arrived at same time and then attempt to resolve potential conflics by
processing the events ahead of ACL packets.

It worth noting though that priorizing events over ACL data may result
in inverting the order compared to how they appeared over the air, for
instance there may be packets received before a disconnect event that
will be discarded and unencrypted packets received before encryption
change which would considered encrypted, because of these potential
changes on the order the support for queuing during the polling
interval is not enabled by default so it requires setting
force_poll_sync debugfs while the adapter is down.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c