|
13 | 13 |
|
14 | 14 | #define DEV_FORMAT "/dev/rndis"
|
15 | 15 |
|
16 |
| -USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_buf[4096]; |
| 16 | +USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_buf[512]; |
17 | 17 |
|
18 | 18 | #define CONFIG_USBHOST_RNDIS_ETH_MAX_FRAME_SIZE 1514
|
19 | 19 | #define CONFIG_USBHOST_RNDIS_ETH_MSG_SIZE (CONFIG_USBHOST_RNDIS_ETH_MAX_FRAME_SIZE + 44)
|
@@ -80,7 +80,7 @@ static int usbh_rndis_init_msg_transfer(struct usbh_rndis *rndis_class)
|
80 | 80 | setup->bRequest = CDC_REQUEST_GET_ENCAPSULATED_RESPONSE;
|
81 | 81 | setup->wValue = 0;
|
82 | 82 | setup->wIndex = 0;
|
83 |
| - setup->wLength = 4096; |
| 83 | + setup->wLength = sizeof(g_rndis_buf); |
84 | 84 |
|
85 | 85 | ret = usbh_control_transfer(rndis_class->hport, setup, (uint8_t *)resp);
|
86 | 86 | if (ret < 0) {
|
@@ -138,7 +138,7 @@ int usbh_rndis_query_msg_transfer(struct usbh_rndis *rndis_class, uint32_t oid,
|
138 | 138 | setup->bRequest = CDC_REQUEST_GET_ENCAPSULATED_RESPONSE;
|
139 | 139 | setup->wValue = 0;
|
140 | 140 | setup->wIndex = 0;
|
141 |
| - setup->wLength = 4096; |
| 141 | + setup->wLength = sizeof(g_rndis_buf); |
142 | 142 |
|
143 | 143 | ret = usbh_control_transfer(rndis_class->hport, setup, (uint8_t *)resp);
|
144 | 144 | if (ret < 0) {
|
@@ -195,7 +195,7 @@ static int usbh_rndis_set_msg_transfer(struct usbh_rndis *rndis_class, uint32_t
|
195 | 195 | setup->bRequest = CDC_REQUEST_GET_ENCAPSULATED_RESPONSE;
|
196 | 196 | setup->wValue = 0;
|
197 | 197 | setup->wIndex = 0;
|
198 |
| - setup->wLength = 4096; |
| 198 | + setup->wLength = sizeof(g_rndis_buf); |
199 | 199 |
|
200 | 200 | ret = usbh_control_transfer(rndis_class->hport, setup, (uint8_t *)resp);
|
201 | 201 | if (ret < 0) {
|
@@ -262,7 +262,7 @@ int usbh_rndis_keepalive(struct usbh_rndis *rndis_class)
|
262 | 262 | setup->bRequest = CDC_REQUEST_GET_ENCAPSULATED_RESPONSE;
|
263 | 263 | setup->wValue = 0;
|
264 | 264 | setup->wIndex = 0;
|
265 |
| - setup->wLength = 4096; |
| 265 | + setup->wLength = sizeof(); |
266 | 266 |
|
267 | 267 | ret = usbh_control_transfer(rndis_class->hport, setup, (uint8_t *)resp);
|
268 | 268 | if (ret < 0) {
|
|
0 commit comments