realtek: 6.12: align internal/external mac eee function names
The DSA driver uses set_mac_eee() for the outside API while the interal helper is called port_eee_set(). Align that. Additionally do not call the internal helpers directly by the function names but use the register assignments. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/18935 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
d7f51c1917
commit
22beb4fbc4
5 changed files with 14 additions and 14 deletions
|
@ -1115,7 +1115,7 @@ static void rtl83xx_port_disable(struct dsa_switch *ds, int port)
|
|||
priv->ports[port].enable = false;
|
||||
}
|
||||
|
||||
static int rtl83xx_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
|
||||
static int rtldsa_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
|
||||
{
|
||||
struct rtl838x_switch_priv *priv = ds->priv;
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ static int rtl83xx_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_k
|
|||
priv->r->init_eee(priv, true);
|
||||
}
|
||||
|
||||
priv->r->port_eee_set(priv, port, e->eee_enabled);
|
||||
priv->r->set_mac_eee(priv, port, e->eee_enabled);
|
||||
|
||||
if (e->eee_enabled)
|
||||
pr_info("Enabled EEE for port %d\n", port);
|
||||
|
@ -2217,7 +2217,7 @@ const struct dsa_switch_ops rtl83xx_switch_ops = {
|
|||
.port_disable = rtl83xx_port_disable,
|
||||
|
||||
.get_mac_eee = rtldsa_get_mac_eee,
|
||||
.set_mac_eee = rtl83xx_set_mac_eee,
|
||||
.set_mac_eee = rtldsa_set_mac_eee,
|
||||
|
||||
.set_ageing_time = rtl83xx_set_ageing_time,
|
||||
.port_bridge_join = rtl83xx_port_bridge_join,
|
||||
|
@ -2275,7 +2275,7 @@ const struct dsa_switch_ops rtl930x_switch_ops = {
|
|||
.port_disable = rtl83xx_port_disable,
|
||||
|
||||
.get_mac_eee = rtldsa_get_mac_eee,
|
||||
.set_mac_eee = rtl83xx_set_mac_eee,
|
||||
.set_mac_eee = rtldsa_set_mac_eee,
|
||||
|
||||
.set_ageing_time = rtl83xx_set_ageing_time,
|
||||
.port_bridge_join = rtl83xx_port_bridge_join,
|
||||
|
|
|
@ -598,7 +598,7 @@ static void rtl838x_traffic_disable(int source, int dest)
|
|||
}
|
||||
|
||||
/* Enables or disables the EEE/EEEP capability of a port */
|
||||
static void rtl838x_port_eee_set(struct rtl838x_switch_priv *priv, int port, bool enable)
|
||||
static void rtldsa_838x_set_mac_eee(struct rtl838x_switch_priv *priv, int port, bool enable)
|
||||
{
|
||||
u32 v;
|
||||
|
||||
|
@ -635,7 +635,7 @@ static void rtl838x_init_eee(struct rtl838x_switch_priv *priv, bool enable)
|
|||
/* Enable EEE MAC support on ports */
|
||||
for (int i = 0; i < priv->cpu_port; i++) {
|
||||
if (priv->ports[i].phy)
|
||||
rtl838x_port_eee_set(priv, i, enable);
|
||||
priv->r->set_mac_eee(priv, i, enable);
|
||||
}
|
||||
priv->eee_enabled = enable;
|
||||
}
|
||||
|
@ -1724,7 +1724,7 @@ const struct rtl838x_reg rtl838x_reg = {
|
|||
.rma_bpdu_fld_pmask = RTL838X_RMA_BPDU_FLD_PMSK,
|
||||
.spcl_trap_eapol_ctrl = RTL838X_SPCL_TRAP_EAPOL_CTRL,
|
||||
.init_eee = rtl838x_init_eee,
|
||||
.port_eee_set = rtl838x_port_eee_set,
|
||||
.set_mac_eee = rtldsa_838x_set_mac_eee,
|
||||
.l2_hash_seed = rtl838x_l2_hash_seed,
|
||||
.l2_hash_key = rtl838x_l2_hash_key,
|
||||
.read_mcast_pmask = rtl838x_read_mcast_pmask,
|
||||
|
|
|
@ -1036,7 +1036,7 @@ struct rtl838x_reg {
|
|||
int rma_bpdu_fld_pmask;
|
||||
int spcl_trap_eapol_ctrl;
|
||||
void (*init_eee)(struct rtl838x_switch_priv *priv, bool enable);
|
||||
void (*port_eee_set)(struct rtl838x_switch_priv *priv, int port, bool enable);
|
||||
void (*set_mac_eee)(struct rtl838x_switch_priv *priv, int port, bool enable);
|
||||
u64 (*l2_hash_seed)(u64 mac, u32 vid);
|
||||
u32 (*l2_hash_key)(struct rtl838x_switch_priv *priv, u64 seed);
|
||||
u64 (*read_mcast_pmask)(int idx);
|
||||
|
|
|
@ -858,7 +858,7 @@ static void rtl839x_stp_set(struct rtl838x_switch_priv *priv, u16 msti, u32 port
|
|||
}
|
||||
|
||||
/* Enables or disables the EEE/EEEP capability of a port */
|
||||
static void rtl839x_port_eee_set(struct rtl838x_switch_priv *priv, int port, bool enable)
|
||||
static void rtldsa_839x_set_mac_eee(struct rtl838x_switch_priv *priv, int port, bool enable)
|
||||
{
|
||||
u32 v;
|
||||
|
||||
|
@ -894,7 +894,7 @@ static void rtl839x_init_eee(struct rtl838x_switch_priv *priv, bool enable)
|
|||
/* Setup EEE on all ports */
|
||||
for (int i = 0; i < priv->cpu_port; i++) {
|
||||
if (priv->ports[i].phy)
|
||||
rtl839x_port_eee_set(priv, i, enable);
|
||||
priv->r->set_mac_eee(priv, i, enable);
|
||||
}
|
||||
priv->eee_enabled = enable;
|
||||
}
|
||||
|
@ -1860,7 +1860,7 @@ const struct rtl838x_reg rtl839x_reg = {
|
|||
.rma_bpdu_fld_pmask = RTL839X_RMA_BPDU_FLD_PMSK,
|
||||
.spcl_trap_eapol_ctrl = RTL839X_SPCL_TRAP_EAPOL_CTRL,
|
||||
.init_eee = rtl839x_init_eee,
|
||||
.port_eee_set = rtl839x_port_eee_set,
|
||||
.set_mac_eee = rtldsa_839x_set_mac_eee,
|
||||
.l2_hash_seed = rtl839x_l2_hash_seed,
|
||||
.l2_hash_key = rtl839x_l2_hash_key,
|
||||
.read_mcast_pmask = rtl839x_read_mcast_pmask,
|
||||
|
|
|
@ -892,7 +892,7 @@ u32 rtl930x_hash(struct rtl838x_switch_priv *priv, u64 seed)
|
|||
}
|
||||
|
||||
/* Enables or disables the EEE/EEEP capability of a port */
|
||||
static void rtl930x_port_eee_set(struct rtl838x_switch_priv *priv, int port, bool enable)
|
||||
static void rtldsa_930x_set_mac_eee(struct rtl838x_switch_priv *priv, int port, bool enable)
|
||||
{
|
||||
u32 v;
|
||||
|
||||
|
@ -920,7 +920,7 @@ static void rtl930x_init_eee(struct rtl838x_switch_priv *priv, bool enable)
|
|||
/* Setup EEE on all ports */
|
||||
for (int i = 0; i < priv->cpu_port; i++) {
|
||||
if (priv->ports[i].phy)
|
||||
rtl930x_port_eee_set(priv, i, enable);
|
||||
priv->r->set_mac_eee(priv, i, enable);
|
||||
}
|
||||
|
||||
priv->eee_enabled = enable;
|
||||
|
@ -2488,7 +2488,7 @@ const struct rtl838x_reg rtl930x_reg = {
|
|||
.trk_mbr_ctr = rtl930x_trk_mbr_ctr,
|
||||
.rma_bpdu_fld_pmask = RTL930X_RMA_BPDU_FLD_PMSK,
|
||||
.init_eee = rtl930x_init_eee,
|
||||
.port_eee_set = rtl930x_port_eee_set,
|
||||
.set_mac_eee = rtldsa_930x_set_mac_eee,
|
||||
.l2_hash_seed = rtl930x_l2_hash_seed,
|
||||
.l2_hash_key = rtl930x_l2_hash_key,
|
||||
.read_mcast_pmask = rtl930x_read_mcast_pmask,
|
||||
|
|
Loading…
Reference in a new issue