[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231011221242.4180589-3-florian.fainelli@broadcom.com>
Date: Wed, 11 Oct 2023 15:12:40 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: netdev@...r.kernel.org
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jonathan Corbet <corbet@....net>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
opendmb@...il.com,
justin.chen@...adcom.com,
Michal Kubecek <mkubecek@...e.cz>
Subject: [PATCH ethtool 1/2] update UAPI header copies for WAKE_MDA support
Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
---
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,
--
2.34.1
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)
Powered by blists - more mailing lists