Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1835056lqe; Tue, 9 Apr 2024 01:30:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWorjTH2MoEX+l3KLcuYVYKU8GOtXrw4wA6ba6Ekmy4Il2A9dUTZJUtx5TwIjEwMdzqOQWLiA0AsyOvXxgxO11u0uzkkUXAMY/Cl3/Ohg== X-Google-Smtp-Source: AGHT+IFCG+OppdBoNAhdCoV7OeD4PIEq5HInU+K8sSZ3JBePt1zqFUPtwIBacGCeGtA1wfNuw1tM X-Received: by 2002:ac8:578e:0:b0:434:98be:1763 with SMTP id v14-20020ac8578e000000b0043498be1763mr4706801qta.8.1712651430712; Tue, 09 Apr 2024 01:30:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712651430; cv=pass; d=google.com; s=arc-20160816; b=x4aJVrTbiBVd9nsJ8F8S06/pd1hCpvjblqp1Vk9eSxgM3tufswk6jdjzWO1hsxsxlH aLswFMBNpv8DshO2zuIXyRpDc6DUVkbuFOXTBQhvAiuoPWhX6w2RF8L0PL2JVLa4pSzK KM9RKyh+FaxM293aKol9HRLsW9mU10TuO2gI09wJZ8+9hrXIgXWS/QOjxcLIqUEQiMWN t9N13QZwsSfo96oQ2j25O2hk3EUgvagm1W0PfWti5bOg/ba+GVBaQ+9n6IJ+QG49a44H Wr570FOVcM9URB3fZr2CWKUXbhocNvOGJX6tBDK5Rx8infrb8VG3DaPxJtZmgBdI2974 QLBQ== 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=KfKjYPIr34ZAWPMZtP5eMKEE1xUnt1LjukWQuXcS+7DUd0J/R0imKca99pUHOKK8+/ dRoNAcvIKhSfWStlrVESxKWYWOTeCb3/Hg+BCg0RvC1HL3Cshx0q0w17+jkJX9hzI/fk j9Y7EsIIwqPKsGjk2RQQHMZ7q2R1X1zUQgQ5tUM1dsa99xTMiS6Nuw6vCCSgbrnOXmPS 8RxbgwARaRJmK+tQ8OqWKg2l0/OKg9Yp0kLrhHNBUo1ju4podLB5eph+RjR6CGpSD34R FGAh7hn14B+l07sLEcSZ4MhUioyFH3bK+tqMStusftFQN/0NehLl1jzcHKc5wYTtQYWI 4/nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="fMz/t1K6"; 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-136464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136464-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 l7-20020ac84a87000000b004347c7aa34bsi5750335qtq.445.2024.04.09.01.30.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 01:30:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136464-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="fMz/t1K6"; 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-136464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136464-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 6F1961C20B8D for ; Tue, 9 Apr 2024 08:30:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB5FB86AF4; Tue, 9 Apr 2024 08:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fMz/t1K6" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 67D0C8173B; Tue, 9 Apr 2024 08:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712651236; cv=none; b=e3leRwUafE+t/PyaiP9vUsfMtecbQZwMJim4bPPJPTHvtK9Kzlc2qrXfodnTXM28YkSbdeSKq1YIL09LsYlr/LGJ9jLFocAZpOVGI2cGs7uJH8bi3uSmNUT/jKxMqqTBr02BoAoUfiCze7b8Qyumn/zAorGL3V4yMZMkOvNx3sc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712651236; c=relaxed/simple; bh=Qc9y9gWCMYXbIRGYxDOn9KPiL5+xiwpK3cNBzhn7RKo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WAHYPLyd3qQgZYh/L22ChkbS5t1ek+XomgRMXCTAWKeIQHcFguPtFwhUDa2GuMoHV61ZOPsgWU0wZuKuQD5IEEE9UcaL6vB6OFgkpo+xqhJUWQOqczX+qlGt+/8yDMHGA+FNnOW6TSRgxNm95gqGoEPlTgD34YPTubB6Q7fMv1E= 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=fMz/t1K6; arc=none smtp.client-ip=217.70.183.199 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 B7141FF80B; Tue, 9 Apr 2024 08:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712651227; 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=fMz/t1K6Cp8DJE/pvVrtLvPoRJXcVlHfr7UWlHECZyS1XeeplP5FU2bFQr/a6abt03Ubl8 J3PYvmxhbfFiJCdEcOVP0HWC21lnGBgScUTmhz87tG2+Gpc20vLSeEVBpca5cY5uvC9NpP eU4PTSC0OtkWfqR/mOsmXsS4/ENqkUpVBnRj6GAdR5oNkFhbSr5kIgs8husCigcbNBDZKL ttOaFZNE8pzejSoKp8AaySFS7nGlQuJ2kY5S/x7D2FTR2t3tnkXDrB/gx/Kehv9TkTPFHo jM/AMnYRCMxpxGS7JFkVzGyqWK4GJaXi1lbZloNkWDck+2xajaJMfjEpXNqAuA== From: Kory Maincent Date: Tue, 09 Apr 2024 10:26:25 +0200 Subject: [PATCH net-next v10 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: <20240409-feature_ptp_netnext-v10-3-0fa2ea5c89a9@bootlin.com> References: <20240409-feature_ptp_netnext-v10-0-0fa2ea5c89a9@bootlin.com> In-Reply-To: <20240409-feature_ptp_netnext-v10-0-0fa2ea5c89a9@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