i40e: always set ks->base.speed in i40e_get_settings_link_up
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 26 Oct 2018 21:33:29 +0000 (14:33 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 14 Nov 2018 18:56:33 +0000 (10:56 -0800)
In i40e_get_settings_link_up, set ks->base.speed to SPEED_UNKNOWN
in the case where we don't know the link speed.

Signed-off-by: Jacob Keller <jacob.e.keller@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

index 1ed241a5c3f48643252130477b9459139ee697c0..a6bc7847346b6e1a488742ac05588633c8dc2a80 100644 (file)
@@ -906,6 +906,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
                ks->base.speed = SPEED_100;
                break;
        default:
+               ks->base.speed = SPEED_UNKNOWN;
                break;
        }
        ks->base.duplex = DUPLEX_FULL;