zephyr/subsys/usb/device_next
Johann Fischer 96422f262e usb: device: fix Bluetooth buffer handling
In both implementation, when comparing received data length take into
account that the buffer obtained from bt_buf_get_tx() stores the type at
the top. The buffer types are H:4 and in the TX path we need to check for
BT_HCI_H4_* types not BT_BUF_*.

In the legacy implementation, the hci_acl_pkt_len() function obtains the
length from the USB transaction buffer, which does not contain a buffer
type at the top.

In the new implementation, partially revert the changes and restore
hci_pkt_get_len(), this will be required for any further changes anyway.

Fixes commit f85d63a6cc ("Bluetooth: Remove USB H4 mode support").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
..
app usb: device_next: Do not add serial number without HWINFO 2025-03-26 16:18:56 +01:00
class usb: device: fix Bluetooth buffer handling 2025-06-19 22:36:51 -07:00
CMakeLists.txt usb: device_next: allow CDC ACM UART to be initialized and enabled at boot 2025-02-12 02:22:18 +01:00
Kconfig usb: device_next: allow to limit number or digits in serial number 2025-06-19 14:04:31 +02:00
usbd_ch9.c usb: device_next: allow to limit number or digits in serial number 2025-06-19 14:04:31 +02:00
usbd_ch9.h
usbd_class_api.h
usbd_class.c usb: device_next: Disassociate USB contexts from classes 2025-06-09 15:02:55 -07:00
usbd_class.h
usbd_config.c usb: device_next: Reduce code size on Full-Speed only configuration 2025-04-10 12:57:19 +02:00
usbd_config.h
usbd_core.c usb: device_next: Reduce code size on Full-Speed only configuration 2025-04-10 12:57:19 +02:00
usbd_data.ld
usbd_desc.c usb: device_next: disable high-speed USB device descriptor if not used 2025-06-03 14:48:29 +01:00
usbd_desc.h
usbd_device.c usb: device_next: fix the null pointer dereference on FS devices 2025-06-13 11:13:14 +02:00
usbd_device.h usb: device_next: Reduce code size on Full-Speed only configuration 2025-04-10 12:57:19 +02:00
usbd_endpoint.c
usbd_endpoint.h
usbd_init.c usb: device_next: Reduce code size on Full-Speed only configuration 2025-04-10 12:57:19 +02:00
usbd_init.h
usbd_interface.c usb: device_next: always reset endpoints to defaults on SetInterface 2025-03-26 07:08:06 +01:00
usbd_interface.h
usbd_msg.c usb: device_next: allow message callback to be executed from USBD thread 2025-06-03 14:48:29 +01:00
usbd_msg.h
usbd_shell.c usb: device_next: Reduce code size on Full-Speed only configuration 2025-04-10 12:57:19 +02:00