Commit 1712c9ee authored by Sasha Neftin's avatar Sasha Neftin Committed by Tony Nguyen
Browse files

igc: Remove the internal 'eee_advert' field



Since the kernel's 'ethtool_keee' structure is in use, the internal
'eee_advert' field becomes pointless and can be removed.

This patch comes to clean up this redundant code.

Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com> (A Contingent Worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent aff6e32c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -202,7 +202,6 @@ struct igc_adapter {
	struct net_device *netdev;

	struct ethtool_keee eee;
	u16 eee_advert;

	unsigned long state;
	unsigned int flags;
+0 −6
Original line number Diff line number Diff line
@@ -1636,10 +1636,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev,
	linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
			 edata->supported);

	if (hw->dev_spec._base.eee_enable)
		mii_eee_cap1_mod_linkmode_t(edata->advertised,
					    adapter->eee_advert);

	eeer = rd32(IGC_EEER);

	/* EEE status on negotiated link */
@@ -1700,8 +1696,6 @@ static int igc_ethtool_set_eee(struct net_device *netdev,
		return -EINVAL;
	}

	adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised);

	if (hw->dev_spec._base.eee_enable != edata->eee_enabled) {
		hw->dev_spec._base.eee_enable = edata->eee_enabled;
		adapter->flags |= IGC_FLAG_EEE;
+0 −3
Original line number Diff line number Diff line
@@ -4975,9 +4975,6 @@ void igc_up(struct igc_adapter *adapter)
	/* start the watchdog. */
	hw->mac.get_link_status = true;
	schedule_work(&adapter->watchdog_task);

	adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T |
			      MDIO_EEE_2_5GT;
}

/**