diff --git a/arch/arm/src/tiva/lm3s_ethernet.c b/arch/arm/src/tiva/lm3s_ethernet.c index ab9bd289016..cbdf0dac530 100644 --- a/arch/arm/src/tiva/lm3s_ethernet.c +++ b/arch/arm/src/tiva/lm3s_ethernet.c @@ -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 */