mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
|
From 0c282205ef8c6dd6d2c145fac1fb6aba3e65c02d Mon Sep 17 00:00:00 2001
|
|||
|
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
|||
|
Date: Fri, 1 Mar 2024 12:43:02 +0200
|
|||
|
Subject: [PATCH 42/48] net: dsa: mt7530: get rid of mt753x_mac_config()
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
There is no need for a separate function to call
|
|||
|
priv->info->mac_port_config(). Call it from mt753x_phylink_mac_config()
|
|||
|
instead and remove mt753x_mac_config().
|
|||
|
|
|||
|
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
|||
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|||
|
---
|
|||
|
drivers/net/dsa/mt7530.c | 14 ++------------
|
|||
|
1 file changed, 2 insertions(+), 12 deletions(-)
|
|||
|
|
|||
|
--- a/drivers/net/dsa/mt7530.c
|
|||
|
+++ b/drivers/net/dsa/mt7530.c
|
|||
|
@@ -2661,16 +2661,6 @@ mt7531_mac_config(struct dsa_switch *ds,
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
-static void
|
|||
|
-mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
|
|||
|
- const struct phylink_link_state *state)
|
|||
|
-{
|
|||
|
- struct mt7530_priv *priv = ds->priv;
|
|||
|
-
|
|||
|
- if (priv->info->mac_port_config)
|
|||
|
- priv->info->mac_port_config(ds, port, mode, state->interface);
|
|||
|
-}
|
|||
|
-
|
|||
|
static struct phylink_pcs *
|
|||
|
mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
|
|||
|
phy_interface_t interface)
|
|||
|
@@ -2696,8 +2686,8 @@ mt753x_phylink_mac_config(struct dsa_swi
|
|||
|
struct mt7530_priv *priv = ds->priv;
|
|||
|
u32 mcr_cur, mcr_new;
|
|||
|
|
|||
|
- if (port == 5 || port == 6)
|
|||
|
- mt753x_mac_config(ds, port, mode, state);
|
|||
|
+ if ((port == 5 || port == 6) && priv->info->mac_port_config)
|
|||
|
+ priv->info->mac_port_config(ds, port, mode, state->interface);
|
|||
|
|
|||
|
mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
|
|||
|
mcr_new = mcr_cur;
|