Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1199672rdb; Fri, 16 Feb 2024 08:08:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxU1kO7ov5ceajjGahMI7jpUVauYYu3lMGquPcKdzRTF1yMy7CsXpIseIpQip16joFK4ROu8Efel6Icav2D0BuY+RNdv1h6mwaV3oz8w== X-Google-Smtp-Source: AGHT+IH0mqv4vp1WdsSMOBmpjpr/Gea2MAEnoGdFSTYfiajM4N6FhPR5ppUTIcIhYqYL3+TfEsOb X-Received: by 2002:a05:6a20:71c9:b0:19c:6cae:508e with SMTP id t9-20020a056a2071c900b0019c6cae508emr4743706pzb.36.1708099681184; Fri, 16 Feb 2024 08:08:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708099681; cv=pass; d=google.com; s=arc-20160816; b=f3D6Vy8MN0zn8BsKDtRoUjhYYK8ol9rYiik3jaWV2SAymhacknm/GjvY0U4F0NxO6m w1rWjAnLuoZTjwopjK5T9SbfALo/J3Odyui3NrVWdPYY7cHAyxjIdBfqrsS//PJxpqHv AYcQRqS2UB1n7mpXrg8F54KswFVHarRkRzas/CzMQ5P3Ht9ZJbxi7ccmN79MK6jRciXH pnzQt9eAR7gisaJMphu14964ShJtxu0Vooeg8EJPOBsyG5LG+E9abqjY1ogScIQEP23H AvaIUuyODAwrZ9HkL/euCaLB4zQFJ0E6qkOj9SDYYn5RnfbFGUi4vSpupi78xyuTGYBL wWjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=u126WbGtnDgFCy3tvttwAlHJg1ScL3beIrXWK0ZN9vY=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=vpErJv4jf4WV8eysTS8mdmg6XzhQ5Q+4abaXeosULadeY48gHhDKAA7Y0p/mFm+wtw HDIC6HDXrfT5CBXAuPbWXKjPQ/obwizqADQzjpeD193jRxJdEbFWVUcVHz9/8rjKzdUl 2C8XGjceGz7mioiigEFKm7fr2nUatP2h7FkuvxOEDZrERmnuSlUE7shIOacFfMoiQm/B BWIH8ePSCYKduN9ZliLQkUOPe2KTeXfjHTHwLoo975CnWj9+QRzosekG3PARBnFwPyFO hCe+IX8DrfMIzIiv/GMKuRrHsyWeoItA1fOKW9WzD9zOrYMf5Zgtlk+vAE1sXvwTHC0F oE8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QISedQ2q; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-68911-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68911-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 35-20020a630e63000000b005dcc035ca8fsi81584pgo.561.2024.02.16.08.08.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 08:08:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68911-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QISedQ2q; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-68911-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68911-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 61AEEB24A00 for ; Fri, 16 Feb 2024 15:53:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5670130E32; Fri, 16 Feb 2024 15:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="QISedQ2q" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 78BF212F361; Fri, 16 Feb 2024 15:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098787; cv=none; b=bNivhShLqJMQRklkZvlWr7dJeyB4A00ZsRXxZ2tIJBOXAIkjLPfPuqj5zxWwDRUTGQD1R7c3fMKr/Xk0FUh7s94ZwopZ2KZfHMW3Zdi9iSUJfG0pG0ZnNuPL83bskKb3GETTsu0Oa7IeCC9cB6Wln2fnxp+/FrZLGKRJAt9LdFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098787; c=relaxed/simple; bh=/eZVwRgt2j1BXqRGlnyzPhAuRD9XUH7xvoTcScbOTyM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IK6T8ecT4o3Tm7yPgs0zNR8TSOaCdW0KHVaRvGlmU2QWrG3kvZj4uABvvHL7z9XzvFHVGihto1o2n3JujBSB0kUwM4XUdGaKq5raKPjbdTdTFVHyH7dWVcqL3jXzmgRjXVrNul3QtaC2mE41fj5ZFAlQc+BwrkKdCYugI9AUlCQ= 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=QISedQ2q; arc=none smtp.client-ip=217.70.183.193 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 Received: by mail.gandi.net (Postfix) with ESMTPSA id 535DE240010; Fri, 16 Feb 2024 15:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708098778; 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=u126WbGtnDgFCy3tvttwAlHJg1ScL3beIrXWK0ZN9vY=; b=QISedQ2q4l18bCK7EgHlLflrB/UFRhtKWpXB+HNpOy43V1jqngPNlgZ6qje4kobyNJNQVX OAZqYsMk6vOl8qsoqrkgwDJyCVb1uoHGZKI2tUtivMwcEpzgZlHat4MnasIkallCxhYiTm kwHEsG5+6HYG58TjFiYi5V2Ypy+le4aPjRqzkzIUZTyP2pKDms/gk4NMov/83120nOku8N 5ffIqReDf/AhltmKqnIVwwio05VyFUZiIaygJdWnsrlhACvk/kybm7vlQ0ohFDA0Wtbq2T mFwlCAQuyfTkanVrsHpOH5oJjPaMR0d8k8f6VwWFkaxgW3XQ7lbGfZAC6LJ0Ow== From: Kory Maincent Date: Fri, 16 Feb 2024 16:52:20 +0100 Subject: [PATCH RFC net-next v8 02/13] net: Make dev_get_hwtstamp_phylib 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: 7bit Message-Id: <20240216-feature_ptp_netnext-v8-2-510f42f444fb@bootlin.com> References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> In-Reply-To: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@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 Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Kory Maincent X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com Make the dev_get_hwtstamp_phylib function accessible in prevision to use it from ethtool to read the hwtstamp current configuration. Signed-off-by: Kory Maincent --- Change in v8: - New patch --- include/linux/netdevice.h | 2 ++ net/core/dev_ioctl.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c541550b0e6e..fa92085c29a8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4005,6 +4005,8 @@ int generic_hwtstamp_set_lower(struct net_device *dev, int dev_set_hwtstamp_phylib(struct net_device *dev, struct kernel_hwtstamp_config *cfg, struct netlink_ext_ack *extack); +int dev_get_hwtstamp_phylib(struct net_device *dev, + struct kernel_hwtstamp_config *cfg); int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *userdata); unsigned int dev_get_flags(const struct net_device *); int __dev_change_flags(struct net_device *dev, unsigned int flags, diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 9a66cf5015f2..5d3b169d8f18 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -268,14 +268,15 @@ static int dev_eth_ioctl(struct net_device *dev, * -EOPNOTSUPP for phylib for now, which is still more accurate than letting * the netdev handle the GET request. */ -static int dev_get_hwtstamp_phylib(struct net_device *dev, - struct kernel_hwtstamp_config *cfg) +int dev_get_hwtstamp_phylib(struct net_device *dev, + struct kernel_hwtstamp_config *cfg) { if (phy_has_hwtstamp(dev->phydev)) return phy_hwtstamp_get(dev->phydev, cfg); return dev->netdev_ops->ndo_hwtstamp_get(dev, cfg); } +EXPORT_SYMBOL_GPL(dev_get_hwtstamp_phylib); static int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr) { -- 2.25.1