All SAM Ethernet Drivers: Add support so that the drivers can be built with CONFIG_NET_MULTIBUFFER=y
This commit is contained in:
parent
9838cc0cc9
commit
4dc3521743
@ -207,18 +207,7 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* EMAC buffer sizes, number of buffers, and number of descriptors.
|
/* EMAC buffer sizes, number of buffers, and number of descriptors. *********/
|
||||||
*
|
|
||||||
* REVISIT: The CONFIG_NET_MULTIBUFFER might be useful. It might be possible
|
|
||||||
* to use this option to send and receive messages directly into the DMA
|
|
||||||
* buffers, saving a copy. There might be complications on the receiving
|
|
||||||
* side, however, where buffers may wrap and where the size of the received
|
|
||||||
* frame will typically be smaller than a full packet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MULTIBUFFER
|
|
||||||
# error CONFIG_NET_MULTIBUFFER must not be set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||||
@ -312,6 +301,19 @@ struct sam_emac_s
|
|||||||
|
|
||||||
static struct sam_emac_s g_emac;
|
static struct sam_emac_s g_emac;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SAM34_EMAC_PREALLOCATE
|
#ifdef CONFIG_SAM34_EMAC_PREALLOCATE
|
||||||
/* Preallocated data */
|
/* Preallocated data */
|
||||||
/* TX descriptors list */
|
/* TX descriptors list */
|
||||||
@ -3806,6 +3808,9 @@ void up_netinitialize(void)
|
|||||||
/* Initialize the driver structure */
|
/* Initialize the driver structure */
|
||||||
|
|
||||||
memset(priv, 0, sizeof(struct sam_emac_s));
|
memset(priv, 0, sizeof(struct sam_emac_s));
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
priv->dev.d_buf = g_pktbuf; /* Single packet buffer */
|
||||||
|
#endif
|
||||||
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
||||||
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
||||||
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
||||||
|
@ -199,18 +199,7 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* EMAC buffer sizes, number of buffers, and number of descriptors.
|
/* EMAC buffer sizes, number of buffers, and number of descriptors. *********/
|
||||||
*
|
|
||||||
* REVISIT: The CONFIG_NET_MULTIBUFFER might be useful. It might be possible
|
|
||||||
* to use this option to send and receive messages directly into the DMA
|
|
||||||
* buffers, saving a copy. There might be complications on the receiving
|
|
||||||
* side, however, where buffers may wrap and where the size of the received
|
|
||||||
* frame will typically be smaller than a full packet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MULTIBUFFER
|
|
||||||
# error CONFIG_NET_MULTIBUFFER must not be set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||||
@ -301,6 +290,19 @@ struct sam_emac_s
|
|||||||
|
|
||||||
static struct sam_emac_s g_emac;
|
static struct sam_emac_s g_emac;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SAMA5_EMACA_PREALLOCATE
|
#ifdef CONFIG_SAMA5_EMACA_PREALLOCATE
|
||||||
/* Preallocated data */
|
/* Preallocated data */
|
||||||
/* TX descriptors list */
|
/* TX descriptors list */
|
||||||
@ -3484,6 +3486,9 @@ int sam_emac_initialize(void)
|
|||||||
/* Initialize the driver structure */
|
/* Initialize the driver structure */
|
||||||
|
|
||||||
memset(priv, 0, sizeof(struct sam_emac_s));
|
memset(priv, 0, sizeof(struct sam_emac_s));
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
priv->dev.d_buf = g_pktbuf; /* Single packet buffer */
|
||||||
|
#endif
|
||||||
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
||||||
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
||||||
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
||||||
|
@ -305,18 +305,7 @@
|
|||||||
# define sam_dumppacket(m,a,n)
|
# define sam_dumppacket(m,a,n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* EMAC buffer sizes, number of buffers, and number of descriptors **********
|
/* EMAC buffer sizes, number of buffers, and number of descriptors **********/
|
||||||
*
|
|
||||||
* REVISIT: The CONFIG_NET_MULTIBUFFER might be useful. It might be possible
|
|
||||||
* to use this option to send and receive messages directly into the DMA
|
|
||||||
* buffers, saving a copy. There might be complications on the receiving
|
|
||||||
* side, however, where buffers may wrap and where the size of the received
|
|
||||||
* frame will typically be smaller than a full packet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MULTIBUFFER
|
|
||||||
# error CONFIG_NET_MULTIBUFFER must not be set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||||
@ -709,6 +698,21 @@ static const struct sam_emacattr_s g_emac0_attr =
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf0[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EMAC0 peripheral state */
|
||||||
|
|
||||||
static struct sam_emac_s g_emac0;
|
static struct sam_emac_s g_emac0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -777,6 +781,21 @@ static const struct sam_emacattr_s g_emac1_attr =
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf1[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EMAC1 peripheral state */
|
||||||
|
|
||||||
static struct sam_emac_s g_emac1;
|
static struct sam_emac_s g_emac1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4515,6 +4534,9 @@ int sam_emac_initialize(int intf)
|
|||||||
{
|
{
|
||||||
struct sam_emac_s *priv;
|
struct sam_emac_s *priv;
|
||||||
const struct sam_emacattr_s *attr;
|
const struct sam_emacattr_s *attr;
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
uint8_t *pktbuf;
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
uint8_t phytype;
|
uint8_t phytype;
|
||||||
#endif
|
#endif
|
||||||
@ -4526,6 +4548,10 @@ int sam_emac_initialize(int intf)
|
|||||||
priv = &g_emac0;
|
priv = &g_emac0;
|
||||||
attr = &g_emac0_attr;
|
attr = &g_emac0_attr;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
pktbuf = g_pktbuf0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
phytype = SAMA5_EMAC0_PHY_TYPE;
|
phytype = SAMA5_EMAC0_PHY_TYPE;
|
||||||
#endif
|
#endif
|
||||||
@ -4538,6 +4564,10 @@ int sam_emac_initialize(int intf)
|
|||||||
priv = &g_emac1;
|
priv = &g_emac1;
|
||||||
attr = &g_emac1_attr;
|
attr = &g_emac1_attr;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
pktbuf = g_pktbuf1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
phytype = SAMA5_EMAC1_PHY_TYPE;
|
phytype = SAMA5_EMAC1_PHY_TYPE;
|
||||||
#endif
|
#endif
|
||||||
@ -4553,6 +4583,9 @@ int sam_emac_initialize(int intf)
|
|||||||
|
|
||||||
memset(priv, 0, sizeof(struct sam_emac_s));
|
memset(priv, 0, sizeof(struct sam_emac_s));
|
||||||
priv->attr = attr; /* Save the constant attributes */
|
priv->attr = attr; /* Save the constant attributes */
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
priv->dev.d_buf = pktbuf; /* Single packet buffer */
|
||||||
|
#endif
|
||||||
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
||||||
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
||||||
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
||||||
|
@ -118,18 +118,7 @@
|
|||||||
# error Unknown PHY
|
# error Unknown PHY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GMAC buffer sizes, number of buffers, and number of descriptors.
|
/* GMAC buffer sizes, number of buffers, and number of descriptors. *********/
|
||||||
*
|
|
||||||
* REVISIT: The CONFIG_NET_MULTIBUFFER might be useful. It might be possible
|
|
||||||
* to use this option to send and receive messages directly into the DMA
|
|
||||||
* buffers, saving a copy. There might be complications on the receiving
|
|
||||||
* side, however, where buffers may wrap and where the size of the received
|
|
||||||
* frame will typically be smaller than a full packet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MULTIBUFFER
|
|
||||||
# error CONFIG_NET_MULTIBUFFER must not be set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
#define GMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||||
#define GMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
#define GMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||||
@ -227,6 +216,19 @@ struct sam_gmac_s
|
|||||||
|
|
||||||
static struct sam_gmac_s g_gmac;
|
static struct sam_gmac_s g_gmac;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SAMA5_GMAC_PREALLOCATE
|
#ifdef CONFIG_SAMA5_GMAC_PREALLOCATE
|
||||||
/* Preallocated data */
|
/* Preallocated data */
|
||||||
/* TX descriptors list */
|
/* TX descriptors list */
|
||||||
@ -3556,6 +3558,9 @@ int sam_gmac_initialize(void)
|
|||||||
/* Initialize the driver structure */
|
/* Initialize the driver structure */
|
||||||
|
|
||||||
memset(priv, 0, sizeof(struct sam_gmac_s));
|
memset(priv, 0, sizeof(struct sam_gmac_s));
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
priv->dev.d_buf = g_pktbuf; /* Single packet buffer */
|
||||||
|
#endif
|
||||||
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
||||||
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
||||||
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
||||||
|
@ -317,18 +317,7 @@
|
|||||||
# undef CONFIG_SAMV7_EMAC_REGDEBUG
|
# undef CONFIG_SAMV7_EMAC_REGDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* EMAC buffer sizes, number of buffers, and number of descriptors ***********
|
/* EMAC buffer sizes, number of buffers, and number of descriptors **********/
|
||||||
*
|
|
||||||
* REVISIT: The CONFIG_NET_MULTIBUFFER might be useful. It might be possible
|
|
||||||
* to use this option to send and receive messages directly into the DMA
|
|
||||||
* buffers, saving a copy. There might be complications on the receiving
|
|
||||||
* side, however, where buffers may wrap and where the size of the received
|
|
||||||
* frame will typically be smaller than a full packet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MULTIBUFFER
|
|
||||||
# error CONFIG_NET_MULTIBUFFER must not be set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Queue identifiers/indices */
|
/* Queue identifiers/indices */
|
||||||
|
|
||||||
@ -855,6 +844,21 @@ static const struct sam_emacattr_s g_emac0_attr =
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf0[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EMAC0 peripheral state */
|
||||||
|
|
||||||
static struct sam_emac_s g_emac0;
|
static struct sam_emac_s g_emac0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -923,6 +927,21 @@ static const struct sam_emacattr_s g_emac1_attr =
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
/* A single packet buffer is used
|
||||||
|
*
|
||||||
|
* REVISIT: It might be possible to use this option to send and receive
|
||||||
|
* messages directly into the DMA buffers, saving a copy. There might be
|
||||||
|
* complications on the receiving side, however, where buffers may wrap
|
||||||
|
* and where the size of the received frame will typically be smaller than
|
||||||
|
* a full packet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static uint8_t g_pktbuf1[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EMAC1 peripheral state */
|
||||||
|
|
||||||
static struct sam_emac_s g_emac1;
|
static struct sam_emac_s g_emac1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5081,6 +5100,9 @@ int sam_emac_initialize(int intf)
|
|||||||
{
|
{
|
||||||
struct sam_emac_s *priv;
|
struct sam_emac_s *priv;
|
||||||
const struct sam_emacattr_s *attr;
|
const struct sam_emacattr_s *attr;
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
uint8_t *pktbuf;
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
uint8_t phytype;
|
uint8_t phytype;
|
||||||
#endif
|
#endif
|
||||||
@ -5092,6 +5114,10 @@ int sam_emac_initialize(int intf)
|
|||||||
priv = &g_emac0;
|
priv = &g_emac0;
|
||||||
attr = &g_emac0_attr;
|
attr = &g_emac0_attr;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
pktbuf = g_pktbuf0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
phytype = SAMV7_EMAC0_PHY_TYPE;
|
phytype = SAMV7_EMAC0_PHY_TYPE;
|
||||||
#endif
|
#endif
|
||||||
@ -5104,6 +5130,10 @@ int sam_emac_initialize(int intf)
|
|||||||
priv = &g_emac1;
|
priv = &g_emac1;
|
||||||
attr = &g_emac1_attr;
|
attr = &g_emac1_attr;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
pktbuf = g_pktbuf1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
phytype = SAMV7_EMAC1_PHY_TYPE;
|
phytype = SAMV7_EMAC1_PHY_TYPE;
|
||||||
#endif
|
#endif
|
||||||
@ -5119,6 +5149,9 @@ int sam_emac_initialize(int intf)
|
|||||||
|
|
||||||
memset(priv, 0, sizeof(struct sam_emac_s));
|
memset(priv, 0, sizeof(struct sam_emac_s));
|
||||||
priv->attr = attr; /* Save the constant attributes */
|
priv->attr = attr; /* Save the constant attributes */
|
||||||
|
#ifdef CONFIG_NET_MULTIBUFFER
|
||||||
|
priv->dev.d_buf = pktbuf; /* Single packet buffer */
|
||||||
|
#endif
|
||||||
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
priv->dev.d_ifup = sam_ifup; /* I/F up (new IP address) callback */
|
||||||
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
priv->dev.d_ifdown = sam_ifdown; /* I/F down callback */
|
||||||
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
priv->dev.d_txavail = sam_txavail; /* New TX data callback */
|
||||||
|
Loading…
Reference in New Issue
Block a user