Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1230738pxj; Fri, 18 Jun 2021 02:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEjg2uHlECCnWW0us46U5358SVwbGj3vUF1nYvCnSzmFq8V4dTtZ8PMmrlWv1tIDNRLtoK X-Received: by 2002:aa7:db94:: with SMTP id u20mr3666881edt.381.1624008693107; Fri, 18 Jun 2021 02:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624008693; cv=none; d=google.com; s=arc-20160816; b=I7i43XS85rmNekdaUAi/DZAcm95B+pHWdCWCqL+GKpj5pQgxd/ALWew47ryiTaCQj8 Mg7ztwOOnwX+j1x6GHMC/PxyIEznQkVQitTslZaq9sLZAZbsK6HgB6jroj5RI1jeYI0S tBBKg79FEJ9y6EqPljfelzIZp6iN4r/kPKAD8TfL27mfCWeZdagXXYPUPtkwLpUZ0a3E Vp6oBiY6AfNRTKYxZupFk5VBRaczt6Cam/xmUfCyCrCvGo9WjgYTlQDdefWdDGDr29ko 1zyLKN0Rs/Pk7YIbHiHSX69JNLW5soxdSn6BlXYkv8FwGyamBgtuzbGLN04mrG8tiqHW N+OQ== 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; bh=fiRUu+/DaBsJZCfdzESDgX73TdI6a3voX5NwrSVC6ZU=; b=dCCR4XDlfRdJYGniZ4Zy8iTZK9XudSREHLrMVdCBZHuZf283e/LfZR433FiBgJzLvC 6Daxny1ehNVuVoGk5BVuPUCEKOkaNY3GgAVlh+1VYGZ4zxsHCE68N1JMdRnFYAx24uO4 oCaJk2lqFFwLXPm9dQ+bF21/y003wafrBg+XHmNGeKt7Lp6ulEq9bhjhz0U7QFWfoKdi /gj0l3jodao2Uf6nzd+xduKu6VWaBy3Egel6ksepEjmqCrgXYc/of+cI+9RhANuTvn4t SdehXFu/p1jGVC9h/i7UslO2a4vDdU34ej4Wv3ifN/wPKiqdp2HhfFX9h7riu3ymhMNe EZBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b19si2136171ejl.537.2021.06.18.02.31.10; Fri, 18 Jun 2021 02:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233538AbhFRI4S (ORCPT + 99 others); Fri, 18 Jun 2021 04:56:18 -0400 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:24943 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233552AbhFRI4O (ORCPT ); Fri, 18 Jun 2021 04:56:14 -0400 Received: from localhost.localdomain ([114.149.34.46]) by mwinf5d28 with ME id JYtR2500E0zjR6y03Yu2f0; Fri, 18 Jun 2021 10:54:04 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI= X-ME-Date: Fri, 18 Jun 2021 10:54:04 +0200 X-ME-IP: 114.149.34.46 From: Vincent Mailhol To: Marc Kleine-Budde , Stephen Hemminger , linux-can@vger.kernel.org Cc: Oliver Hartkopp , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Mailhol Subject: [PATCH v3 3/4] iplink_can: print brp and dbrp bittiming variables Date: Fri, 18 Jun 2021 17:53:21 +0900 Message-Id: <20210618085322.147462-4-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210618085322.147462-1-mailhol.vincent@wanadoo.fr> References: <20210618085322.147462-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Report the value of the bit-rate prescaler (brp) for both the nominal and the data bittiming. Currently, only the constant brp values (brp_{min,max,inc}) are being reported. Also, brp is the only member of struct can_bittiming not being reported. Although brp is not used as an input for bittiming calculation, it makes sense to output it. Signed-off-by: Vincent Mailhol --- ip/iplink_can.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ip/iplink_can.c b/ip/iplink_can.c index ec4e122f..311c097d 100644 --- a/ip/iplink_can.c +++ b/ip/iplink_can.c @@ -348,6 +348,7 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) print_uint(PRINT_ANY, "phase_seg2", "phase-seg2 %u ", bt->phase_seg2); print_uint(PRINT_ANY, "sjw", " sjw %u", bt->sjw); + print_uint(PRINT_ANY, "brp", " brp %u", bt->brp); close_json_object(); } @@ -423,6 +424,7 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) print_uint(PRINT_ANY, "phase_seg2", " dphase-seg2 %u", dbt->phase_seg2); print_uint(PRINT_ANY, "sjw", " dsjw %u", dbt->sjw); + print_uint(PRINT_ANY, "brp", " dbrp %u", dbt->brp); close_json_object(); } -- 2.31.1