Skip to content

Commit

Permalink
net: mii: remove mii_lpa_mod_linkmode_lpa_sgmii()
Browse files Browse the repository at this point in the history
Vladimir points out that since we removed mii_lpa_to_linkmode_lpa_sgmii(),
mii_lpa_mod_linkmode_lpa_sgmii() is also no longer called.

Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Jan 28, 2022
1 parent c52db24 commit b5b3d10
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions include/linux/mii.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,39 +354,6 @@ static inline u32 mii_adv_to_ethtool_adv_x(u32 adv)
return result;
}

/**
* mii_lpa_mod_linkmode_adv_sgmii
* @lp_advertising: pointer to destination link mode.
* @lpa: value of the MII_LPA register
*
* A small helper function that translates MII_LPA bits to
* linkmode advertisement settings for SGMII.
* Leaves other bits unchanged.
*/
static inline void
mii_lpa_mod_linkmode_lpa_sgmii(unsigned long *lp_advertising, u32 lpa)
{
u32 speed_duplex = lpa & LPA_SGMII_DPX_SPD_MASK;

linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, lp_advertising,
speed_duplex == LPA_SGMII_1000HALF);

linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, lp_advertising,
speed_duplex == LPA_SGMII_1000FULL);

linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, lp_advertising,
speed_duplex == LPA_SGMII_100HALF);

linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, lp_advertising,
speed_duplex == LPA_SGMII_100FULL);

linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, lp_advertising,
speed_duplex == LPA_SGMII_10HALF);

linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, lp_advertising,
speed_duplex == LPA_SGMII_10FULL);
}

/**
* mii_adv_mod_linkmode_adv_t
* @advertising:pointer to destination link mode.
Expand Down

0 comments on commit b5b3d10

Please sign in to comment.