ptp: Validate requests to enable time stamping of external signals.
Commit 415606588c
("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.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3df70afe8d
commit
cd734d54e6
@@ -31,6 +31,7 @@
|
||||
#define PTP_ENABLE_FEATURE (1<<0)
|
||||
#define PTP_RISING_EDGE (1<<1)
|
||||
#define PTP_FALLING_EDGE (1<<2)
|
||||
#define PTP_EXTTS_EDGES (PTP_RISING_EDGE | PTP_FALLING_EDGE)
|
||||
|
||||
/*
|
||||
* flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl.
|
||||
|
Reference in New Issue
Block a user