Skip to content

Commit 1712c9e

Browse files
Sasha Neftinanguy11
authored andcommitted
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 <[email protected]> Tested-by: Mor Bar-Gabay <[email protected]> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent aff6e32 commit 1712c9e

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

drivers/net/ethernet/intel/igc/igc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ struct igc_adapter {
202202
struct net_device *netdev;
203203

204204
struct ethtool_keee eee;
205-
u16 eee_advert;
206205

207206
unsigned long state;
208207
unsigned int flags;

drivers/net/ethernet/intel/igc/igc_ethtool.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,10 +1636,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev,
16361636
linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
16371637
edata->supported);
16381638

1639-
if (hw->dev_spec._base.eee_enable)
1640-
mii_eee_cap1_mod_linkmode_t(edata->advertised,
1641-
adapter->eee_advert);
1642-
16431639
eeer = rd32(IGC_EEER);
16441640

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

1703-
adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised);
1704-
17051699
if (hw->dev_spec._base.eee_enable != edata->eee_enabled) {
17061700
hw->dev_spec._base.eee_enable = edata->eee_enabled;
17071701
adapter->flags |= IGC_FLAG_EEE;

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4975,9 +4975,6 @@ void igc_up(struct igc_adapter *adapter)
49754975
/* start the watchdog. */
49764976
hw->mac.get_link_status = true;
49774977
schedule_work(&adapter->watchdog_task);
4978-
4979-
adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T |
4980-
MDIO_EEE_2_5GT;
49814978
}
49824979

49834980
/**

0 commit comments

Comments
 (0)