Tiva Ethernet: Needs support for CONFIG_NET_MULTIBUFFER=y

This commit is contained in:
Gregory Nutt 2016-09-20 13:02:24 -06:00
parent 4dc3521743
commit ed22c93d7a

View File

@ -70,11 +70,6 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#ifdef CONFIG_NET_MULTIBUFFER
# error CONFIG_NET_MULTIBUFFER should not be selected
#endif
/* Half duplex can be forced if CONFIG_TIVA_ETHHDUPLEX is defined. */
@ -196,6 +191,14 @@ struct tiva_driver_s
* Private Data
****************************************************************************/
#ifdef CONFIG_NET_MULTIBUFFER
/* A single packet buffer is used */
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
#endif
/* Ethernet peripheral state */
static struct tiva_driver_s g_lm3sdev[TIVA_NETHCONTROLLERS];
/****************************************************************************
@ -1469,6 +1472,9 @@ static inline int tiva_ethinitialize(int intf)
/* Initialize the driver structure */
memset(priv, 0, sizeof(struct tiva_driver_s));
#ifdef CONFIG_NET_MULTIBUFFER
priv->ld_dev.d_buf = g_pktbuf; /* Single packet buffer */
#endif
priv->ld_dev.d_ifup = tiva_ifup; /* I/F down callback */
priv->ld_dev.d_ifdown = tiva_ifdown; /* I/F up (new IP address) callback */
priv->ld_dev.d_txavail = tiva_txavail; /* New TX data callback */