summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cherryusb_config_template.h2
-rw-r--r--class/wireless/usbd_rndis.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/cherryusb_config_template.h b/cherryusb_config_template.h
index 00b4e06d..e7a320ce 100644
--- a/cherryusb_config_template.h
+++ b/cherryusb_config_template.h
@@ -82,7 +82,7 @@
#endif
#ifndef CONFIG_USBDEV_RNDIS_RESP_BUFFER_SIZE
-#define CONFIG_USBDEV_RNDIS_RESP_BUFFER_SIZE 128
+#define CONFIG_USBDEV_RNDIS_RESP_BUFFER_SIZE 156
#endif
#ifndef CONFIG_USBDEV_RNDIS_ETH_MAX_FRAME_SIZE
diff --git a/class/wireless/usbd_rndis.c b/class/wireless/usbd_rndis.c
index 482cc571..2d6ea046 100644
--- a/class/wireless/usbd_rndis.c
+++ b/class/wireless/usbd_rndis.c
@@ -40,6 +40,11 @@ struct usbd_rndis_priv {
uint8_t mac[6];
} g_usbd_rndis;
+#if CONFIG_USBDEV_RNDIS_RESP_BUFFER_SIZE < 140
+#undef CONFIG_USBDEV_RNDIS_RESP_BUFFER_SIZE
+#define CONFIG_USBDEV_RNDIS_RESP_BUFFER_SIZE 156
+#endif
+
USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_rx_buffer[CONFIG_USBDEV_RNDIS_ETH_MAX_FRAME_SIZE + 44];
USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_tx_buffer[CONFIG_USBDEV_RNDIS_ETH_MAX_FRAME_SIZE + 44];