From 3508879e1d6f93f2ced4170674af072b126b157b Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sat, 24 Feb 2024 14:57:01 +0800 Subject: [PATCH] fix asix output zlp --- class/vendor/net/usbh_asix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/vendor/net/usbh_asix.c b/class/vendor/net/usbh_asix.c index d6c017bb..39ab4a93 100644 --- a/class/vendor/net/usbh_asix.c +++ b/class/vendor/net/usbh_asix.c @@ -741,7 +741,7 @@ err_t usbh_asix_linkoutput(struct netif *netif, struct pbuf *p) g_asix_tx_buffer[2] = ~g_asix_tx_buffer[0]; g_asix_tx_buffer[3] = ~g_asix_tx_buffer[1]; - if ((p->tot_len + 4) % USB_GET_MAXPACKETSIZE(g_asix_class.bulkout->wMaxPacketSize)) { + if (!(p->tot_len + 4) % USB_GET_MAXPACKETSIZE(g_asix_class.bulkout->wMaxPacketSize)) { USB_LOG_DBG("txlen:%d\r\n", p->tot_len + 8); g_asix_tx_buffer[p->tot_len + 4 + 0] = 0x00; g_asix_tx_buffer[p->tot_len + 4 + 1] = 0x00;