tg3: Validate hwtstamp_config completely before applying it
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 14 Nov 2013 00:40:56 +0000 (00:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Nov 2013 21:22:09 +0000 (16:22 -0500)
commit58b187c68d91b54b82f6fd267ee3346ed8770655
tree72e9385a938411ddfc9d6f539c4d50c115d52141
parentb4e09b29c73e3bf09be1652bbf19585a2363a10a
tg3: Validate hwtstamp_config completely before applying it

tg3_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>
Acked-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c