From patchwork Mon Oct 9 15:51:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kory Maincent X-Patchwork-Id: 13413960 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 8AAF8339BC for ; Mon, 9 Oct 2023 15:52:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="cbA2yog8" 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_Maincent?= 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 X-Patchwork-Delegate: kuba@kernel.org 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);