stmmac: Validate hwtstamp_config completely before applying it
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 14 Nov 2013 00:43:41 +0000 (00:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Nov 2013 21:22:10 +0000 (16:22 -0500)
commit5f3da3281932a795b80cddd1887291515a7e324d
treea1fb34efac122893d54620a3b7f8ce7e3219f0b4
parent810abe9bb3619c717115ae88a09a92cb35a83171
stmmac: Validate hwtstamp_config completely before applying it

stmmac_hwtstamp_ioctl() should validate all fields of hwtstamp_config
before making any changes.  Currently it sets the TX configuration
before validating the rx_filter field.

Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c