Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp392926rdb; Thu, 19 Oct 2023 07:31:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdq/esfrW12tnmVsyr9DoGG729lqC1mo3byNEO3IgCcxdIAzoG2fF0ByQVNNHbVNNEvYDA X-Received: by 2002:a05:6a20:6a1f:b0:15e:4084:6480 with SMTP id p31-20020a056a206a1f00b0015e40846480mr2520671pzk.27.1697725880052; Thu, 19 Oct 2023 07:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697725880; cv=none; d=google.com; s=arc-20160816; b=lryGs0eiVWPgvVlg8eDMTJn7R/4xLNb9n0fxBmQ8QxMZnwg8xERp2i1vBK2CKUeiWx 3yVTh6Nmo2ZT4s3dq54ePWy8EUCPTZY8FSzsHVRlsc0vm66LE6KV6i9mwX5XZqk2gkeZ 2xjuxlGq4y4QCSdUgrHFNPzn+lTpzu1lVMLMbISVWMYyGtlw/W8FBJHmmS1hVNmtIh29 qkQnTXVbOH55Xr3yAhPkAAi48g5liIJSNjoDDV5SRFPSshHGpznQ6Q4g88Vb0PVgMGcy htcLbuDmoUZbsYIvqITCvLf/kSggV4wu0c5c7X7hhCLTcwtxAwMhJrPnMVh0kqhiXPiE z/Kw== 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=hnH2ZHMI5dsTwImD1KGet0qz4ilreT1GWjYY2D79LCc=; fh=IL4Om7kRbYP5ILTMWk7kzVj5RVF0+t2ztL6E2Yzsl4U=; b=LAcSLILbwsUpyD5FLy1Oyqj7+3qbGd35aFT1ihpP3Uo4TmCtkn/aoWU3fU3Ep1ar7W 6Yx2N1QtbJ/On7jr1JYHldGB2pzZA2fn4TmC6UaaLiXibHAbtJXgNZDFrT9SHASLro33 W5Q+vyrsmTIz/zNBbdfg/R3UEox/HHuDP4lDfge2FQ8zwOBHnO06orAHtOApVlCHKRGB M1NefzpQ+3CkUEYUCIMU+vQc3u/ftQVZvMjM+9S3LcqfZPtZDKzNrGQYlTan3qmRzUkP WTEOvZZzlBHYw5lr6yZCbqglDaoMt9tgVTJeyAJ8fZ19cuEqkznbMeB4SQopI4iiFkZX KnEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Q0XLRxn5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h69-20020a636c48000000b005859de837c9si4333199pgc.105.2023.10.19.07.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:31:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Q0XLRxn5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 8DDF68242F70; Thu, 19 Oct 2023 07:31:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346252AbjJSOac (ORCPT + 99 others); Thu, 19 Oct 2023 10:30:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346172AbjJSOaK (ORCPT ); Thu, 19 Oct 2023 10:30:10 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF9319A; Thu, 19 Oct 2023 07:30:00 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 22E5D6000D; Thu, 19 Oct 2023 14:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697725799; 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=hnH2ZHMI5dsTwImD1KGet0qz4ilreT1GWjYY2D79LCc=; b=Q0XLRxn5P1pSD+4wfSUlxew1r+I7e730puAeo26hfCy/eBQK+fZQI4ptJMzDzSa/MDL5cD 7YpeAjxYif56fPF5oy6T9rPsus852M5f8sV3mrK3Zjwo/AA5p8/7Km3l/U28FhZyIFaszz IUt1jrgTZb8y65BoBozwv00QNlDxEm5G2mKGN8/pOXw17LMDG36lZmY/8F8X2S5i7fTnO7 UFMhkxopFfBWCEuz3EUjrOLsQLmDLKSsuDRlyg7rW8c7tOfOeX2yEbqpFVGAV4hBELhUQp E2FXX1T2a9qqu2FNDXr7PPNuXyDiSbL0LZKUk8FcwYjVg5YrPZEM8jMKVAZqCg== From: Kory Maincent Date: Thu, 19 Oct 2023 16:29:29 +0200 Subject: [PATCH net-next v6 14/16] net: ethtool: ts: Update GET_TS to reply the current selected timestamp MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231019-feature_ptp_netnext-v6-14-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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 19 Oct 2023 07:31:16 -0700 (PDT) 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 | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/net/ethtool/ts.c b/net/ethtool/ts.c index f2dd65a2e69c..bd219512b8de 100644 --- a/net/ethtool/ts.c +++ b/net/ethtool/ts.c @@ -31,29 +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 = PHY_TIMESTAMPING; - } else if (ops->get_ts_info) { - struct ethtool_ts_info ts_info = {0}; - - ops->get_ts_info(dev, &ts_info); - if (ts_info.so_timestamping & - SOF_TIMESTAMPING_HARDWARE_MASK) - data->ts_layer = MAC_TIMESTAMPING; - - if (ts_info.so_timestamping & - SOF_TIMESTAMPING_SOFTWARE_MASK) - data->ts_layer = SOFTWARE_TIMESTAMPING; - } else { - data->ts_layer = NO_TIMESTAMPING; - } + data->ts_layer = dev->ts_layer; ethnl_ops_complete(dev); -- 2.25.1