Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2242688lqt; Mon, 22 Apr 2024 05:53:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXj+sqHJATZfPMvnvfU5voKhRDdrbfPptNQA7TDZ8CG2uV3gfRdsJ9B/Ef6iXJFZWJblqXhFHXVNP+rKA27kRelvfQbi5nF2gaeCvpVyA== X-Google-Smtp-Source: AGHT+IEyUgBYCaZN4yLw3rJrN2FBJKBM5FDdjVirbcBLncJN8ybLS7bT18Xi3B14/b8A7TPUcZ3P X-Received: by 2002:a17:903:2593:b0:1e8:682b:7f5f with SMTP id jb19-20020a170903259300b001e8682b7f5fmr8602902plb.56.1713790435161; Mon, 22 Apr 2024 05:53:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713790435; cv=pass; d=google.com; s=arc-20160816; b=y1Fw8DsnJadsaFIGQhgj8ZaKgBljThIU7vV4VAvd4RPZk4ytwY6snDG67VIaw2a/wa ZHmWX+KYHqjVCeljO8ypIP02ncRducbo+muCP9EFmqn5AaUiMw6s+PB/fKcbN4LRfoAD r32Nl07JowY+BJ0O8raQFj4eh8A/Z0xOwaSOkh5wyTAREzQC3if+ZoPJnAJmBKi/YN6G dZdSj7HLmafBNaZoS2dVTW0wyQfj0+0KfBk1GC/yqn+F0KiojuLK+kBuGCtu8j5GP5WZ mGhbea3dZRaQc6iCjg8C8GZJGEV2PrE5fCgMKivhlMCyjFeI1qx93mocZW0coyeejPg3 WAUQ== 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=G959hpynK4hhvxSMI29ATuJkbcQfTcQfzdFWCYXcEjs=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=tDDXVwyFiXflmXIIQAchxR2q6AVPJL5/YwgpYCupZ7GYt9JGKPPNAROE4fFrBgy2/2 gXAjjFJhKV+uOTmzOPMBKqxXXVH26+ZLK2yKbGKMpWfuyumePqxNTU5kCXW+V2vwZ4n5 Oywsk89ltL9c/pHl7gO8I9pInHjHFUwoUvGeBWZwO5VuFAapeU+uueDVCcLHHxJzC3Jy Asi+qK3w+MNhvvPbsmzYObR2Wf6Py3wH+0ovKXaalSuhupKajDSfrfIWSCqtZ2vbjsoS RGIHYwyG+vJs8l33eZH1g6ecjVh9FH+AYZezXnz256kwIEzBrBY7hfA0o4U+XcBTUFq+ mJ/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Nd8HLg5I; 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-153380-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153380-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ma16-20020a170903095000b001e7883704easi7815355plb.548.2024.04.22.05.53.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 05:53:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153380-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Nd8HLg5I; 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-153380-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153380-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 11D0028465B for ; Mon, 22 Apr 2024 12:52:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57FB0152170; Mon, 22 Apr 2024 12:50:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Nd8HLg5I" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 4CDBE14F9DF; Mon, 22 Apr 2024 12:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713790248; cv=none; b=S2o3AcLN2GNdq/Vs0GGdde7dYDVuO6K4srOvhuCEgiCErN3ZsC8V4BzMr0o3zNu7S215WdL7mcCzXzQVYCGWvNNZBO1j2lHLfrn2104dfmD/MEhHHR1ppKtq6w7FnQJ8AbEXGnAUTP5g8nx94Ttd2x+HHMhPO1sTRbzIj4aLWyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713790248; c=relaxed/simple; bh=Qc9y9gWCMYXbIRGYxDOn9KPiL5+xiwpK3cNBzhn7RKo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ecd99dfcR/v7fR8ZtkRFv658QfDSucYIRqX8FXwVYyxI7PXXUs6RzofR9PW8xrljoEbKAdHLo+XATMX7rQ8MKyyaq6NmSgeCHfwYUekWgwRiOFSDNKeDlWGSh7V15HtAeYMuXWfH6zZl85rEoGKcI4kiXXFWSTuKXXEoG0ImA28= 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=Nd8HLg5I; arc=none smtp.client-ip=217.70.183.196 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 668FCE0008; Mon, 22 Apr 2024 12:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713790238; 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=G959hpynK4hhvxSMI29ATuJkbcQfTcQfzdFWCYXcEjs=; b=Nd8HLg5IDBKzGlUDwGusovl/QN198QQW3ti2oSb9qM+7WizPA5rGo+gurJTW68+siEHo7D ORjN3HBVjuk7UrsXTpFsNnPVPEIE0U1QoOMimUBW0+IBMiPF4sDgwk0SXvfGAY0g+yNKBA zdpxBJGZ3Lte2fof4XmB2/CcwqgSF2VzUNGXEVj167ZKVjlnUray6/2eumnOJ1jur3w9bQ 10s1gAmu3/KLptR45uYVq/moSzhUFBWEdN1htfiw3BX2K6pYhPuwxH5UNYQXeoZDRSG6Db yvTLD75kMwTyAKZmoCuTwMnwWCRi7Cq0UxGiU8xJHUOqgblGMBAwtMDR8x2yXw== From: Kory Maincent Date: Mon, 22 Apr 2024 14:50:18 +0200 Subject: [PATCH net-next v11 03/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: <20240422-feature_ptp_netnext-v11-3-f14441f2a1d8@bootlin.com> References: <20240422-feature_ptp_netnext-v11-0-f14441f2a1d8@bootlin.com> In-Reply-To: <20240422-feature_ptp_netnext-v11-0-f14441f2a1d8@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 39819fffece7..2236b14b798f 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -170,5 +170,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