@@ -613,8 +613,6 @@ struct stmmac_mmc_ops {
stmmac_do_void_callback(__priv, mmc, read, __args)
/* XPCS callbacks */
-#define stmmac_xpcs_validate(__priv, __args...) \
- stmmac_do_callback(__priv, xpcs, validate, __args)
#define stmmac_xpcs_config(__priv, __args...) \
stmmac_do_callback(__priv, xpcs, config, __args)
#define stmmac_xpcs_get_state(__priv, __args...) \
@@ -996,7 +996,7 @@ static void stmmac_validate(struct phylink_config *config,
linkmode_andnot(state->advertising, state->advertising, mask);
/* If PCS is supported, check which modes it supports. */
- stmmac_xpcs_validate(priv, &priv->hw->xpcs_args, supported, state);
+ xpcs_validate(&priv->hw->xpcs_args, supported, state);
}
static void stmmac_mac_pcs_get_state(struct phylink_config *config,
@@ -658,9 +658,8 @@ static void xpcs_resolve_pma(struct mdio_xpcs_args *xpcs,
}
}
-static int xpcs_validate(struct mdio_xpcs_args *xpcs,
- unsigned long *supported,
- struct phylink_link_state *state)
+void xpcs_validate(struct mdio_xpcs_args *xpcs, unsigned long *supported,
+ struct phylink_link_state *state)
{
bool valid_interface;
@@ -683,13 +682,13 @@ static int xpcs_validate(struct mdio_xpcs_args *xpcs,
if (!valid_interface) {
bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS);
- return 0;
+ return;
}
linkmode_and(supported, supported, xpcs->supported);
linkmode_and(state->advertising, state->advertising, xpcs->supported);
- return 0;
}
+EXPORT_SYMBOL_GPL(xpcs_validate);
static int xpcs_config_eee(struct mdio_xpcs_args *xpcs, int mult_fact_100ns,
int enable)
@@ -958,7 +957,6 @@ static int xpcs_probe(struct mdio_xpcs_args *xpcs)
}
static struct mdio_xpcs_ops xpcs_ops = {
- .validate = xpcs_validate,
.config = xpcs_config,
.get_state = xpcs_get_state,
.link_up = xpcs_link_up,
@@ -25,9 +25,6 @@ struct mdio_xpcs_args {
};
struct mdio_xpcs_ops {
- int (*validate)(struct mdio_xpcs_args *xpcs,
- unsigned long *supported,
- struct phylink_link_state *state);
int (*config)(struct mdio_xpcs_args *xpcs,
const struct phylink_link_state *state);
int (*get_state)(struct mdio_xpcs_args *xpcs,
@@ -40,5 +37,7 @@ struct mdio_xpcs_ops {
};
struct mdio_xpcs_ops *mdio_xpcs_get_ops(void);
+void xpcs_validate(struct mdio_xpcs_args *xpcs, unsigned long *supported,
+ struct phylink_link_state *state);
#endif /* __LINUX_PCS_XPCS_H */