Commit dc144bae authored by Serge Semin's avatar Serge Semin Committed by Paolo Abeni

net: stmmac: Rename phylink_get_caps() callback to update_caps()

Since recent commits the stmmac_ops::phylink_get_caps() callback has no
longer been responsible for the phylink MAC capabilities getting, but
merely updates the MAC capabilities in the mac_device_info::link::caps
field. Rename the callback to comply with the what the method does now.
Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Reviewed-by: default avatarRomain Gantois <romain.gantois@bootlin.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 30b3fe06
...@@ -68,7 +68,7 @@ static void dwmac4_core_init(struct mac_device_info *hw, ...@@ -68,7 +68,7 @@ static void dwmac4_core_init(struct mac_device_info *hw,
init_waitqueue_head(&priv->tstamp_busy_wait); init_waitqueue_head(&priv->tstamp_busy_wait);
} }
static void dwmac4_phylink_get_caps(struct stmmac_priv *priv) static void dwmac4_update_caps(struct stmmac_priv *priv)
{ {
if (priv->plat->tx_queues_to_use > 1) if (priv->plat->tx_queues_to_use > 1)
priv->hw->link.caps &= ~(MAC_10HD | MAC_100HD | MAC_1000HD); priv->hw->link.caps &= ~(MAC_10HD | MAC_100HD | MAC_1000HD);
...@@ -1190,7 +1190,7 @@ static void dwmac4_set_hw_vlan_mode(struct mac_device_info *hw) ...@@ -1190,7 +1190,7 @@ static void dwmac4_set_hw_vlan_mode(struct mac_device_info *hw)
const struct stmmac_ops dwmac4_ops = { const struct stmmac_ops dwmac4_ops = {
.core_init = dwmac4_core_init, .core_init = dwmac4_core_init,
.phylink_get_caps = dwmac4_phylink_get_caps, .update_caps = dwmac4_update_caps,
.set_mac = stmmac_set_mac, .set_mac = stmmac_set_mac,
.rx_ipc = dwmac4_rx_ipc_enable, .rx_ipc = dwmac4_rx_ipc_enable,
.rx_queue_enable = dwmac4_rx_queue_enable, .rx_queue_enable = dwmac4_rx_queue_enable,
...@@ -1235,7 +1235,7 @@ const struct stmmac_ops dwmac4_ops = { ...@@ -1235,7 +1235,7 @@ const struct stmmac_ops dwmac4_ops = {
const struct stmmac_ops dwmac410_ops = { const struct stmmac_ops dwmac410_ops = {
.core_init = dwmac4_core_init, .core_init = dwmac4_core_init,
.phylink_get_caps = dwmac4_phylink_get_caps, .update_caps = dwmac4_update_caps,
.set_mac = stmmac_dwmac4_set_mac, .set_mac = stmmac_dwmac4_set_mac,
.rx_ipc = dwmac4_rx_ipc_enable, .rx_ipc = dwmac4_rx_ipc_enable,
.rx_queue_enable = dwmac4_rx_queue_enable, .rx_queue_enable = dwmac4_rx_queue_enable,
...@@ -1284,7 +1284,7 @@ const struct stmmac_ops dwmac410_ops = { ...@@ -1284,7 +1284,7 @@ const struct stmmac_ops dwmac410_ops = {
const struct stmmac_ops dwmac510_ops = { const struct stmmac_ops dwmac510_ops = {
.core_init = dwmac4_core_init, .core_init = dwmac4_core_init,
.phylink_get_caps = dwmac4_phylink_get_caps, .update_caps = dwmac4_update_caps,
.set_mac = stmmac_dwmac4_set_mac, .set_mac = stmmac_dwmac4_set_mac,
.rx_ipc = dwmac4_rx_ipc_enable, .rx_ipc = dwmac4_rx_ipc_enable,
.rx_queue_enable = dwmac4_rx_queue_enable, .rx_queue_enable = dwmac4_rx_queue_enable,
......
...@@ -308,8 +308,8 @@ struct stmmac_est; ...@@ -308,8 +308,8 @@ struct stmmac_est;
struct stmmac_ops { struct stmmac_ops {
/* MAC core initialization */ /* MAC core initialization */
void (*core_init)(struct mac_device_info *hw, struct net_device *dev); void (*core_init)(struct mac_device_info *hw, struct net_device *dev);
/* Get phylink capabilities */ /* Update MAC capabilities */
void (*phylink_get_caps)(struct stmmac_priv *priv); void (*update_caps)(struct stmmac_priv *priv);
/* Enable the MAC RX/TX */ /* Enable the MAC RX/TX */
void (*set_mac)(void __iomem *ioaddr, bool enable); void (*set_mac)(void __iomem *ioaddr, bool enable);
/* Enable and verify that the IPC module is supported */ /* Enable and verify that the IPC module is supported */
...@@ -430,8 +430,8 @@ struct stmmac_ops { ...@@ -430,8 +430,8 @@ struct stmmac_ops {
#define stmmac_core_init(__priv, __args...) \ #define stmmac_core_init(__priv, __args...) \
stmmac_do_void_callback(__priv, mac, core_init, __args) stmmac_do_void_callback(__priv, mac, core_init, __args)
#define stmmac_mac_phylink_get_caps(__priv) \ #define stmmac_mac_update_caps(__priv) \
stmmac_do_void_callback(__priv, mac, phylink_get_caps, __priv) stmmac_do_void_callback(__priv, mac, update_caps, __priv)
#define stmmac_mac_set(__priv, __args...) \ #define stmmac_mac_set(__priv, __args...) \
stmmac_do_void_callback(__priv, mac, set_mac, __args) stmmac_do_void_callback(__priv, mac, set_mac, __args)
#define stmmac_rx_ipc(__priv, __args...) \ #define stmmac_rx_ipc(__priv, __args...) \
......
...@@ -1225,8 +1225,8 @@ static int stmmac_phy_setup(struct stmmac_priv *priv) ...@@ -1225,8 +1225,8 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
xpcs_get_interfaces(priv->hw->xpcs, xpcs_get_interfaces(priv->hw->xpcs,
priv->phylink_config.supported_interfaces); priv->phylink_config.supported_interfaces);
/* Get the MAC specific capabilities */ /* Refresh the MAC-specific capabilities */
stmmac_mac_phylink_get_caps(priv); stmmac_mac_update_caps(priv);
priv->phylink_config.mac_capabilities = priv->hw->link.caps; priv->phylink_config.mac_capabilities = priv->hw->link.caps;
...@@ -7343,7 +7343,7 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt) ...@@ -7343,7 +7343,7 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt)
priv->rss.table[i] = ethtool_rxfh_indir_default(i, priv->rss.table[i] = ethtool_rxfh_indir_default(i,
rx_cnt); rx_cnt);
stmmac_mac_phylink_get_caps(priv); stmmac_mac_update_caps(priv);
priv->phylink_config.mac_capabilities = priv->hw->link.caps; priv->phylink_config.mac_capabilities = priv->hw->link.caps;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment