summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-09-29 23:04:13 +0200
committerDavid S. Miller <davem@davemloft.net>2018-10-01 22:55:36 -0700
commit5f991f7bddc991ecc3c8a009ffd76fccff4661c7 (patch)
tree041625dea9f72ac77fef229b92476238619ab91a /drivers/net/ethernet/freescale/fman
parentedc7ccbbcf32b97c7d26cd556f364eb4f22c4285 (diff)
net: phy: Add helper for advertise to lcl value
Add a helper to convert the local advertising to an LCL capabilities, which is then used to resolve pause flow control settings. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman')
-rw-r--r--drivers/net/ethernet/freescale/fman/mac.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index a847b9c3b31a..d79e4e009d63 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -393,11 +393,7 @@ void fman_get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause,
*/
/* get local capabilities */
- lcl_adv = 0;
- if (phy_dev->advertising & ADVERTISED_Pause)
- lcl_adv |= ADVERTISE_PAUSE_CAP;
- if (phy_dev->advertising & ADVERTISED_Asym_Pause)
- lcl_adv |= ADVERTISE_PAUSE_ASYM;
+ lcl_adv = ethtool_adv_to_lcl_adv_t(phy_dev->advertising);
/* get link partner capabilities */
rmt_adv = 0;