mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-12 19:01:10 +00:00
iproute2: Add support for CAN presume-ack feature
This patch makes CAN_CTRLMODE_PRESUME_ACK netlink feature configurable. When enabled, the feature sets CAN controller in mode in which acknowledgement absence is ignored. Signed-off-by: Nikita Edward Baruzdin <nebaruzdin@gmail.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
parent
d471791427
commit
d26caee7e9
@ -37,6 +37,7 @@ static void print_usage(FILE *f)
|
||||
"\t[ one-shot { on | off } ]\n"
|
||||
"\t[ berr-reporting { on | off } ]\n"
|
||||
"\t[ fd { on | off } ]\n"
|
||||
"\t[ presume-ack { on | off } ]\n"
|
||||
"\n"
|
||||
"\t[ restart-ms TIME-MS ]\n"
|
||||
"\t[ restart ]\n"
|
||||
@ -99,6 +100,7 @@ static void print_ctrlmode(FILE *f, __u32 cm)
|
||||
_PF(CAN_CTRLMODE_ONE_SHOT, "ONE-SHOT");
|
||||
_PF(CAN_CTRLMODE_BERR_REPORTING, "BERR-REPORTING");
|
||||
_PF(CAN_CTRLMODE_FD, "FD");
|
||||
_PF(CAN_CTRLMODE_PRESUME_ACK, "PRESUME-ACK");
|
||||
#undef _PF
|
||||
if (cm)
|
||||
fprintf(f, "%x", cm);
|
||||
@ -201,6 +203,10 @@ static int can_parse_opt(struct link_util *lu, int argc, char **argv,
|
||||
NEXT_ARG();
|
||||
set_ctrlmode("fd", *argv, &cm,
|
||||
CAN_CTRLMODE_FD);
|
||||
} else if (matches(*argv, "presume-ack") == 0) {
|
||||
NEXT_ARG();
|
||||
set_ctrlmode("presume-ack", *argv, &cm,
|
||||
CAN_CTRLMODE_PRESUME_ACK);
|
||||
} else if (matches(*argv, "restart") == 0) {
|
||||
__u32 val = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user