Skip to content

Commit

Permalink
igc: Remove the internal 'eee_advert' field
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sasha Neftin authored and Tony Nguyen committed Jul 11, 2024
1 parent aff6e32 commit 1712c9e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion drivers/net/ethernet/intel/igc/igc.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ struct igc_adapter {
struct net_device *netdev;

struct ethtool_keee eee;
u16 eee_advert;

unsigned long state;
unsigned int flags;
Expand Down
6 changes: 0 additions & 6 deletions drivers/net/ethernet/intel/igc/igc_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/intel/igc/igc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 1712c9e

Please sign in to comment.