Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp392701rdb; Thu, 19 Oct 2023 07:31:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxDVDtm3n85ZaF5iZOeZZA4bygKBt/YG5MMu6JogZqrLBOE7C+6jlWnTeCKPKsrGg6y2dg X-Received: by 2002:a05:6870:b90b:b0:1d6:b7aa:c6ed with SMTP id gx11-20020a056870b90b00b001d6b7aac6edmr2234180oab.56.1697725864864; Thu, 19 Oct 2023 07:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697725864; cv=none; d=google.com; s=arc-20160816; b=DlVMabmPUHaANQBhbuMBErKF28OdqdBBFAFHkKnEQzopUeqc4Uy+D3UPWr3w7rUqws DtSEpCNJzhhTTBDJXz35SotoQC/IJKrCOuQX6eol+3rEY8jtktUx5KcK51bWpg9ZUSU4 BA21DGyrBxn/Unn7rxTaMDr0gQibRB1ukR6Mhg2Zljvinc8eT/AueiSIRt56il3NynMJ 4JZBGI06iw61IavduHybGZjCK0qlZ7uZ3HXbf8qBGKLSLhzPBeLSiXJALHQZYXCIyjpb BwVJOywd49P690gMl5v+pUdauy3xK+KoD0C1IKgVjVe4Z/q488kqh5H8dZl/nI42W8AE Fejg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=xcMHe82tB7onpVbG/YH4HQ63t03Vfz3gc/mKWRc+CAI=; fh=IL4Om7kRbYP5ILTMWk7kzVj5RVF0+t2ztL6E2Yzsl4U=; b=Z9nBe89Mw3RwcODYkXJ9FTB/ftLHBoRVe1Ea6mAaqNhCLBg2TgJ6IOHmb2xmSUblF4 OFssTmT0AjLQ1LeKuWkv7YUB0d63tl8PF61NS654kEF3x3q76fLYAur6L4oGBozNSyXx FgOmivHmv1cOKsUk74GYtstaTeqP7AQU9i00sZdtnkzG1IN7wVh6+Gb5eTGRNZqV9Loc W5augHxVZWIblpMY8ttZSv3NvvuJyJ8lIyw0E9uwUtOnT1A9qTRp4P+tWa8ng3iK9gR1 89Y3A3d3wM8m1RHdfxKvXm74Xbp86mWpH4l4S07bv9j+2WAKaj+i1hbNFn5aUa4o3/nz HS3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Mj1rEvY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bw24-20020a056a02049800b00585a5e9a965si4825182pgb.161.2023.10.19.07.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:31:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Mj1rEvY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 55066807E8B5; Thu, 19 Oct 2023 07:30:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346132AbjJSO37 (ORCPT + 99 others); Thu, 19 Oct 2023 10:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346123AbjJSO3u (ORCPT ); Thu, 19 Oct 2023 10:29:50 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B3C9132; Thu, 19 Oct 2023 07:29:48 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8E27D6000D; Thu, 19 Oct 2023 14:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697725786; 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=xcMHe82tB7onpVbG/YH4HQ63t03Vfz3gc/mKWRc+CAI=; b=Mj1rEvY+y6c97LeiJ2aCQ/W/aC/HeGclbsg4EspJoHEgpIAACq3Mpda53p7I5wxKZlAs9w bsxUvzzRDGtF6oHQizZbLhJMLOfoDYPIzJvoK8CPGaxp8BHpFP5EdBOBLbwH65wifScv4I /KxcRpt6WZyZz4nNjVsaEMIO1YrokxrqCJDrzwYbOBICJ+oQ7CQxFFxjjJ1iQUls7SlZrD X0RDIZGlZRrExdzSNQVCKTVkKu7KEax37JM9Y1b05/Fb8Y2h68Tg85d+rkEYUC2frb+bjz eXobGMMLRBucwNfweVvuBMOn+OrtWrUHvX8mSdtHxFW7unEKJrRqWE4ga4MS+g== From: Kory Maincent Date: Thu, 19 Oct 2023 16:29:20 +0200 Subject: [PATCH net-next v6 05/16] net: Make dev_set_hwtstamp_phylib accessible MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231019-feature_ptp_netnext-v6-5-71affc27b0e5@bootlin.com> References: <20231019-feature_ptp_netnext-v6-0-71affc27b0e5@bootlin.com> In-Reply-To: <20231019-feature_ptp_netnext-v6-0-71affc27b0e5@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 , Kory Maincent X-Mailer: b4 0.12.3 X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 07:30:13 -0700 (PDT) Make the dev_set_hwtstamp_phylib function accessible in prevision to use it from ethtool to reset the tstamp current configuration. Signed-off-by: Kory Maincent --- Change in v6: - Add missing EXPORT_SYMBOL_GPL call. --- include/linux/netdevice.h | 3 +++ net/core/dev_ioctl.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e070a4540fba..b9d0411836db 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3922,6 +3922,9 @@ int generic_hwtstamp_get_lower(struct net_device *dev, int generic_hwtstamp_set_lower(struct net_device *dev, struct kernel_hwtstamp_config *kernel_cfg, struct netlink_ext_ack *extack); +int dev_set_hwtstamp_phylib(struct net_device *dev, + struct kernel_hwtstamp_config *cfg, + struct netlink_ext_ack *extack); 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 b46aedc36939..cb60b0b9c31d 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -322,9 +322,9 @@ static int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr) * frames and not forward them), it must set IFF_SEE_ALL_HWTSTAMP_REQUESTS in * dev->priv_flags. */ -static int dev_set_hwtstamp_phylib(struct net_device *dev, - struct kernel_hwtstamp_config *cfg, - struct netlink_ext_ack *extack) +int dev_set_hwtstamp_phylib(struct net_device *dev, + struct kernel_hwtstamp_config *cfg, + struct netlink_ext_ack *extack) { const struct net_device_ops *ops = dev->netdev_ops; bool phy_ts = phy_has_hwtstamp(dev->phydev); @@ -363,6 +363,7 @@ static int dev_set_hwtstamp_phylib(struct net_device *dev, return 0; } +EXPORT_SYMBOL_GPL(dev_set_hwtstamp_phylib); static int dev_set_hwtstamp(struct net_device *dev, struct ifreq *ifr) { -- 2.25.1