diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-15 09:13:50 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-15 09:13:50 -0600 |
commit | 1652b3db885608077b6822d3faf6ec6842a7ec6b (patch) | |
tree | f61d980678c6b1fc09f032448a09df5fcd96ad5e /nuttx | |
parent | b50f13c1217e62453224096279dff2c8b1248b13 (diff) | |
download | nuttx-1652b3db885608077b6822d3faf6ec6842a7ec6b.tar.gz nuttx-1652b3db885608077b6822d3faf6ec6842a7ec6b.tar.bz2 nuttx-1652b3db885608077b6822d3faf6ec6842a7ec6b.zip |
Remove use of NET_LL_HDRLEN from net/arp logic. Use ETH_HDRLEN instead
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/net/arp/arp_arpin.c | 6 | ||||
-rw-r--r-- | nuttx/net/arp/arp_format.c | 4 | ||||
-rw-r--r-- | nuttx/net/arp/arp_ipin.c | 2 | ||||
-rw-r--r-- | nuttx/net/arp/arp_out.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/net/arp/arp_arpin.c b/nuttx/net/arp/arp_arpin.c index 80cf623c9..eed1539a6 100644 --- a/nuttx/net/arp/arp_arpin.c +++ b/nuttx/net/arp/arp_arpin.c @@ -60,7 +60,7 @@ ****************************************************************************/ #define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0]) -#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN]) +#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN]) /**************************************************************************** * Private Types @@ -106,7 +106,7 @@ void arp_arpin(FAR struct net_driver_s *dev) FAR struct arp_hdr_s *parp = ARPBUF; in_addr_t ipaddr; - if (dev->d_len < (sizeof(struct arp_hdr_s) + NET_LL_HDRLEN)) + if (dev->d_len < (sizeof(struct arp_hdr_s) + ETH_HDRLEN)) { nlldbg("Too small\n"); dev->d_len = 0; @@ -146,7 +146,7 @@ void arp_arpin(FAR struct net_driver_s *dev) arp_dump(parp); peth->type = HTONS(ETHTYPE_ARP); - dev->d_len = sizeof(struct arp_hdr_s) + NET_LL_HDRLEN; + dev->d_len = sizeof(struct arp_hdr_s) + ETH_HDRLEN; } break; diff --git a/nuttx/net/arp/arp_format.c b/nuttx/net/arp/arp_format.c index 96546cc3b..50a3054e1 100644 --- a/nuttx/net/arp/arp_format.c +++ b/nuttx/net/arp/arp_format.c @@ -60,7 +60,7 @@ ****************************************************************************/ #define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0]) -#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN]) +#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN]) /**************************************************************************** * Private Types @@ -115,7 +115,7 @@ void arp_format(FAR struct net_driver_s *dev, in_addr_t ipaddr) arp->ah_protolen = 4; eth->type = HTONS(ETHTYPE_ARP); - dev->d_len = sizeof(struct arp_hdr_s) + NET_LL_HDRLEN; + dev->d_len = sizeof(struct arp_hdr_s) + ETH_HDRLEN; } #endif /* CONFIG_NET_ARP */ diff --git a/nuttx/net/arp/arp_ipin.c b/nuttx/net/arp/arp_ipin.c index 1c39405d6..ddd7102a1 100644 --- a/nuttx/net/arp/arp_ipin.c +++ b/nuttx/net/arp/arp_ipin.c @@ -57,7 +57,7 @@ ****************************************************************************/ #define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0]) -#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN]) +#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[ETH_HDRLEN]) /**************************************************************************** * Private Types diff --git a/nuttx/net/arp/arp_out.c b/nuttx/net/arp/arp_out.c index d365dfdc2..7e77bfc4a 100644 --- a/nuttx/net/arp/arp_out.c +++ b/nuttx/net/arp/arp_out.c @@ -58,8 +58,8 @@ ****************************************************************************/ #define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0]) -#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN]) -#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN]) +#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN]) +#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[ETH_HDRLEN]) /**************************************************************************** * Private Types @@ -247,7 +247,7 @@ void arp_out(FAR struct net_driver_s *dev) memcpy(peth->src, dev->d_mac.ether_addr_octet, ETHER_ADDR_LEN); peth->type = HTONS(ETHTYPE_IP); - dev->d_len += NET_LL_HDRLEN; + dev->d_len += ETH_HDRLEN; } #endif /* CONFIG_NET_ARP */ |