History

net: phy: Add a helper to return the index for of the internal delay

Add a helper function that will return the index in the array for the passed in internal delay value. The helper requires the array, size and delay value. The helper will then return the index for the exact match or return the index for the index to the closest smaller value.

Dan Murphy committed 6 years ago

Commit 92252ee1 parent 91500692 files · +103 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/phy.h+4−0
@@ -1443,6 +1443,10 @@ void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx); · 1442 unmodified lines
1443bool phy_validate_pause(struct phy_device *phydev,1443bool phy_validate_pause(struct phy_device *phydev,
1444 struct ethtool_pauseparam *pp);1444 struct ethtool_pauseparam *pp);
1445void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);1445void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);
1446
1447s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
1448 const int *delay_values, int size, bool is_rx);
1449
1446void phy_resolve_pause(unsigned long *local_adv, unsigned long *partner_adv,1450void phy_resolve_pause(unsigned long *local_adv, unsigned long *partner_adv,
1447 bool *tx_pause, bool *rx_pause);1451 bool *tx_pause, bool *rx_pause);
1448 1452