Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2129927lqa; Tue, 30 Apr 2024 08:52:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXm4/yzVzfjojhM7lrvypILKAVEpCSfy2AwknpSjwCrzRXo7U3SQgGSW3wFopLZ8uEPJuBR4wWhowBPFrw5Td6y8AScgyPL/NQkc2/3JA== X-Google-Smtp-Source: AGHT+IH9znoKnF0Hcb0rfd7hwLwOvKQE7/Pt/cftkg8UyhElNxDPSa+db8co9OCgH/jTGp7NPnb/ X-Received: by 2002:a17:902:e812:b0:1e8:682b:7f67 with SMTP id u18-20020a170902e81200b001e8682b7f67mr173045plg.29.1714492356163; Tue, 30 Apr 2024 08:52:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714492356; cv=pass; d=google.com; s=arc-20160816; b=tgzqYZIPyJOjH0GIvDi0uuSHtpczvaknD3pw3GiArC56/9Rb8oGUv7E6tr8vaurbJp GC/kJSc0iwdLhNq3vUj4gL38i5rd0ZXn0A0pOoD/GTTzMqNCBVOy910af3iWTp/ENXya DteejvVY6QS3s/o/F5xUMHoMtLN91/ZjZPtJQRwcn+bVG0t8jAe7/UT9Ekr30gxAIu70 N8GHhhERQcja/VpY6YfKarmbn3didIaoksrPxfWMlkLsheRFig6ruFSVQRzaHafVb2aM BhDVynE+V217vruF1zXaQS+MWrarFdsxegrHcX73VmAI5pcWglES8RdjCuQARERxvGZ2 h6JQ== 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=Oxh1u1KwSM3qhZssW0Rvdw28VRyU8l+rdU8stIbPreysWVr/prctI1k2I8Z+g8OWxf 0Sw8Utv064zI7CXMYDg99mI4e/XGgmerNEO5Y2rCuIOucmpsN2xCgnMwlXMmEjeWysCg HeDV7Y4DbXS3E8ZPyaDImpVmMVG0MMUd8oXmIRPpHY3MPFZV7T+rB0H9waaJVL9QEaBK XpFcuxOZJGMZFHK5VPVjAkIekbnNcja5C/FpfwxxMg12tK26c9Y8pOGLebLbCYjxv9/m xX9kG6YKYwp8VHUleiqQbRPQRDWBSXpBwi/0chdsV40UDf4JKlkRsawjtYP0HVi/V1Og DhVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RkZnoud1; 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-164311-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164311-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. [139.178.88.99]) by mx.google.com with ESMTPS id y16-20020a17090322d000b001eb0f1a4014si8133553plg.244.2024.04.30.08.52.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 08:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164311-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RkZnoud1; 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-164311-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164311-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 0A794281CFC for ; Tue, 30 Apr 2024 15:52:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7732180A69; Tue, 30 Apr 2024 15:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="RkZnoud1" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 9DE92174ED7; Tue, 30 Apr 2024 15:50:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714492243; cv=none; b=eFEoasysiUzG4IJj2O/Ljf2K2SwbvgaxDD8VvZ9pUlhaz59K2KTEtrHyEMzhAid8TGmsWapdRQWmV7ensYUZbgfyGx+JurrwC5SypYRWKs1/slFJbPtEUpDsOTwsZ11UIZl167t+4ahnBAvRIAd5Acuks6bHNbmAuPJlDsV19k8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714492243; c=relaxed/simple; bh=Qc9y9gWCMYXbIRGYxDOn9KPiL5+xiwpK3cNBzhn7RKo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E4Rw3xvN6jMa7uXH5som/vILSZ90VaOcKJrRb32o/xo0FXchImNPBaXHmW0mkUTjcj/O2IuL/6hgP3BuuRIlOyZF1tJTG+MkuANd566HblhOyPhiVTqeJhq7/XADSXTIWoEgGoNW9DClXScri4MktWgGoCuEK4MKxPL7zufLSh0= 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=RkZnoud1; arc=none smtp.client-ip=217.70.183.200 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 ABE4720003; Tue, 30 Apr 2024 15:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1714492229; 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=RkZnoud1dd2UjXssRR4bhWzYybKvVRtonlA8b7H06KaB4/Q39FR+ZxAWBB2GTFWLqESpC9 uUSfAt2ZIMTHx6QGdQYJz2NSZjMwpFdg5AW7HmmfpYBor47bKVLpAv9eh2883HnAhAwXdy fcrfpuLcHq6qBmswTuWNKdbXAqA8cnsOg5rd//a30CrEAXaO/Sqx13a5YYcPdR+8k0IZdU jiNP5r5h07ObHxcBFbu+NstC8zifocwoSqwl2rpGwX350SYMsa+iVGsLY4GxYzonpKKDk0 iExk+zgUiCUPRecetzIJMcYypguecRBspJ0nDNxDQvX6qyHI7JRFpsQgwsGl8A== From: Kory Maincent Date: Tue, 30 Apr 2024 17:49:46 +0200 Subject: [PATCH net-next v12 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: <20240430-feature_ptp_netnext-v12-3-2c5f24b6a914@bootlin.com> References: <20240430-feature_ptp_netnext-v12-0-2c5f24b6a914@bootlin.com> In-Reply-To: <20240430-feature_ptp_netnext-v12-0-2c5f24b6a914@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