Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp511852lqp; Wed, 12 Jun 2024 08:10:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxkHUmgWhuSY3LXMK4kFsuzgn1VoRgGPNT7+sejx+skZ48b4AlX3G1suELIk1Jipl4fOeerDH3Tki3DKb/26wa96Lx/hcg8f4VXnoSeA== X-Google-Smtp-Source: AGHT+IG7vhJgQXOIvb6my0x2JUvCqC7+toqEX3vf+vqniiKSSIiqv9iqBFjredvCoxQkflhxdvhX X-Received: by 2002:a05:6a00:3cc6:b0:704:151d:dcd4 with SMTP id d2e1a72fcca58-705bcf09af0mr3043976b3a.28.1718205023728; Wed, 12 Jun 2024 08:10:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718205023; cv=pass; d=google.com; s=arc-20160816; b=QWppjr1XRHuh6fHIVWWNiPVmkmE4HlPCK/M2W4l56Y8YHFj8iXKKJb0G0tKwDVHFl4 yXHMnzAXzyEFPNaVO6k+RMXrADeaCsO2j5BBTokR+iaA2EnULQtY5/D1P7hGofmM8BFU hY2sDjUffR/Z2AX/8Y56E/1pPRP3vSgeX3Xo454WJHFVcEkSZfcHRxpTkP+U3zlC8TqY l11rZQlh6t9f0oL0l17+Lw7X4wX6vej70RheqnBKIroWCzTWLmZJccRPONUnPldmmQaV 3RRMdYJXKZKThm8nhiFkgNKLw/igg8jJCNsiKHVtbuQqCLonWL2rlyRiZGz3mQsdAZX0 GyVQ== 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=KUn20jBzGgQX3nN2BNPFK9rn+KLdbsza5Fx8uyTOtm8=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=RH6I0KyLI5qtS6XvcAV824WaxtwWP646K6VYCqQ1uIAGB/f1ZfP3XWP9T1mmsprpHj JDO0uVgPz1wZbKL1AuAMthJN6/kCiyOmsCHLfT3ijVFjKRJ7BfJCyylIdwyruk4bprwY 45tckjtxX75buiyLXHca4MqXWgayXTxrM6DzMIz7+3/ClikvfZyqeiZfWEsITj3cMvFC nDkroHmaQ7zkeEsIaiuKPRclRCMlW7RokCEKc9QrT0cmV8SKydFEEaaA5rA7UxvgcdHL BJzBb6OfWOUWY5YdJ12M6LSgDQGEta+5MkcOwb+BD46hEAZZ5YI8/EiZ+w7z3kpI6XK+ BpSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=A5mWR2wu; 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-211745-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211745-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 41be03b00d2f7-6e99ffec1basi7526525a12.224.2024.06.12.08.10.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:10:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211745-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=A5mWR2wu; 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-211745-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211745-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 D0042284102 for ; Wed, 12 Jun 2024 15:07:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A56A0181BA5; Wed, 12 Jun 2024 15:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="A5mWR2wu" 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 2D8E817FADE; 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=1718204708; cv=none; b=CVLCp0q4ZsO9Gb3Y9ot8Q+bdVh2u6OhDhjWxN8w7YBY9O2xfWtFhbQ2tlfipNOIoxamyzSaldIEibFxfCKN5t3cwcI5qm1OehP4D6aPXan4HBHJGScH4OAsMBrlYGYtTJQOgiMDs9js8FFNVyfNeYfCP2MvpVC4KVXniCju1KPc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204708; c=relaxed/simple; bh=gnOJv3IJnG4MxVBS3Rs8JRq/t9ZNB4Rqjtb6Bc5CGuo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Iql9koeF47F2/ploYX56i0bIRFpcB977gDOfS20mEnCvbj1WlkIioJEXe3xui17Gfbd/pR1ndfiL5Te1y943ICsAbATg88jUN6hqBfURa/XgT2Hn+mm+iXXiWZxk5qmExqT7qsgD49wq6sPBFk7Xzo+OFQMlH7Km6NzsaIhAN8k= 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=A5mWR2wu; 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 841CD40011; Wed, 12 Jun 2024 15:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718204699; 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=KUn20jBzGgQX3nN2BNPFK9rn+KLdbsza5Fx8uyTOtm8=; b=A5mWR2wuQC7gNnaiyTrYK5K5D0rMhC8Kaq2iBYGjelhVpoR+rGRqF4Uonps7zcLbpxxJtA ElTjqYDVfhw1VmpajcQmEdr+peslgg0s7t0GBX0sYR5mSAZoCoze8kgBvYt4McH47/bjYu dfNdwEI5g+qalbyPuBNPoB6kxGTjzRTfi/fDAUedJj616i8xNSJdYdshpMLvIInEXLfwCg jhr8av4kO9V6GOKR6NkHvGdpzvx/2UCQn090cdRokEVss2YUm/ebVaLNPIysOCaRQRvImL MzCyieOHVO0YR36E8YIP7uagVhYsAFoW2sjVSJ5Uszgt39jBe6y2p8InXaaFTw== From: Kory Maincent Date: Wed, 12 Jun 2024 17:04:04 +0200 Subject: [PATCH net-next v15 04/14] net: Make net_hwtstamp_validate 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-4-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 net_hwtstamp_validate function accessible in prevision to use it from ethtool to validate the hwtstamp configuration before setting it. 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 | 1 + net/core/dev_ioctl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/dev.h b/net/core/dev.h index 75094405b569..7e2425326170 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -171,5 +171,6 @@ int dev_set_hwtstamp_phylib(struct net_device *dev, struct netlink_ext_ack *extack); int dev_get_hwtstamp_phylib(struct net_device *dev, struct kernel_hwtstamp_config *cfg); +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg); #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index b8cf8c55fa2d..6aaa8326bf8f 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -184,7 +184,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm return err; } -static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) { enum hwtstamp_tx_types tx_type; enum hwtstamp_rx_filters rx_filter; -- 2.34.1