Bluetooth: btusb: Add support for queuing during polling interval
Luiz Augusto von Dentz
maintainerRFC v2 1/1 Bluetooth: btusb: Add support for queuing during polling interval
From: Luiz Augusto von Dentz <[email protected]>
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 platforms have the following means to enable it:
At build-time:
CONFIG_BT_HCIBTUSB_INTERVAL=y
At runtime with use of module option:
enable_interval
--- drivers/bluetooth/Kconfig | 7 ++++ drivers/bluetooth/btusb.c | 88 ++++++++++++++++++++++++++++++++++----- 2 files changed, 84 insertions(+), 11 deletions(-)
drivers/bluetooth/Kconfig +7 -0
@@ -41,6 +41,13 @@ config BT_HCIBTUSB_AUTOSUSPEND This can be overridden by passing btusb.enable_autosuspend=[y|n] on the kernel commandline. +config BT_HCIBTUSB_INTERVAL + bool "Enable notification of USB polling interval" + depends on BT_HCIBTUSB + help + Say Y here to enable notification of USB polling interval for + Bluetooth USB devices by default. + config BT_HCIBTUSB_BCM bool "Broadcom protocol support" depends on BT_HCIBTUSB
drivers/bluetooth/btusb.c +77 -11
182 lines not on this page · raw message
Signature · 1 line
2.25.3
Marcel Holtmann
maintainerHi Luiz,
Quoted 15 lines
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 platforms have the following means to enable it:
Quoted 7 lines
At build-time:
CONFIG_BT_HCIBTUSB_INTERVAL=yAt runtime with use of module option:
enable_interval
I like that this is confined into btusb.c, but now the question is if this is actually enough for handling this issue.
Regards
Marcel