From nobody Mon Nov 25 04:55:34 2024 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 9C6C61EABC2; Wed, 30 Oct 2024 13:55:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730296515; cv=none; b=FyxQD2MEcDcgP88BSpS6Eb5KMYSR6BeNvCoJaGLTpouqLmvlckUBU1vk1RJBQ9c2x2qy3q44chPMFBPMgnAdxa0aygrzZGCrguARWdLFGmOh9AW0geooxo9tiUWsNqkTJKmVhCjPWuN3jiZ58Rt4j8oM4J+n0oLy2rqInppTFCw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730296515; c=relaxed/simple; bh=IAFUp26Tk+HepYQIJvCxXFzVAc85ii3dgXL7sdvBk5g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UcLhac+toylhGykfkNrhKGcEGP5v5XACIMaa5Pvr8kS4aNNLEMYV64NylqTYntFn8I1yxSsvUveFatCHLVzIpZnHllkHTfQu5yKl9QYYfX1Sxx+aFkox8C7GhxSfNyM6s7gHzCTv6yL/lo7O4/OZNPIzXy8pSmMqU5mk0SIcpH8= 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=mK99Zelw; arc=none smtp.client-ip=217.70.183.197 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="mK99Zelw" Received: by mail.gandi.net (Postfix) with ESMTPSA id B33F61C0003; Wed, 30 Oct 2024 13:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1730296505; 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=z3cAfcqq9RVBONC6stHBOxApuyGQAPKmAY/mIsUgcIo=; b=mK99ZelwB+9SwpdNhw24Gz4ZvBJkfGBmympyKT0yvywY1O9tMDBxXP0hxj0nc4oSmxxZkk ZoPsG6s6N10OAw+lWJWcd7+TSX5QLKdwwq3HHrDZi/J99pV/jIi4zqQ3ybOlCmDwW55Kuz hxub9nkQdRN8CVmKnkGcFEPCLkZ/tCJyM7hrCnbEHEO/itpQLVnZD6spCzA7j4abAwwobl upMuYQuzC9gdQNkfwTdjNtI6aBL2PCpkUBSVwnvVLGdx9jfSNGKNUyFdFmC6tpjRnFzVa+ 4QVFSiXBn9VzKRANlwGFkblvbauGLv/f9Nj5LXWHFsPfI7ldCVNA1Ga5+DFGXA== From: Kory Maincent Date: Wed, 30 Oct 2024 14:54:44 +0100 Subject: [PATCH net-next v19 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: <20241030-feature_ptp_netnext-v19-2-94f8aadc9d5c@bootlin.com> References: <20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@bootlin.com> In-Reply-To: <20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@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 67cf68817f23..1f09930fca26 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