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: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
aff6e32cc7
commit
1712c9ee36
@ -202,7 +202,6 @@ struct igc_adapter {
|
|||||||
struct net_device *netdev;
|
struct net_device *netdev;
|
||||||
|
|
||||||
struct ethtool_keee eee;
|
struct ethtool_keee eee;
|
||||||
u16 eee_advert;
|
|
||||||
|
|
||||||
unsigned long state;
|
unsigned long state;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
@ -1636,10 +1636,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev,
|
|||||||
linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
|
linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
|
||||||
edata->supported);
|
edata->supported);
|
||||||
|
|
||||||
if (hw->dev_spec._base.eee_enable)
|
|
||||||
mii_eee_cap1_mod_linkmode_t(edata->advertised,
|
|
||||||
adapter->eee_advert);
|
|
||||||
|
|
||||||
eeer = rd32(IGC_EEER);
|
eeer = rd32(IGC_EEER);
|
||||||
|
|
||||||
/* EEE status on negotiated link */
|
/* EEE status on negotiated link */
|
||||||
@ -1700,8 +1696,6 @@ static int igc_ethtool_set_eee(struct net_device *netdev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised);
|
|
||||||
|
|
||||||
if (hw->dev_spec._base.eee_enable != edata->eee_enabled) {
|
if (hw->dev_spec._base.eee_enable != edata->eee_enabled) {
|
||||||
hw->dev_spec._base.eee_enable = edata->eee_enabled;
|
hw->dev_spec._base.eee_enable = edata->eee_enabled;
|
||||||
adapter->flags |= IGC_FLAG_EEE;
|
adapter->flags |= IGC_FLAG_EEE;
|
||||||
|
@ -4975,9 +4975,6 @@ void igc_up(struct igc_adapter *adapter)
|
|||||||
/* start the watchdog. */
|
/* start the watchdog. */
|
||||||
hw->mac.get_link_status = true;
|
hw->mac.get_link_status = true;
|
||||||
schedule_work(&adapter->watchdog_task);
|
schedule_work(&adapter->watchdog_task);
|
||||||
|
|
||||||
adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T |
|
|
||||||
MDIO_EEE_2_5GT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user