i40e: Fix order of checks when enabling/disabling autoneg in ethtool
authorCatherine Sullivan <catherine.sullivan@intel.com>
Mon, 28 Sep 2015 18:16:58 +0000 (14:16 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 19 Oct 2015 22:35:52 +0000 (15:35 -0700)
commit3ce12ee9d8f9ae245f38e6acbd32625d8e002c5b
treeac43451833958438c6289596f722410a7388391a
parenta03dc368547a7a4e9fcedc6f64dd64a9ff5e0593
i40e: Fix order of checks when enabling/disabling autoneg in ethtool

We were previously checking if autoneg was allowed to change before
checking if autoneg was changing. We need to do this in the other order
or else we will erroneously return EINVAL when autoneg is not changing.

Change-ID: Iff9f7d1c9bddc1ad1e5d227d4f42754f90155410
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c