masc2008 opened a new pull request, #19632: URL: https://github.com/apache/nuttx/pull/19632
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Fix the RNDIS size values reported to the USB host through NDIS OIDs. `CONFIG_NET_ETH_PKTSIZE` includes the Ethernet header in NuttX, while `OID_GEN_MAXIMUM_FRAME_SIZE` is the MTU-style value and excludes the link-layer header. Report `OID_GEN_MAXIMUM_FRAME_SIZE` as `CONFIG_NET_ETH_PKTSIZE - ETH_HDRLEN`. Also report `OID_GEN_MAXIMUM_TOTAL_SIZE` as `CONFIG_NET_ETH_PKTSIZE` instead of a hardcoded 2048, matching the total Ethernet packet size. ## Impact This affects USB RNDIS hosts that use the reported NDIS size OIDs to configure interface MTU and packet sizing. It avoids advertising an MTU that is larger than the NuttX Ethernet payload capacity when `CONFIG_NET_ETH_PKTSIZE` includes the Ethernet header. ## Testing Tested with a Windows host connected to the RNDIS interface. The following ping command was used to verify large packet handling and fragmentation behavior: ```bat ping -l 3000 192.168.3.1 ``` Also ran: ```sh ./tools/checkpatch.sh -f drivers/usbdev/rndis.c git diff --check ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
