]> Git Repo - linux.git/blobdiff - drivers/net/dsa/mt7530.c
net: phy: Add helper for advertise to lcl value
[linux.git] / drivers / net / dsa / mt7530.c
index 62e486652e622074b1ca1615e02a6cf029cc667b..a5de9bffe5bec940a83186d731bfe77ac23f97d3 100644 (file)
@@ -658,11 +658,7 @@ static void mt7530_adjust_link(struct dsa_switch *ds, int port,
                        if (phydev->asym_pause)
                                rmt_adv |= LPA_PAUSE_ASYM;
 
-                       if (phydev->advertising & ADVERTISED_Pause)
-                               lcl_adv |= ADVERTISE_PAUSE_CAP;
-                       if (phydev->advertising & ADVERTISED_Asym_Pause)
-                               lcl_adv |= ADVERTISE_PAUSE_ASYM;
-
+                       lcl_adv = ethtool_adv_to_lcl_adv_t(phydev->advertising);
                        flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv);
 
                        if (flowctrl & FLOW_CTRL_TX)
This page took 0.026418 seconds and 4 git commands to generate.