[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211003050147.569044-1-mailhol.vincent@wanadoo.fr>
Date: Sun, 3 Oct 2021 14:01:44 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Marc Kleine-Budde <mkl@...gutronix.de>, linux-can@...r.kernel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Vincent Mailhol <mailhol.vincent@...adoo.fr>
Subject: [RFC PATCH v1 0/3] iproute2-next: iplink_can: report the controller capabilities
The patch series serve one purpose: allow the user to check both the
supported and the static capabilities.
Currently, the CAN netlink interface provides no easy ways to check
the capabilities of a given controller. The only method from the
command line is to try each CAN_CTRLMODE_ individually to check
whether the netlink interface returns an -EOPNOTSUPP error or not
(alternatively, one may find it easier to directly check the source
code of the driver instead...)
Here, we introduce a way to directly report the supported features as
well as the statically enabled features.
The first patch of the series only does some clean up. The second
patch is the real thing. The last patch contains the needed
modification to the uapi headers and is only there for convenience.
Vincent Mailhol (3):
iplink_can: code refactoring of print_ctrlmode()
iplink_can: add ctrlmode_{supported,_static} to the "--details --json"
output
uapi: can: netlink: add new field to struct can_ctrlmode to report
capabilities
include/uapi/linux/can/netlink.h | 5 ++-
ip/iplink_can.c | 54 +++++++++++++++++++-------------
2 files changed, 36 insertions(+), 23 deletions(-)
--
2.32.0
Powered by blists - more mailing lists