Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1982802rdb; Mon, 9 Oct 2023 08:53:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhg+XGWoTPomkmW/0wqjTAuMi6O2koI6/U2lxKKAa1Edtl/4kEiK9zOArhNlt3Hgoz37Pt X-Received: by 2002:a17:90a:d496:b0:274:6ab9:9d38 with SMTP id s22-20020a17090ad49600b002746ab99d38mr12278342pju.36.1696866801962; Mon, 09 Oct 2023 08:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696866801; cv=none; d=google.com; s=arc-20160816; b=Jy2ZfivyDonnpEV4fiaqgMsFTTeHMEMO+3uQZwgL2PlUfcqQyaPAP8AsVA5QPaXJTD pk+Xncph63NB7lvusny+0K5CcscwGjXR6BqfKQLwkeKp1oRAiYdzfHxbvgQdrMCRAfY2 NWD5SHwHCTceQpaDAI9V5uoA3B7it4VIv4AZhFBZPyLFbs3j3SQcB0bz0LPwkw2uyLc1 IH0q6StmoTfNRq+ZfxkNEgXhmzg/cuBdlazc4ko1kKLkh+CVM9ZOehNlDjIWR+Q0Z4iq Pa2pCVRwXHKokagZ0yFRyHM0Nt951gOEzcyvg1HWGDPXx3ORQDYwuNYrhb/DOTsZ6/OJ QQVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=avXVQPWzRJKUhJQzpKYOLVnENRQVKEA8nP3k0T3jh3I=; fh=G6KN1zqmJBGIhpPSq1AWsD4aWgSLDy1jBh7tZkBaukM=; b=CUGa8erHsz3Aqei6LLsHYlneEbDRAXBlAKTcRyEVGxu+/nv3Wudvpsh4xrGwjZppxd lEe8FViG10JsHjbcG50pdpg4ZtwLuHaUPPvZmyCNC5F2ZwmHd5IGDP61HsFpmqXhfG0M eAunEQpivr/QBQZIxuy48l3mfMW5fODt8Vqy1fLWNde/HDrGGa8ScHazhqJOdJ1F4+H5 uJKVKw8OhjN97TqM25aRoOUn+kVGtVQSVNfrvPSEFAPbI+llFXJ0lbKinHtPrB8dJ7VC cyzcwpv81cmOn1aa779gDNl4tc9AG6cc78o4SFP+Yd5rCjHhk5mhlSNqEslar81d5ocl F4gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cbA2yog8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id s8-20020a17090a764800b002775c9ccecasi12053553pjl.127.2023.10.09.08.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 08:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cbA2yog8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 834BB802129F; Mon, 9 Oct 2023 08:53:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377620AbjJIPxR (ORCPT + 99 others); Mon, 9 Oct 2023 11:53:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377736AbjJIPwq (ORCPT ); Mon, 9 Oct 2023 11:52:46 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD3B2D66; Mon, 9 Oct 2023 08:52:38 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id B1B211C0007; Mon, 9 Oct 2023 15:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696866757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=avXVQPWzRJKUhJQzpKYOLVnENRQVKEA8nP3k0T3jh3I=; b=cbA2yog8qte67ALWuIDXHSzTxUSM9wkWBe/7C3EHiU+dPm+Bhz4XqsacPYmU7AdP41Weda TS8f9rrY7wZHFp/ScZ9EraBdBX0CUbYoZmC2YTNFLVBwAD6QvFuILsX3N17V6LqLYwcbva w73cnIqSKkuGFLxmwksQQJm1fPAobCbFhy8fzEHh+dTCPymsOpln6j6BOvs9swWtWbrOdP 9YzX8pX/j9SO3RfrFVopT9KogbGWvPEzCk5/Uu7v0ZCoCEl4b8wsYHbazrCCo3xWFYeKie spQjEY65/IJN1r+JIb98mGJQqBBKR1Zlk6r8mWzHMkVFZY7Wvo8yy3jqIbVQcQ== From: =?UTF-8?q?K=C3=B6ry=20Maincent?= To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Thomas Petazzoni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Horatiu Vultur , UNGLinuxDriver@microchip.com, Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , Richard Cochran , Radu Pirea , Willem de Bruijn , Vladimir Oltean , Michael Walle , Jacob Keller , Maxime Chevallier , Kory Maincent Subject: [PATCH net-next v5 14/16] net: ethtool: ts: Update GET_TS to reply the current selected timestamp Date: Mon, 9 Oct 2023 17:51:36 +0200 Message-Id: <20231009155138.86458-15-kory.maincent@bootlin.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231009155138.86458-1-kory.maincent@bootlin.com> References: <20231009155138.86458-1-kory.maincent@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 08:53:20 -0700 (PDT) From: Kory Maincent As the default selected timestamp API change we have to change also the timestamp return by ethtool. This patch return now the current selected timestamp. Signed-off-by: Kory Maincent --- net/ethtool/ts.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/net/ethtool/ts.c b/net/ethtool/ts.c index d52b9800dc3b..11041a16de5b 100644 --- a/net/ethtool/ts.c +++ b/net/ethtool/ts.c @@ -31,19 +31,13 @@ static int ts_prepare_data(const struct ethnl_req_info *req_base, { struct ts_reply_data *data = TS_REPDATA(reply_base); struct net_device *dev = reply_base->dev; - const struct ethtool_ops *ops = dev->ethtool_ops; int ret; ret = ethnl_ops_begin(dev); if (ret < 0) return ret; - if (phy_has_tsinfo(dev->phydev)) - data->ts_layer = PHYLIB_TIMESTAMPING; - else if (ops->get_ts_info) - data->ts_layer = NETDEV_TIMESTAMPING; - else - data->ts_layer = NO_TIMESTAMPING; + data->ts_layer = dev->ts_layer; ethnl_ops_complete(dev); -- 2.25.1