summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-03-30 20:44:44 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-30 21:52:27 +0300
commit0bd274060a0f49d974b7e88fa87b6e1c1f496a48 (patch)
treea18917a5f95b029c380e0e6e709476f76894a53b /drivers/net
parentb8447abc4c8fb2abaa268f8e193c43e0bec2ef11 (diff)
downloadlinux-0bd274060a0f49d974b7e88fa87b6e1c1f496a48.tar.xz
net: phylink: change phylink_mii_c22_pcs_set_advertisement() prototype
Change phylink_mii_c22_pcs_set_advertisement() to take only the PHY interface and advertisement mask, rather than the full phylink state. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/phy/phylink.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index fed0c5907c6a..f31bfd39df4b 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -2184,7 +2184,8 @@ EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_get_state);
* phylink_mii_c22_pcs_set_advertisement() - configure the clause 37 PCS
* advertisement
* @pcs: a pointer to a &struct mdio_device.
- * @state: a pointer to the state being configured.
+ * @interface: the PHY interface mode being configured
+ * @advertising: the ethtool advertisement mask
*
* Helper for MAC PCS supporting the 802.3 clause 22 register set for
* clause 37 negotiation and/or SGMII control.
@@ -2197,22 +2198,23 @@ EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_get_state);
* zero if no change has been made, or one if the advertisement has changed.
*/
int phylink_mii_c22_pcs_set_advertisement(struct mdio_device *pcs,
- const struct phylink_link_state *state)
+ phy_interface_t interface,
+ const unsigned long *advertising)
{
struct mii_bus *bus = pcs->bus;
int addr = pcs->addr;
int val, ret;
u16 adv;
- switch (state->interface) {
+ switch (interface) {
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_2500BASEX:
adv = ADVERTISE_1000XFULL;
if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
- state->advertising))
+ advertising))
adv |= ADVERTISE_1000XPAUSE;
if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
- state->advertising))
+ advertising))
adv |= ADVERTISE_1000XPSE_ASYM;
val = mdiobus_read(bus, addr, MII_ADVERTISE);