USB: Bluetooth: Remove BLUETOOTH_INT_EP_MPS

Allowing to configuring the MPS different then the buffer size might
actually generate data fragmentation/reassembly so this just use
BT_BUF_RX_SIZE which is set accourding to the controller buffer size.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2020-03-09 14:09:37 -07:00 committed by Johan Hedberg
commit 7177f998f7
2 changed files with 2 additions and 11 deletions

View file

@ -91,14 +91,6 @@ config USB_DEVICE_BLUETOOTH
help
USB Bluetooth device class driver
config BLUETOOTH_INT_EP_MPS
int "Bluetooth device class interrupt endpoint size"
depends on USB_DEVICE_BLUETOOTH
default 16
range 8 64
help
Bluetooth device class interrupt endpoint size
config USB_DEVICE_BLUETOOTH_VS_H4
bool "Enable USB Bluetooth H4 vendor command"
depends on USB_DEVICE_BLUETOOTH

View file

@ -70,6 +70,7 @@ NET_BUF_POOL_DEFINE(acl_rx_pool, ACL_BUF_COUNT, BT_BUF_ACL_SIZE,
/* TODO: Replace use of USB_MAX_FS_INT_MPS if higher speeds are supported */
#define BLUETOOTH_BULK_EP_MPS MIN(BT_BUF_ACL_SIZE, \
USB_MAX_FS_BULK_MPS)
#define BLUETOOTH_INT_EP_MPS MIN(BT_BUF_RX_SIZE, USB_MAX_FS_INT_MPS)
/* HCI RX/TX threads */
static K_THREAD_STACK_DEFINE(rx_thread_stack, 512);
@ -106,9 +107,7 @@ USBD_CLASS_DESCR_DEFINE(primary, 0)
.bDescriptorType = USB_ENDPOINT_DESC,
.bEndpointAddress = BLUETOOTH_INT_EP_ADDR,
.bmAttributes = USB_DC_EP_INTERRUPT,
.wMaxPacketSize =
sys_cpu_to_le16(
CONFIG_BLUETOOTH_INT_EP_MPS),
.wMaxPacketSize = sys_cpu_to_le16(BLUETOOTH_INT_EP_MPS),
.bInterval = 0x01,
},