aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/renesas/ravb_ptp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-11-16 18:47:31 -0800
committerDavid S. Miller <davem@davemloft.net>2019-11-16 21:51:42 -0800
commit19b7e21c55c81713c4011278143006af9f232504 (patch)
treee1312ccebbc23ee6b6928d1d02d644a15d695b67 /drivers/net/ethernet/renesas/ravb_ptp.c
parentmscc.c: fix semicolon.cocci warnings (diff)
parentMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (diff)
downloadlinux-dev-19b7e21c55c81713c4011278143006af9f232504.tar.xz
linux-dev-19b7e21c55c81713c4011278143006af9f232504.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Lots of overlapping changes and parallel additions, stuff like that. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb_ptp.c')
-rw-r--r--drivers/net/ethernet/renesas/ravb_ptp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c
index 9a42580693cb..6984bd5b7da9 100644
--- a/drivers/net/ethernet/renesas/ravb_ptp.c
+++ b/drivers/net/ethernet/renesas/ravb_ptp.c
@@ -182,6 +182,13 @@ static int ravb_ptp_extts(struct ptp_clock_info *ptp,
struct net_device *ndev = priv->ndev;
unsigned long flags;
+ /* Reject requests with unsupported flags */
+ if (req->flags & ~(PTP_ENABLE_FEATURE |
+ PTP_RISING_EDGE |
+ PTP_FALLING_EDGE |
+ PTP_STRICT_FLAGS))
+ return -EOPNOTSUPP;
+
if (req->index)
return -EINVAL;
@@ -211,6 +218,10 @@ static int ravb_ptp_perout(struct ptp_clock_info *ptp,
unsigned long flags;
int error = 0;
+ /* Reject requests with unsupported flags */
+ if (req->flags)
+ return -EOPNOTSUPP;
+
if (req->index)
return -EINVAL;