From c719c466b3a1cfa8ad7b55fa51070ab32047a00e Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 23 Aug 2016 20:41:37 +0200 Subject: [PATCH] Remove SIZEOF_ETHARP_PACKET_TX #define, it is not needed any more after my last cleanups --- src/core/ipv4/etharp.c | 4 ++-- src/include/lwip/etharp.h | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/core/ipv4/etharp.c b/src/core/ipv4/etharp.c index b6db8a0f..364023e4 100644 --- a/src/core/ipv4/etharp.c +++ b/src/core/ipv4/etharp.c @@ -1125,7 +1125,7 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, LWIP_ASSERT("netif != NULL", netif != NULL); /* allocate a pbuf for the outgoing ARP request packet */ - p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_PACKET_TX, PBUF_RAM); + p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); /* could allocate a pbuf for an ARP request? */ if (p == NULL) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, @@ -1134,7 +1134,7 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, return ERR_MEM; } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", - (p->len >= SIZEOF_ETHARP_PACKET_TX)); + (p->len >= SIZEOF_ETHARP_HDR)); hdr = (struct etharp_hdr *)p->payload; LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); diff --git a/src/include/lwip/etharp.h b/src/include/lwip/etharp.h index b1cebf57..7080a19d 100644 --- a/src/include/lwip/etharp.h +++ b/src/include/lwip/etharp.h @@ -60,13 +60,6 @@ extern "C" { #include "lwip/prot/etharp.h" -#define SIZEOF_ETHARP_PACKET (SIZEOF_ETH_HDR + SIZEOF_ETHARP_HDR) -#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) -#define SIZEOF_ETHARP_PACKET_TX (SIZEOF_ETHARP_PACKET + SIZEOF_VLAN_HDR) -#else /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ -#define SIZEOF_ETHARP_PACKET_TX SIZEOF_ETHARP_PACKET -#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ - /** 1 seconds period */ #define ARP_TMR_INTERVAL 1000