Fix bug #50883: struct eth_addr alignment does not fit with ETHADDR16_COPY

... by simply removing ETHADDR16_COPY since noone advocated to keep it
This commit is contained in:
Dirk Ziegelmeier
2017-07-30 17:48:16 +02:00
parent 500598658d
commit 006bb84368
5 changed files with 6 additions and 14 deletions

View File

@@ -314,8 +314,6 @@ struct netif {
/** maximum transfer unit (in bytes) */
u16_t mtu;
/** link level hardware address of this interface */
/* Ensure hwaddr is 16-bit aligned by placing it behind u16_t value
* because it is accessed via ETHADDR16_COPY() macro in etharp.c and autoip.c */
u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
/** number of bytes used in hwaddr */
u8_t hwaddr_len;

View File

@@ -153,12 +153,6 @@ enum eth_type {
#define LL_IP6_MULTICAST_ADDR_0 0x33
#define LL_IP6_MULTICAST_ADDR_1 0x33
/** MEMCPY-like macro to copy to/from struct eth_addr's that are no local
* variables and known to be 16-bit aligned within the protocol header. */
#ifndef ETHADDR16_COPY
#define ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN)
#endif
#define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0)
#ifdef __cplusplus