]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: macsec: move sci_to_cpu to macsec header
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Tue, 19 Dec 2023 14:53:27 +0000 (16:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Dec 2023 13:08:09 +0000 (13:08 +0000)
Move sci_to_cpu to the MACsec header to use it in drivers.

Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/macsec.c
include/net/macsec.h

index 0d5f50430dd38aa3a55c2edb205a76b0662d92fd..aa007b1e4b785e3689ab8d1260c9474eb7b98fa7 100644 (file)
@@ -3,11 +3,6 @@
 #include <net/macsec.h>
 #include "netdevsim.h"
 
-static inline u64 sci_to_cpu(sci_t sci)
-{
-       return be64_to_cpu((__force __be64)sci);
-}
-
 static int nsim_macsec_find_secy(struct netdevsim *ns, sci_t sci)
 {
        int i;
index ebf9bc54036a5f2a24828ce0959b92c3be17a178..a5665e9623f2f43fb3ef48978393a8c7f1223931 100644 (file)
@@ -325,4 +325,9 @@ static inline void *macsec_netdev_priv(const struct net_device *dev)
        return netdev_priv(dev);
 }
 
+static inline u64 sci_to_cpu(sci_t sci)
+{
+       return be64_to_cpu((__force __be64)sci);
+}
+
 #endif /* _NET_MACSEC_H_ */