aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/macsec.h
diff options
context:
space:
mode:
authorAles Nezbeda <anezbeda@redhat.com>2025-01-17 12:22:28 +0100
committerDavid S. Miller <davem@davemloft.net>2025-01-20 12:20:42 +0000
commit457bb7970a0f10effd6b4ca9e1057727963c473a (patch)
tree1b5f0117668cdde53094006a65979b10ba7d1e39 /include/net/macsec.h
parenttipc: re-order conditions in tipc_crypto_key_rcv() (diff)
downloadwireguard-linux-457bb7970a0f10effd6b4ca9e1057727963c473a.tar.xz
wireguard-linux-457bb7970a0f10effd6b4ca9e1057727963c473a.zip
net: macsec: Add endianness annotations in salt struct
This change resolves warning produced by sparse tool as currently there is a mismatch between normal generic type in salt and endian annotated type in macsec driver code. Endian annotated types should be used here. Sparse output: warning: restricted ssci_t degrades to integer warning: incorrect type in assignment (different base types) expected restricted ssci_t [usertype] ssci got unsigned int warning: restricted __be64 degrades to integer warning: incorrect type in assignment (different base types) expected restricted __be64 [usertype] pn got unsigned long long Signed-off-by: Ales Nezbeda <anezbeda@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/net/macsec.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/macsec.h b/include/net/macsec.h
index de216cbc6b05..bc7de5b53e54 100644
--- a/include/net/macsec.h
+++ b/include/net/macsec.h
@@ -38,8 +38,8 @@ struct metadata_dst;
typedef union salt {
struct {
- u32 ssci;
- u64 pn;
+ ssci_t ssci;
+ __be64 pn;
} __packed;
u8 bytes[MACSEC_SALT_LEN];
} __packed salt_t;