Network packet buffers should be aligned to PKTALIGN. Add a compiler
attribute to ensure this.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[jf: use __aligned(x) from <linux/compiler_attributes.h>]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
#include <dm/device.h>
#include <dm/uclass.h>
#include <hexdump.h>
+#include <linux/compiler_attributes.h>
#include <linux/kernel.h>
#include <lwip/ip4_addr.h>
#include <lwip/dns.h>
int net_try_count;
static int net_restarted;
int net_restart_wrap;
-static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN];
+static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN]
+ __aligned(PKTALIGN);
uchar *net_rx_packets[PKTBUFSRX];
uchar *net_rx_packet;
const u8 net_bcast_ethaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };