From nobody Mon Feb 9 03:46:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 96E3B2C032E; Mon, 1 Dec 2025 22:56:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764629805; cv=none; b=ov0HliYJH8xeFfiMrpd6oD4r33nZDuDJG8JzIEhVB08krf7WV4OjclH54Mcx1DOz4cB9Ogv32us6D4f3aEREcJ03zCtQcfPXEvHe3zVt9Qy7isZe7vO7scmYlxUsFgGZVdzS7oTa/3YLitYgVNv/k+XHpe3ISwpRjhvKpYCYPDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764629805; c=relaxed/simple; bh=dCPnYxhpHz/lP+ip0arJ/PP+PQvM//IS7QLVfSfFwCI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WTPhBfnd/aPiRae7BjTPYCuCBSUAeykyPqGQnTkchJjuchgtSThK0FVGcFwHo2uC9/PjMCYV3+Qoy/H9KbJpWAj0IhmLoMjuIM4iNFMmADJtQN7dnBA1h58GLcW9mplCqy60bNKkOtOLb0oBncSGaBIYN78CQOl52AxgRs02zrA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JvClk8QA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JvClk8QA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F1A5C19421; Mon, 1 Dec 2025 22:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764629805; bh=dCPnYxhpHz/lP+ip0arJ/PP+PQvM//IS7QLVfSfFwCI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JvClk8QAeCkRO4A4o5xx23yFoJB1bWtYpMMR9ILJAR5tuVPSLrZPyEfRE9T21A41f AabwIBNVf0+SomUfcSJlZORCZ0eYcKHlAwqQxnloCBAV/vxwJOhNj5vMnM06QwkZL9 R7TFyoNoYBxezjf8j74e5KXIwGhF8DHIIrTq1t2UMMlnhpO5KHQrBjmNrZmPBdK/CS dNFA/nffb5nB/mQWchWJeKXYyWtv8zCKeB3lMdyYY40tbWbRzyY/mBfGNfSk4cOzKe gh7JR9I2aF0Cctsd1bnUmZdIyIG8qRS4RcFIHtlxBEY5M/zuWv4GL43zbKrJrrvyza Ha7ekixDnF73A== From: Vincent Mailhol Date: Mon, 01 Dec 2025 23:55:14 +0100 Subject: [PATCH iproute2-next v2 6/7] iplink_can: add CAN XL's "tms" option 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: quoted-printable Message-Id: <20251201-canxl-netlink-v2-6-dadfac811872@kernel.org> References: <20251201-canxl-netlink-v2-0-dadfac811872@kernel.org> In-Reply-To: <20251201-canxl-netlink-v2-0-dadfac811872@kernel.org> To: netdev@vger.kernel.org, Stephen Hemminger , Marc Kleine-Budde , Oliver Hartkopp , David Ahern Cc: Rakuram Eswaran , =?utf-8?q?St=C3=A9phane_Grosjean?= , linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1995; i=mailhol@kernel.org; h=from:subject:message-id; bh=dCPnYxhpHz/lP+ip0arJ/PP+PQvM//IS7QLVfSfFwCI=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJl6sgKNXDKLeDf8abm4us+hZbenC/vNL7uMPl1Y5KJSJ Let+PLbjlIWBjEuBlkxRZZl5ZzcCh2F3mGH/lrCzGFlAhnCwMUpABO5r8/IMPkgu2hqE+N+jfWL b0f8nfPF+aWv20xTztIDsULXAjavWMfI0DElMyGviZe5YK1SyZa3zgsPVfl8EnJ5q76SK3jB24M 5DAA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 This is the iproute2 counterpart of Linux kernel's commit 233134af2086 ("can: netlink: add CAN_CTRLMODE_XL_TMS flag"). The Transceiver Mode Switching (TMS) indicates whether the CAN XL controller shall use the PWM or NRZ encoding during the data phase. The term "transceiver mode switching" is used in both ISO 11898-1 and CiA 612-2 (although only the latter one uses the abbreviation TMS). We adopt the same naming convention here for consistency. Add the "tms" option to iplink_can which controls the CAN_CTRLMODE_XL_TMS flag of the CAN netlink interface. Signed-off-by: Vincent Mailhol --- Changelog: v1 -> v2: - s/XL-TMS/TMS/g in print_ctrlmode() - s/matches/strcmp/g in can_parse_opt() --- ip/iplink_can.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ip/iplink_can.c b/ip/iplink_can.c index be31e7fc..d91e807b 100644 --- a/ip/iplink_can.c +++ b/ip/iplink_can.c @@ -49,6 +49,7 @@ static void print_usage(FILE *f) "\t[ restricted { on | off } ]\n" "\t[ xl { on | off } ]\n" "\t[ xtdc-mode { auto | manual | off } ]\n" + "\t[ tms { on | off } ]\n" "\n" "\t[ restart-ms TIME-MS ]\n" "\t[ restart ]\n" @@ -127,6 +128,7 @@ static void print_ctrlmode(enum output_type t, __u32 fl= ags, const char *key) print_flag(t, &flags, CAN_CTRLMODE_XL, "XL"); print_flag(t, &flags, CAN_CTRLMODE_XL_TDC_AUTO, "XL-TDC-AUTO"); print_flag(t, &flags, CAN_CTRLMODE_XL_TDC_MANUAL, "XL-TDC-MANUAL"); + print_flag(t, &flags, CAN_CTRLMODE_XL_TMS, "TMS"); =20 if (flags) print_hex(t, NULL, "%x", flags); @@ -333,6 +335,9 @@ static int can_parse_opt(struct link_util *lu, int argc= , char **argv, invarg("\"xtdc-mode\" must be either of \"auto\", \"manual\" or \"off\= "", *argv); } + } else if (strcmp(*argv, "tms") =3D=3D 0) { + NEXT_ARG(); + set_ctrlmode("tms", *argv, &cm, CAN_CTRLMODE_XL_TMS); } else if (matches(*argv, "restart") =3D=3D 0) { __u32 val =3D 1; =20 --=20 2.51.2