Skip to content

Commit dc144ba

Browse files
fancerPaolo Abeni
authored andcommitted
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: Serge Semin <[email protected]> Reviewed-by: Romain Gantois <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 30b3fe0 commit dc144ba

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void dwmac4_core_init(struct mac_device_info *hw,
6868
init_waitqueue_head(&priv->tstamp_busy_wait);
6969
}
7070

71-
static void dwmac4_phylink_get_caps(struct stmmac_priv *priv)
71+
static void dwmac4_update_caps(struct stmmac_priv *priv)
7272
{
7373
if (priv->plat->tx_queues_to_use > 1)
7474
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)
11901190

11911191
const struct stmmac_ops dwmac4_ops = {
11921192
.core_init = dwmac4_core_init,
1193-
.phylink_get_caps = dwmac4_phylink_get_caps,
1193+
.update_caps = dwmac4_update_caps,
11941194
.set_mac = stmmac_set_mac,
11951195
.rx_ipc = dwmac4_rx_ipc_enable,
11961196
.rx_queue_enable = dwmac4_rx_queue_enable,
@@ -1235,7 +1235,7 @@ const struct stmmac_ops dwmac4_ops = {
12351235

12361236
const struct stmmac_ops dwmac410_ops = {
12371237
.core_init = dwmac4_core_init,
1238-
.phylink_get_caps = dwmac4_phylink_get_caps,
1238+
.update_caps = dwmac4_update_caps,
12391239
.set_mac = stmmac_dwmac4_set_mac,
12401240
.rx_ipc = dwmac4_rx_ipc_enable,
12411241
.rx_queue_enable = dwmac4_rx_queue_enable,
@@ -1284,7 +1284,7 @@ const struct stmmac_ops dwmac410_ops = {
12841284

12851285
const struct stmmac_ops dwmac510_ops = {
12861286
.core_init = dwmac4_core_init,
1287-
.phylink_get_caps = dwmac4_phylink_get_caps,
1287+
.update_caps = dwmac4_update_caps,
12881288
.set_mac = stmmac_dwmac4_set_mac,
12891289
.rx_ipc = dwmac4_rx_ipc_enable,
12901290
.rx_queue_enable = dwmac4_rx_queue_enable,

drivers/net/ethernet/stmicro/stmmac/hwif.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ struct stmmac_est;
308308
struct stmmac_ops {
309309
/* MAC core initialization */
310310
void (*core_init)(struct mac_device_info *hw, struct net_device *dev);
311-
/* Get phylink capabilities */
312-
void (*phylink_get_caps)(struct stmmac_priv *priv);
311+
/* Update MAC capabilities */
312+
void (*update_caps)(struct stmmac_priv *priv);
313313
/* Enable the MAC RX/TX */
314314
void (*set_mac)(void __iomem *ioaddr, bool enable);
315315
/* Enable and verify that the IPC module is supported */
@@ -430,8 +430,8 @@ struct stmmac_ops {
430430

431431
#define stmmac_core_init(__priv, __args...) \
432432
stmmac_do_void_callback(__priv, mac, core_init, __args)
433-
#define stmmac_mac_phylink_get_caps(__priv) \
434-
stmmac_do_void_callback(__priv, mac, phylink_get_caps, __priv)
433+
#define stmmac_mac_update_caps(__priv) \
434+
stmmac_do_void_callback(__priv, mac, update_caps, __priv)
435435
#define stmmac_mac_set(__priv, __args...) \
436436
stmmac_do_void_callback(__priv, mac, set_mac, __args)
437437
#define stmmac_rx_ipc(__priv, __args...) \

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,8 +1225,8 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
12251225
xpcs_get_interfaces(priv->hw->xpcs,
12261226
priv->phylink_config.supported_interfaces);
12271227

1228-
/* Get the MAC specific capabilities */
1229-
stmmac_mac_phylink_get_caps(priv);
1228+
/* Refresh the MAC-specific capabilities */
1229+
stmmac_mac_update_caps(priv);
12301230

12311231
priv->phylink_config.mac_capabilities = priv->hw->link.caps;
12321232

@@ -7343,7 +7343,7 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt)
73437343
priv->rss.table[i] = ethtool_rxfh_indir_default(i,
73447344
rx_cnt);
73457345

7346-
stmmac_mac_phylink_get_caps(priv);
7346+
stmmac_mac_update_caps(priv);
73477347

73487348
priv->phylink_config.mac_capabilities = priv->hw->link.caps;
73497349

0 commit comments

Comments
 (0)