diff options
| author | sakumisu <[email protected]> | 2023-12-01 20:43:13 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2023-12-01 20:43:13 +0800 |
| commit | d414fd21d84082ec4bebd1e593cefabddbc40fe5 (patch) | |
| tree | 320dd955be92702c44e70fda4c458703c72ba288 /class | |
| parent | c8a11be013e59e29c8bf31592c59aeee48353059 (diff) | |
add config for rndis & ecm thread
Diffstat (limited to 'class')
| -rw-r--r-- | class/cdc/usbh_cdc_ecm.c | 2 | ||||
| -rw-r--r-- | class/wireless/usbh_rndis.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/class/cdc/usbh_cdc_ecm.c b/class/cdc/usbh_cdc_ecm.c index cc016491..28451485 100644 --- a/class/cdc/usbh_cdc_ecm.c +++ b/class/cdc/usbh_cdc_ecm.c @@ -309,7 +309,7 @@ err_t usbh_cdc_ecm_linkoutput(struct netif *netif, struct pbuf *p) void usbh_cdc_ecm_lwip_thread_init(struct netif *netif) { - usb_osal_thread_create("usbh_cdc_ecm_rx", 2048, CONFIG_USBHOST_PSC_PRIO + 1, usbh_cdc_ecm_rx_thread, netif); + usb_osal_thread_create("usbh_cdc_ecm_rx", CONFIG_USBHOST_RNDIS_STACKSIZE, CONFIG_USBHOST_CDC_ECM_PRIO, usbh_cdc_ecm_rx_thread, netif); } __WEAK void usbh_cdc_ecm_run(struct usbh_cdc_ecm *cdc_ecm_class) diff --git a/class/wireless/usbh_rndis.c b/class/wireless/usbh_rndis.c index c1c308a1..bfe6b594 100644 --- a/class/wireless/usbh_rndis.c +++ b/class/wireless/usbh_rndis.c @@ -492,12 +492,18 @@ find_class: g_rndis_rx_length = 0; USB_LOG_ERR("No memory to alloc pbuf for rndis rx\r\n"); } + } else { + g_rndis_rx_length = 0; + USB_LOG_ERR("Error rndis packet message\r\n"); } } } + + // clang-format off delete: USB_LOG_INFO("Delete rndis rx thread\r\n"); usb_osal_thread_delete(NULL); + // clang-format on } err_t usbh_rndis_linkoutput(struct netif *netif, struct pbuf *p) @@ -543,7 +549,7 @@ err_t usbh_rndis_linkoutput(struct netif *netif, struct pbuf *p) void usbh_rndis_lwip_thread_init(struct netif *netif) { - usb_osal_thread_create("usbh_rndis_rx", 2560, CONFIG_USBHOST_PSC_PRIO + 1, usbh_rndis_rx_thread, netif); + usb_osal_thread_create("usbh_rndis_rx", CONFIG_USBHOST_RNDIS_STACKSIZE, CONFIG_USBHOST_RNDIS_PRIO, usbh_rndis_rx_thread, netif); } __WEAK void usbh_rndis_run(struct usbh_rndis *rndis_class) |
