linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/3] iproute2-next: iplink_can: report the controller capabilities
@ 2021-10-03  5:01 Vincent Mailhol
  2021-10-03  5:01 ` [RFC PATCH v1 1/3] iplink_can: code refactoring of print_ctrlmode() Vincent Mailhol
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vincent Mailhol @ 2021-10-03  5:01 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can; +Cc: netdev, linux-kernel, Vincent Mailhol

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-03  5:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03  5:01 [RFC PATCH v1 0/3] iproute2-next: iplink_can: report the controller capabilities Vincent Mailhol
2021-10-03  5:01 ` [RFC PATCH v1 1/3] iplink_can: code refactoring of print_ctrlmode() Vincent Mailhol
2021-10-03  5:01 ` [RFC PATCH v1 2/3] iplink_can: add ctrlmode_{supported,_static} to the "--details --json" output Vincent Mailhol
2021-10-03  5:01 ` [RFC PATCH v1 3/3] uapi: can: netlink: add new field to struct can_ctrlmode to report capabilities Vincent Mailhol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).