enetc: Fix endianness issues for enetc_ethtool
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Thu, 19 Nov 2020 10:12:14 +0000 (12:12 +0200)
committerXiaobo Xie <xiaobo.xie@nxp.com>
Thu, 29 Apr 2021 07:59:57 +0000 (09:59 +0200)
These particular fields are specified in the H/W reference
manual as having network byte order format, so enforce big
endian annotation for them and clear the related sparse
warnings in the process.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit d548d3930ab635653d1549c864ce1a002dc3b218)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
drivers/net/ethernet/freescale/enetc/enetc_hw.h

index e3065b2..d1d6c5d 100644 (file)
@@ -614,10 +614,10 @@ struct enetc_cmd_rfse {
        u8 smac_m[6];
        u8 dmac_h[6];
        u8 dmac_m[6];
-       u32 sip_h[4];
-       u32 sip_m[4];
-       u32 dip_h[4];
-       u32 dip_m[4];
+       __be32 sip_h[4];
+       __be32 sip_m[4];
+       __be32 dip_h[4];
+       __be32 dip_m[4];
        u16 ethtype_h;
        u16 ethtype_m;
        u16 ethtype4_h;