Commit ad35ffa2 authored by Jedrzej Jagielski's avatar Jedrzej Jagielski Committed by Tony Nguyen
Browse files

ice: Fix curr_link_speed advertised speed



Change curr_link_speed advertised speed, due to
link_info.link_speed is not equal phy.curr_user_speed_req.
Without this patch it is impossible to set advertised
speed to same as link_speed.

Testing Hints: Try to set advertised speed
to 25G only with 25G default link (use ethtool -s 0x80000000)

Fixes: 48cb27f2 ("ice: Implement handlers for ethtool PHY/link operations")
Signed-off-by: default avatarGrzegorz Siwik <grzegorz.siwik@intel.com>
Signed-off-by: default avatarJedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 3d97f1af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2298,7 +2298,7 @@ ice_set_link_ksettings(struct net_device *netdev,
	if (err)
		goto done;

	curr_link_speed = pi->phy.link_info.link_speed;
	curr_link_speed = pi->phy.curr_user_speed_req;
	adv_link_speed = ice_ksettings_find_adv_link_speed(ks);

	/* If speed didn't get set, set it to what it currently is.