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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -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. |