Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp508882lqp; Wed, 12 Jun 2024 08:06:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV63+peKR00kcMG7uPNi3xUbNNua1Jj401C5BbT+oL5X0+TGnUOtPq2a69MoIxYrSn4hub5OWb8XknTJ9ML1fAS917lSrizPAkKD1q8eQ== X-Google-Smtp-Source: AGHT+IEQMYsjg2MvIzA6mnKoBB+9p8c3AMx27YNauG08CBsBz26khlxQCl9VmnKNs1cIgQ1jvnEp X-Received: by 2002:a17:906:f0c5:b0:a6f:1235:d7d with SMTP id a640c23a62f3a-a6f47f52edemr146351166b.2.1718204806909; Wed, 12 Jun 2024 08:06:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718204806; cv=pass; d=google.com; s=arc-20160816; b=1AqBwNZcY4TMLA+Wf8fMlJV0eDw9beV9Amh4pLWl7F3x7/uy3fS6+kB/zRgC551W0D Md3LbqUlxbdPofJ+YoXGGl0I0cPR/YX8zTY2BuHJOvmJALQc8Xi0OKrfkiQGF2BwztmS uyp5jdXEot+KrY3PoGvQM/2FPxB0i5rI0NZCRm5swWqrhf4lNHS6g/q3FuonttTe0uNx yU7re19bjGkCqUmS3fY149gFuzhZFYR24jBi1nDUEzxqTFvOvedSA5YdjsuHvoTyqkQV RwqAOyhrae6Knu94/BtiYLH8F0MqvKLMrXTjI8poz/KPmh1S8DpdrwICDSYismjze/eX Gv8Q== 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=/wY5nIwKs2GhTR3FxRtzN6G7uZKMKVPVhDediM6W+3I=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=CMapCP5RnjR2HDugox0QcWYVqA8DkBANdPVWmEwpXsDgvQUZAZ1IFnGhMSxsyEGj8D FsAykp5Huq1m0D5e6kMibpFiOMJ/NDujbHMHa6UsYfI0bnuKkIsWADpzKhNaVkN4+3EO p/2x9cOkpRSgl7UvqTPNMGLRJBizUTx2WGivbVSvM1B5HZ13UQV6PKqKAO/L+YNHwrwc 5Wvmj5U3/RjnRbHqXdXfQOOceLVgBfvELkOExm1kfAU29jlbf1bD8Q7s6QTWWg9NscFZ m9j1AjKFurBNsJnvualXD1U3+zTMjvdeJ9k6fOv6CVWd30zQaWsSmPGiQa5rLEQ+ykVo miDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="F3PWB/EH"; 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-211744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f0fbed853si404496666b.764.2024.06.12.08.06.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:06:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="F3PWB/EH"; 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-211744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211744-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 906BA1F21C95 for ; Wed, 12 Jun 2024 15:06:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3606181339; Wed, 12 Jun 2024 15:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="F3PWB/EH" 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 93F7F17F514; Wed, 12 Jun 2024 15:05:05 +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=1718204707; cv=none; b=qtlUAp/pQwA/j9x1fuDfnvvy3K75u6Y1XQpzgYA550CqF+V0xouyh3JvBDkAaFXI8XyRPQQ0TaOGVGirZHbUWWygJFRYaLPUAOWo4fx3LC01pCUAA7xD22OKn5rDZJNfv0+rE8fcfTHBdQGx+BaCGQk8UGltBOHThyP2gw82vaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204707; c=relaxed/simple; bh=eHaU1x2Q7GOMlFTSXnTKPrVWfwCdrWTwWNIl6Xn6X4Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Jtx/u1uREZAEN6f8L+reMMDANo/FU0dvWOeSzEA0UbgI/TMyagiEemtjLTtajQaaYtZ3ZzVImPiboW+WyOm9PW3TJVeSG4dCANW3FNtFSkgn38UzaSnuS7CIiakUGzGWjXsSO4gphTdB7TUwt4RbEi8boJUPy4tD02rprcX4FGM= 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=F3PWB/EH; 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 496BA4000D; Wed, 12 Jun 2024 15:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718204698; 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=/wY5nIwKs2GhTR3FxRtzN6G7uZKMKVPVhDediM6W+3I=; b=F3PWB/EHL7ol9QAO9CWJcWtK3ajBfJsvu8yAiWpkp+Bf8Lsw7h4Ts9TuCxvQulzxgtvI8J LX9uNALcV4gd9+bB09Ke0Kt41Jmh44XxrVm2OOMYcBZLdJT41wBK8Cx0EnI8Tw5ca2URHc VsoyTGksXRpe+TPcDbQZTV/4639PH6QJ3gMdBi9SUekQVCUREbl+zgeYT2Fgm5W4kVmY9s vFIE4Hhn0Gzpy+ovZGyyZ/zQMzLRPN8jUvxbVy9OJakdmCqEGYDqBguDexBDEYp1biB/45 pdonOFg534rmrrYJSYfgBKNy0WEjfkvNZv6Ad7quXcd228dlAlsQKVhpUg5c6Q== From: Kory Maincent Date: Wed, 12 Jun 2024 17:04:03 +0200 Subject: [PATCH net-next v15 03/14] 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: <20240612-feature_ptp_netnext-v15-3-b2a086257b63@bootlin.com> References: <20240612-feature_ptp_netnext-v15-0-b2a086257b63@bootlin.com> In-Reply-To: <20240612-feature_ptp_netnext-v15-0-b2a086257b63@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.13.0 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 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 | 2 ++ net/core/dev_ioctl.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/core/dev.h b/net/core/dev.h index 58f88d28bc99..75094405b569 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -169,5 +169,7 @@ static inline void dev_xmit_recursion_dec(void) 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); #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index b9719ed3c3fd..b8cf8c55fa2d 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -268,8 +268,8 @@ 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); -- 2.34.1