From patchwork Wed Oct 11 22:12:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13418010 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79EC73E47B for ; Wed, 11 Oct 2023 22:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Xvyqnpsh" Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 745A5AF for ; Wed, 11 Oct 2023 15:13:12 -0700 (PDT) Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-775751c35d4so20909385a.0 for ; Wed, 11 Oct 2023 15:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1697062391; x=1697667191; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=o2Bh9gNnh3A0IybhaZX53wHaJJr5epn3uPcTBo/IM8Q=; b=XvyqnpshoVNDpCtMVbXh83Vv5mFEsUG9gskTXqgyB2ueyq1HqPm8wAzBN+rdGNYRd9 Ps39cnVgltj9wnHq3KF5+N3Duy8InvrVUC52uMrfWpQK4egz/ZVBS7/g6W8Lewg8549W 71CCQ4a6UIDkypXu8FCW5TQ9T6y2IK+DquW5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697062391; x=1697667191; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o2Bh9gNnh3A0IybhaZX53wHaJJr5epn3uPcTBo/IM8Q=; b=SmUrL1a+oesiNbZrUJtk5il6oQ8HcoyLsgddrvPm9beUFLbVbdUTFLLNuz7ffst1n1 5IVR8JFlSoTji3D2qinyXODQAnrlAwoZ74YKdvTgIUXev3BOy30HdJB0Npugak+V+IEy 5UGUD+KpCe15zlzUjeahCNPvjo6UuBHFE50VXBh122eVlmUx756KxO69XDT9rlWCGOlH 09fMmK25mVDyTJaMiyLIcjBpn2l9MbNhqlQniHJSNpcftyFaElOYQxgalJku9wEHEYnq PWAg8hbIaRSEfkGCKohAm2Sl3A4ROVI9h/MYNgn/IM2Ti3LT1lwh9dCwpHWTiniGS91M /LEQ== X-Gm-Message-State: AOJu0YywUicGy/gR5gnmBD726YS0j0ebqD9Pjih9H1Or58QYmfsZeREz RHzepipCXY49SsFQUYsQ2T5SBQgQrcObfl2Sy5TzCAotKKzrKV0eNnuH4+K7WeEnnnmlYjmskQO xvUHr7tfRTTJBHw6LT6hVflo5fxSqgP9Mvo2UrnlEX/NSCHMItu3xyOWxdoTOs7u7Xte4kWOBoU hMgmpzLKemzw== X-Google-Smtp-Source: AGHT+IFQ7rVYihdm5ov2ofoywW3yR40k8HlUPajh4MrjweNC5l5BdJZ0cx+WSHEn6g/PhmS//jilJQ== X-Received: by 2002:a05:620a:24c1:b0:76d:aa93:2e3c with SMTP id m1-20020a05620a24c100b0076daa932e3cmr26636543qkn.24.1697062391185; Wed, 11 Oct 2023 15:13:11 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id a12-20020a05620a102c00b007759a81d88esm5505705qkk.50.2023.10.11.15.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 15:13:10 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , opendmb@gmail.com, justin.chen@broadcom.com, Michal Kubecek Subject: [PATCH ethtool 1/2] update UAPI header copies for WAKE_MDA support Date: Wed, 11 Oct 2023 15:12:40 -0700 Message-Id: <20231011221242.4180589-3-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231011221242.4180589-1-florian.fainelli@broadcom.com> References: <20231011221242.4180589-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Signed-off-by: Florian Fainelli --- uapi/linux/ethtool.h | 10 ++++++++-- uapi/linux/ethtool_netlink.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h index 1d0731b3d289..32eb2aac542c 100644 --- a/uapi/linux/ethtool.h +++ b/uapi/linux/ethtool.h @@ -205,12 +205,17 @@ struct ethtool_drvinfo { * @wolopts: Bitmask of %WAKE_* flags for enabled Wake-On-Lan modes. * @sopass: SecureOn(tm) password; meaningful only if %WAKE_MAGICSECURE * is set in @wolopts. + * @mac_da: Destination MAC address to match; meaningful only if + * %WAKE_MDA is set in @wolopts. */ struct ethtool_wolinfo { __u32 cmd; __u32 supported; __u32 wolopts; - __u8 sopass[SOPASS_MAX]; + union { + __u8 sopass[SOPASS_MAX]; + __u8 mac_da[ETH_ALEN]; + }; }; /* for passing single values */ @@ -1987,8 +1992,9 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) #define WAKE_MAGIC (1 << 5) #define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ #define WAKE_FILTER (1 << 7) +#define WAKE_MDA (1 << 8) -#define WOL_MODE_COUNT 8 +#define WOL_MODE_COUNT 9 /* L2-L4 network traffic flow types */ #define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */ diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h index a8b0d79dad95..6e168dd7eb1c 100644 --- a/uapi/linux/ethtool_netlink.h +++ b/uapi/linux/ethtool_netlink.h @@ -300,6 +300,7 @@ enum { ETHTOOL_A_WOL_HEADER, /* nest - _A_HEADER_* */ ETHTOOL_A_WOL_MODES, /* bitset */ ETHTOOL_A_WOL_SOPASS, /* binary */ + ETHTOOL_A_WOL_MAC_DA, /* binary */ /* add new constants above here */ __ETHTOOL_A_WOL_CNT,