nuttx/drivers/usbdev/rndis.c: Account for CONFIG_NET_GUARDSIZE in allocation of packet buffer

nuttx/drivers/usbdev/rndis.c:  Make USB device parameters configurable
This commit is contained in:
Sakari Kapanen 2018-10-24 09:06:09 -06:00 committed by Gregory Nutt
parent 4901710fc7
commit dafa180d8d
2 changed files with 39 additions and 10 deletions

View File

@ -669,12 +669,49 @@ menuconfig RNDIS
Protocol"
- "Remote NDIS To USB Mapping"
This option may requierd CONFIG_NETDEV_LATEINIT=y otherwise, the
This option may required CONFIG_NETDEV_LATEINIT=y otherwise, the
power-up initialization may call the non-existent up_netinitialize().
This option is not automatically selected because it may be that
you have an additional network device that requires the early
up_netinitialize() call.
if RNDIS
config RNDIS_VENDORID
hex "RNDIS Vendor ID"
default 0x584e
---help---
The vendor ID (VID). The value here is bogus. You should not use
it in any commercial products! You must go through the proper
channels to request a vendor ID for your company if you do not
already have one!
config RNDIS_VENDORSTR
string "RNDIS vendor string"
default "NuttX"
---help---
The vendor ID code/string
config RNDIS_PRODUCTID
hex "RNDIS Product ID"
default 0x5342
---help---
The product ID (PID).
config RNDIS_PRODUCTSTR
string "RNDIS product string"
default "RNDIS gadget"
config RNDIS_SERIALSTR
hex "RNDIS serial string"
default "0x1234"
config RNDIS_VERSIONNO
hex "RNDIS Version Number"
default 0x0001
endif # RNDIS
menuconfig NET_CDCECM
bool "CDC-ECM Ethernet-over-USB"
default n

View File

@ -68,18 +68,10 @@
#define CONFIG_RNDIS_EP0MAXPACKET 64
#define CONFIG_RNDIS_VENDORID 0x1d6b
#define CONFIG_RNDIS_PRODUCTID 0x0129
#define CONFIG_RNDIS_VERSIONNO 0x0205
#define CONFIG_RNDIS_VENDORSTR "NuttX"
#define CONFIG_RNDIS_PRODUCTSTR "USB RNDIS device"
#define CONFIG_RNDIS_SERIALSTR "0"
#define CONFIG_RNDIS_NWRREQS (2)
#define RNDIS_PACKET_HDR_SIZE (sizeof(struct rndis_packet_msg))
#define CONFIG_RNDIS_BULKIN_REQLEN (CONFIG_NET_ETH_PKTSIZE + RNDIS_PACKET_HDR_SIZE)
#define CONFIG_RNDIS_BULKIN_REQLEN (CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE + RNDIS_PACKET_HDR_SIZE)
#define CONFIG_RNDIS_BULKOUT_REQLEN CONFIG_RNDIS_BULKIN_REQLEN
#define RNDIS_NCONFIGS (1)