freebsd_network: Fix assertion in usbd_xfer_set_frame_len.

Setting the length of a frame outside the current xfer frame count
(but less than the maximum count) is allowed on FreeBSD.

Fixes a KDL encountered with the FreeBSD version of the ASIX
USB ethernet driver.
This commit is contained in:
Augustin Cavalier
2025-08-28 13:42:54 -04:00
parent 843f2bcce4
commit dd90a96b5f
+1 -1
View File
@@ -420,7 +420,7 @@ extern "C" void
usbd_xfer_set_frame_len(struct usb_xfer* xfer,
usb_frcount_t frindex, usb_frlength_t len)
{
KASSERT(frindex < uint32_t(xfer->nframes), ("frame index overflow"));
KASSERT(frindex < uint32_t(xfer->max_frame_count), ("frame index overflow"));
KASSERT(len <= uint32_t(xfer->max_data_length), ("length overflow"));
// Trigger buffer allocation if necessary.