Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f2ca263 authored by Jeff Kirsher's avatar Jeff Kirsher Committed by Auke Kok
Browse files

e1000: allow ethtool to pass arbitrary speed advertisment



With a patch, ethtool can now signify the driver to advertise more
than just a single speed/duplex setting. This allows you to tell the
card to advertise in 10/100 in any speed if you don't have a gigabit
switch for instance.

Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarAuke Kok <auke-jan.h.kok@intel.com>
parent 49559854
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -211,13 +211,9 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
				     ADVERTISED_FIBRE |
				     ADVERTISED_FIBRE |
				     ADVERTISED_Autoneg;
				     ADVERTISED_Autoneg;
		else
		else
			hw->autoneg_advertised = ADVERTISED_10baseT_Half |
			hw->autoneg_advertised = ecmd->advertising |
						  ADVERTISED_10baseT_Full |
			                         ADVERTISED_TP |
						  ADVERTISED_100baseT_Half |
			                         ADVERTISED_Autoneg;
						  ADVERTISED_100baseT_Full |
						  ADVERTISED_1000baseT_Full|
						  ADVERTISED_Autoneg |
						  ADVERTISED_TP;
		ecmd->advertising = hw->autoneg_advertised;
		ecmd->advertising = hw->autoneg_advertised;
	} else
	} else
		if (e1000_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) {
		if (e1000_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) {