diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-02-23 15:00:46 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-25 06:31:42 +0100 |
commit | 066ce9779c7a92a3113cc392dd1f47c83f483903 (patch) | |
tree | 74cf2b6f62e4629d4dde67bec07039229f207d43 /drivers | |
parent | net: dsa: mv88e6xxx: rename references to "lag" as "lag_dev" (diff) | |
download | linux-066ce9779c7a92a3113cc392dd1f47c83f483903.tar.xz linux-066ce9779c7a92a3113cc392dd1f47c83f483903.zip |
net: dsa: qca8k: rename references to "lag" as "lag_dev"
In preparation of converting struct net_device *dp->lag_dev into a
struct dsa_lag *dp->lag, we need to rename, for consistency purposes,
all occurrences of the "lag" variable in qca8k to "lag_dev".
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/qca8k.c | 28 |
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 |