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)
commitcd734d54e67990eebfc3106dc39047c1141d4197
treea1ce109f184aab98be6e688c3e36f6a9804e1da8
parent3df70afe8d33f4977d0e0891bdcfb639320b5257
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.

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