summaryrefslogtreecommitdiffstats
path: root/libs/NCSI/include/Ethernet.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/NCSI/include/Ethernet.h')
-rw-r--r--libs/NCSI/include/Ethernet.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/NCSI/include/Ethernet.h b/libs/NCSI/include/Ethernet.h
index ce7ba34..e5851c7 100644
--- a/libs/NCSI/include/Ethernet.h
+++ b/libs/NCSI/include/Ethernet.h
@@ -466,9 +466,6 @@ typedef struct
#define CAPABILITIES_MULTICAST (1 << 4)
typedef union {
- // Ethernet frame must be at least 64 bytes.
- uint32_t words[ETHERNET_FRAME_MIN/4];
-
EthernetHeader_t header;
/* Control Packets */
@@ -494,6 +491,7 @@ typedef union {
VersionResponsePacket_t version;
} __attribute__((packed)) NetworkFrame_t;
-
+// Ethernet frame must be at least 64 bytes.
+_Static_assert(sizeof(NetworkFrame_t) >= ETHERNET_FRAME_MIN, "NetworkFrame_t must be at least ETHERNET_FRAME_MIN bytes");
#endif /* ETHERNET_H */
OpenPOWER on IntegriCloud