Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2ee91e54 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

ti_cpsw: Validate hwtstamp_config completely before applying it



cpsw_hwtstamp_ioctl() should validate all fields of hwtstamp_config,
and the hardware version, before making any changes.  Currently it
sets the TX configuration before validating the rx_filter field
or that the hardware supports timestamping.

Also correct the error code for hardware versions that don't
support timestamping.  ENOTSUPP is used by the NFS implementation
and is not part of userland API; we want EOPNOTSUPP (which glibc
also calls ENOTSUP, with one 'P').

Untested as I don't have a cross-compiler to hand.

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Acked-by: default avatarMugunthan V N <mugunthanvnm@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f3da328
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment