]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: Validate requests to enable time stamping of external signals.
authorRichard Cochran <richardcochran@gmail.com>
Thu, 14 Nov 2019 18:44:55 +0000 (10:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 20:48:32 +0000 (12:48 -0800)
commit00a6e747a4df019e2bf9a2df0c5e1fdc206976a1
treea1ce109f184aab98be6e688c3e36f6a9804e1da8
parent17f463488faf58ee4f1b0b357227edaa894e204a
ptp: Validate requests to enable time stamping of external signals.

Commit 9292cffbb6b9 ("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>
drivers/ptp/ptp_chardev.c
include/uapi/linux/ptp_clock.h