From nobody Mon Apr 6 15:41:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEEA4C38145 for ; Tue, 6 Sep 2022 08:42:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239317AbiIFImi (ORCPT ); Tue, 6 Sep 2022 04:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239335AbiIFImJ (ORCPT ); Tue, 6 Sep 2022 04:42:09 -0400 Received: from 7of9.schinagl.nl (7of9.connected.by.freedominter.net [185.238.129.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E5527A759; Tue, 6 Sep 2022 01:38:23 -0700 (PDT) Received: from localhost (7of9.are-b.org [127.0.0.1]) by 7of9.schinagl.nl (Postfix) with ESMTP id 3E344186D925; Tue, 6 Sep 2022 10:37:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1662453478; bh=aXwLTb+hD9KUw7lePfE8Qw+Eb84hrWFhNIrpepLA8Ss=; h=From:To:Cc:Subject:Date; b=bPxs1addoZHE9rR2YE8noQg9liWZHnastXqDhtINubz9HZCVc9UDsy80ECV56Rxs1 SRWrZDLnpgiRoc79OdyL8n6R3hLuQ17NRogayujA3UeDaJVq2J9yOmIF+vFbaRod8c Loa/NMj365DUHfiXjwhR59D1PW8O7fVJU+HrDLvQ= X-Virus-Scanned: amavisd-new at schinagl.nl Received: from 7of9.schinagl.nl ([127.0.0.1]) by localhost (7of9.schinagl.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id L5NP1EfV7y3q; Tue, 6 Sep 2022 10:37:57 +0200 (CEST) Received: from valexia.are-b.org (unknown [10.2.11.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by 7of9.schinagl.nl (Postfix) with ESMTPSA id 272A0186D91D; Tue, 6 Sep 2022 10:37:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1662453477; bh=aXwLTb+hD9KUw7lePfE8Qw+Eb84hrWFhNIrpepLA8Ss=; h=From:To:Cc:Subject:Date; b=ho80HkmdEi/4Wj6SMvP0++4Prn8JR3DrCx1B9e/CwMHR1DJCV4hEAt4H3shLjUTsm NnJ5WAcVcZ+JX8gms6M61RDR6ztQ5WCExpTeYbsrfUC7ST+rnzr4sHHuh+AcXHZJj0 paI1tzSyGm1ZLk1ocVUGiisaTImRqQKBlGBlhlCg= From: Olliver Schinagl To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "Gustavo A . R . Silva" Cc: Alexandru Tachici , Hao Chen , Olliver Schinagl , Andrew Lunn , "David S . Miller" , Ido Schimmel , Jakub Kicinski , Olliver Schinagl Subject: [PATCH] linkstate: Add macros for link state up/down Date: Tue, 6 Sep 2022 10:37:54 +0200 Message-Id: <20220906083754.2183092-1-oliver@schinagl.nl> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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 duple= x) #define XCVR_DUMMY2 0x03 #define XCVR_DUMMY3 0x04 =20 +/* Linkstate, Up or Down */ +#define LINKSTATE_DOWN 0x0 +#define LINKSTATE_UP 0x1 + /* Enable or disable autonegotiation. */ #define AUTONEG_DISABLE 0x00 #define AUTONEG_ENABLE 0x01 --=20 2.37.2