From nobody Tue Nov 26 00:45:03 2024 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 593701B4F24; Wed, 23 Oct 2024 15:49:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729698588; cv=none; b=c1X8S8Z5uJ0dLWUD/aNBk/SePGRPBoLZRJdDN06cI4++5R+LGJv+01HtP0EMD6+wwv1ZFygQk+1dsBJj8SRqe9s/J9qOS9vY8nGnRq4RGXNw/tYhADBlk9FWOOR7XcMkTkRHVJkxY0K11+nh21hRs9ltSv4w7Dq6MJoM6W2zQEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729698588; c=relaxed/simple; bh=Z5F+gRuyjpjilrdbA5bMFo7u7sroHcMN3AMvAOTiAgY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ngF6OwMkXMUjHdVHwpaS2v3ENAJDFVxmH4h1AD5dimp5uV8r59xjzcGxoPpCZ2FgpSQWaWhuQNbeYJ35Pyu9k0eZ58y3jFHZ1msvlw/3/zL67QK8whtHjSLI+iqINPjdfHqA8EouOF4zVl91zHy1Xbmq+oXCzJD5tnUcUEVSPjI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fnMQioEH; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fnMQioEH" Received: by mail.gandi.net (Postfix) with ESMTPSA id B828F6000B; Wed, 23 Oct 2024 15:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1729698579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NikOutSdp/PZB/lx17k9fqduga0Q4cPoy/WO9ABlm3U=; b=fnMQioEHWnREvas9a09UggoEA/1DBQ7UafOX7vFjP+tCFAtyemuT5I55KF9LBEoTG3el7o ivDXzd1f1z9JkK2UnYWesCwuB6XbC/MjeSqwcf4UoQJ1GsUmsW6Yog7Wr5rQIlxYO2CALs 8Wt6Z3cLQrzUvnJmb0IsV+lDcVv6dheGZjBpAvogjMVtPdpZzrSI3tTnUMAh8fBsLxjHVm OuWEkhNfs+3vMDJ3DMtylD3TCsWcDtOyF5S1gVjs01ZhwH4pJcFgqQAWoILUyPoKpeSUMR n1ecIKHI17sHjFmeI7yC6noQ9gG7hcADusbLPo0TZUjXoOZI2c1cVcxv45LFnQ== From: Kory Maincent Date: Wed, 23 Oct 2024 17:49:12 +0200 Subject: [PATCH net-next v18 02/10] net: Make net_hwtstamp_validate accessible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241023-feature_ptp_netnext-v18-2-ed948f3b6887@bootlin.com> References: <20241023-feature_ptp_netnext-v18-0-ed948f3b6887@bootlin.com> In-Reply-To: <20241023-feature_ptp_netnext-v18-0-ed948f3b6887@bootlin.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean , donald.hunter@gmail.com, danieller@nvidia.com, ecree.xilinx@gmail.com, Andrew Lunn Cc: Thomas Petazzoni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Willem de Bruijn , Shannon Nelson , Alexandra Winter , Kory Maincent , Jacob Keller X-Mailer: b4 0.14.1 X-GND-Sasl: kory.maincent@bootlin.com Make the net_hwtstamp_validate function accessible in prevision to use it from ethtool to validate the hwtstamp configuration before setting it. Reviewed-by: Florian Fainelli Reviewed-by: Jacob Keller Signed-off-by: Kory Maincent --- Change in v8: - New patch Change in v10: - Remove export symbol as ethtool can't be built as a module. - Move the declaration to net/core/dev.h instead of netdevice.h --- net/core/dev.h | 1 + net/core/dev_ioctl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/dev.h b/net/core/dev.h index a1267cff715e..9653e2ff89f2 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -287,5 +287,6 @@ int dev_set_hwtstamp_phylib(struct net_device *dev, struct netlink_ext_ack *extack); int dev_get_hwtstamp_phylib(struct net_device *dev, struct kernel_hwtstamp_config *cfg); +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg); =20 #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 0267564664b4..2128dc7f5bfb 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -184,7 +184,7 @@ static int dev_ifsioc_locked(struct net *net, struct if= req *ifr, unsigned int cm return err; } =20 -static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) { enum hwtstamp_tx_types tx_type; enum hwtstamp_rx_filters rx_filter; --=20 2.34.1