History

ptp: Validate requests to enable time stamping of external signals.

Commit 415606588c61 ("PTP: introduce new versions of IOCTLs") introduced a new external time stamp ioctl that validates the flags. This patch extends the validation to ensure that at least one rising or falling edge flag is set when enabling external time stamps.

Richard Cochran committed 7 years ago

Commit cd734d51 parent 3df70af2 files · +14 −5Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/ptp_clock.h+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
31#define PTP_ENABLE_FEATURE (1<<0)31#define PTP_ENABLE_FEATURE (1<<0)
32#define PTP_RISING_EDGE (1<<1)32#define PTP_RISING_EDGE (1<<1)
33#define PTP_FALLING_EDGE (1<<2)33#define PTP_FALLING_EDGE (1<<2)
34#define PTP_EXTTS_EDGES (PTP_RISING_EDGE | PTP_FALLING_EDGE)
34 35
35/*36/*
36 * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl.37 * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl.