lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220906083754.2183092-1-oliver@schinagl.nl>
Date:   Tue,  6 Sep 2022 10:37:54 +0200
From:   Olliver Schinagl <oliver@...inagl.nl>
To:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        "Gustavo A . R . Silva" <gustavoars@...nel.org>
Cc:     Alexandru Tachici <alexandru.tachici@...log.com>,
        Hao Chen <chenhao288@...ilicon.com>,
        Olliver Schinagl <oliver+list@...inagl.nl>,
        Andrew Lunn <andrew@...n.ch>,
        "David S . Miller" <davem@...emloft.net>,
        Ido Schimmel <idosch@...dia.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Olliver Schinagl <oliver@...inagl.nl>
Subject: [PATCH] linkstate: Add macros for link state up/down

The phylink_link_state.state property can be up or down, via 1 and 0.

The other link state's (speed, duplex) are defined in ethtool.h so lets
add defines for the link-state there as well so we can use macro's to
define our up/down states.

Signed-off-by: Olliver Schinagl <oliver@...inagl.nl>
---
 include/uapi/linux/ethtool.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 2d5741fd44bb..3a00e2f64d87 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1857,6 +1857,10 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 #define XCVR_DUMMY2		0x03
 #define XCVR_DUMMY3		0x04
 
+/* Linkstate, Up or Down */
+#define LINKSTATE_DOWN		0x0
+#define LINKSTATE_UP		0x1
+
 /* Enable or disable autonegotiation. */
 #define AUTONEG_DISABLE		0x00
 #define AUTONEG_ENABLE		0x01
-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ