Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1309467rbb; Mon, 26 Feb 2024 05:40:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXF9IpiywtZM1a+s1QmtTx+UA5X+n1IF1issmhBttyCz5c5vdmUyFYsVpb/ooBSdD8c37ddZ/X4pTc5cIt24AbxReLAfxCAwgBFLVnMuA== X-Google-Smtp-Source: AGHT+IF5V6tebeKtIT/dA6fZOxVWYnH41IZNuMAobWEdGMD8vkvFCcaDy1wRF0kJ88RyE0IrRm8V X-Received: by 2002:a05:620a:28d3:b0:787:d4ed:7e36 with SMTP id l19-20020a05620a28d300b00787d4ed7e36mr2183184qkp.67.1708954850682; Mon, 26 Feb 2024 05:40:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708954850; cv=pass; d=google.com; s=arc-20160816; b=kxfCeZOFVUflz4ZI9RflyU8bO+PN9ujFDzxQCtKgNNUwfF84MeUaAGXx6Ffwt5RRBe HHLp0Mko4et9GuzOPp60z97+fsDQ0hgm2OJRAi/pDtgW7rC2kXcPEMEk/6j7lDKz8cWv aRpBTT/B5k2Go6OPi+Touph52gSSmKoLVzW5hGm29GWFarrQ83pSvvpcRlj9midoyy4g YeSMkaqndwAR0XY+csxSJhL5ahoYTP/i4VX/YfQjYAkNEzzSOKGmAZUzaCi4hyWFPoHD P0HhPukcjBDYINlA1c3HRU7jdW9XRChgDAEnSD0Gn/swIFJ18LhMXobwmFnUOiz/Ll96 nT3A== 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=WcXA3dA0UEztBmkar7lC4WlQ+A4k8aE3ilayyVHI4Bk=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=rw0nf/aUsVZz2EVthohv6C5C0aEEdAbWzebZdLqmVqJJVt0YWCLxI6Md7ndwjkEF3w UvyyU3CUra4o3SKU3VizAMnXDqdhRMtTOlYyxK/7f4X1udmJ1ZS9lDjWXaIeOFrsnbJe dLXSfbbC90U/jVofG/BdLI6ZpGEdrDZEhSzT++nlHqgQtmeDFXkhHmPSU8J5uopkP7cd SKcKdVfkz9V1jxZE8dSY4/F6J7uIFk/27r9uLSO4rozrx9G7TapiEvAxzwx4GNU5zvlZ 6kGeazCaEPxVmDvfY/6OjvoZ1/BIh4g6Yj6G9YHoSxSwtEytZop+9GTomMuMU4xyKqDO qBlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gkefMB6U; 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-81503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g26-20020a05620a219a00b00785bc1a6720si5099342qka.131.2024.02.26.05.40.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:40:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gkefMB6U; 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-81503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81503-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8A2BF1C2471E for ; Mon, 26 Feb 2024 13:40:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6992512A14B; Mon, 26 Feb 2024 13:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="gkefMB6U" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 6ABE5128386; Mon, 26 Feb 2024 13:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954817; cv=none; b=J2EDtF85F+9iQrQTD1XvC9K4XmB7CdK4kXS8op6cfqAULspY8BiENAaCHkFZY2rffFH5MHoThVUCCws9K4YTy2V6p53UJMYerTkP2ChYSSJ0IolXMYsBV4OEkoHc++7ByrktaWyR5ITfbhRHHTFhtx6EzzO8AwuuB6YvcAxs6fM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954817; c=relaxed/simple; bh=y7ldU4xeQKoAsm7jrQjkqta+dP7x+SkOyCbw3tGAJ9c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QJDDIRN3CXEewnMWXBsID1utSJQljW1xlR9Qxt/hnSzuIOZrrVcKIVzf9ijnOq8rxjsmN7hON2gvk3yBaCjJNZkzq2ZiMfl5WJvyV0Zk199KjK0jMgCJVbKdLwib4clT+sfPjzafuhI1ZAYfK+Ou2n1eYtNCQdTXcm2icaWbMMQ= 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=gkefMB6U; arc=none smtp.client-ip=217.70.183.194 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 A129840009; Mon, 26 Feb 2024 13:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708954813; 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=WcXA3dA0UEztBmkar7lC4WlQ+A4k8aE3ilayyVHI4Bk=; b=gkefMB6U0NYMrV3CNhMuP2MRnrKGOjWUNMZcBBGhRKyoH3PNua8nKjndsImsLdJLMWkwjr qJp9kEojwv2DJm0A3kZoWNObn45ufI5qZMxA09GchLcO9FALSr6mPOS6E6KCWNUKE3qp9k +cLepBEosVu8FNf5MTSUJybkhPRGwpDp3NG0/El0N3GvUegktNkiA29goYI7Wk1ukNWd1S dRplmarBQmaxnV/xzPbYLLuMAqsUMWWQVl+b1OBP5exxzOIYFQJK/EcJl31oHTfgzeO3PJ 3vmjvYKoiiWeRkSBq1mG4QTcMU7Cq7fa7N3AKS32HlIK0klyhrEQXKGtIkl6iw== From: Kory Maincent Date: Mon, 26 Feb 2024 14:39:53 +0100 Subject: [PATCH net-next v9 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: <20240226-feature_ptp_netnext-v9-2-455611549f21@bootlin.com> References: <20240226-feature_ptp_netnext-v9-0-455611549f21@bootlin.com> In-Reply-To: <20240226-feature_ptp_netnext-v9-0-455611549f21@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. Reviewed-by: Florian Fainelli 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 f07c8374f29c..7f78aef73fe1 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