summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/qca8k.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/dsa/qca8k.c')
-rw-r--r--drivers/net/dsa/qca8k.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 04fa21e37dfa..5691d193aa71 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -2647,17 +2647,17 @@ qca8k_get_tag_protocol(struct dsa_switch *ds, int port,
static bool
qca8k_lag_can_offload(struct dsa_switch *ds,
- struct net_device *lag,
+ struct net_device *lag_dev,
struct netdev_lag_upper_info *info)
{
struct dsa_port *dp;
int id, members = 0;
- id = dsa_lag_id(ds->dst, lag);
+ id = dsa_lag_id(ds->dst, lag_dev);
if (id < 0 || id >= ds->num_lag_ids)
return false;
- dsa_lag_foreach_port(dp, ds->dst, lag)
+ dsa_lag_foreach_port(dp, ds->dst, lag_dev)
/* Includes the port joining the LAG */
members++;
@@ -2676,7 +2676,7 @@ qca8k_lag_can_offload(struct dsa_switch *ds,
static int
qca8k_lag_setup_hash(struct dsa_switch *ds,
- struct net_device *lag,
+ struct net_device *lag_dev,
struct netdev_lag_upper_info *info)
{
struct qca8k_priv *priv = ds->priv;
@@ -2684,7 +2684,7 @@ qca8k_lag_setup_hash(struct dsa_switch *ds,
u32 hash = 0;
int i, id;
- id = dsa_lag_id(ds->dst, lag);
+ id = dsa_lag_id(ds->dst, lag_dev);
switch (info->hash_type) {
case NETDEV_LAG_HASH_L23:
@@ -2716,7 +2716,7 @@ qca8k_lag_setup_hash(struct dsa_switch *ds,
if (unique_lag) {
priv->lag_hash_mode = hash;
} else if (priv->lag_hash_mode != hash) {
- netdev_err(lag, "Error: Mismatched Hash Mode across different lag is not supported\n");
+ netdev_err(lag_dev, "Error: Mismatched Hash Mode across different lag is not supported\n");
return -EOPNOTSUPP;
}
@@ -2726,13 +2726,13 @@ qca8k_lag_setup_hash(struct dsa_switch *ds,
static int
qca8k_lag_refresh_portmap(struct dsa_switch *ds, int port,
- struct net_device *lag, bool delete)
+ struct net_device *lag_dev, bool delete)
{
struct qca8k_priv *priv = ds->priv;
int ret, id, i;
u32 val;
- id = dsa_lag_id(ds->dst, lag);
+ id = dsa_lag_id(ds->dst, lag_dev);
/* Read current port member */
ret = regmap_read(priv->regmap, QCA8K_REG_GOL_TRUNK_CTRL0, &val);
@@ -2795,26 +2795,26 @@ qca8k_lag_refresh_portmap(struct dsa_switch *ds, int port,
static int
qca8k_port_lag_join(struct dsa_switch *ds, int port,
- struct net_device *lag,
+ struct net_device *lag_dev,
struct netdev_lag_upper_info *info)
{
int ret;
- if (!qca8k_lag_can_offload(ds, lag, info))
+ if (!qca8k_lag_can_offload(ds, lag_dev, info))
return -EOPNOTSUPP;
- ret = qca8k_lag_setup_hash(ds, lag, info);
+ ret = qca8k_lag_setup_hash(ds, lag_dev, info);
if (ret)
return ret;
- return qca8k_lag_refresh_portmap(ds, port, lag, false);
+ return qca8k_lag_refresh_portmap(ds, port, lag_dev, false);
}
static int
qca8k_port_lag_leave(struct dsa_switch *ds, int port,
- struct net_device *lag)
+ struct net_device *lag_dev)
{
- return qca8k_lag_refresh_portmap(ds, port, lag, true);
+ return qca8k_lag_refresh_portmap(ds, port, lag_dev, true);
}
static void