[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220921135118.968595-7-atenart@kernel.org>
Date: Wed, 21 Sep 2022 15:51:17 +0200
From: Antoine Tenart <atenart@...nel.org>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com
Cc: Antoine Tenart <atenart@...nel.org>, sundeep.lkml@...il.com,
saeedm@...dia.com, liorna@...dia.com, dbogdanov@...vell.com,
mstarovoitov@...vell.com, irusskikh@...vell.com,
sd@...asysnail.net, netdev@...r.kernel.org
Subject: [PATCH net-next 6/7] net/mlx5e: macsec: remove checks on the prepare phase
Remove checks on the prepare phase as it is now unused by the MACsec
core implementation.
Signed-off-by: Antoine Tenart <atenart@...nel.org>
---
.../mellanox/mlx5/core/en_accel/macsec.c | 36 -------------------
1 file changed, 36 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
index ea362072a984..c33e9ffe8b57 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
@@ -321,9 +321,6 @@ static int mlx5e_macsec_add_txsa(struct macsec_context *ctx)
struct mlx5e_macsec *macsec;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -393,9 +390,6 @@ static int mlx5e_macsec_upd_txsa(struct macsec_context *ctx)
struct net_device *netdev;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -456,9 +450,6 @@ static int mlx5e_macsec_del_txsa(struct macsec_context *ctx)
struct mlx5e_macsec *macsec;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
macsec_device = mlx5e_macsec_get_macsec_device_context(macsec, ctx);
@@ -511,9 +502,6 @@ static int mlx5e_macsec_add_rxsc(struct macsec_context *ctx)
struct mlx5e_macsec *macsec;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
macsec_device = mlx5e_macsec_get_macsec_device_context(macsec, ctx);
@@ -591,9 +579,6 @@ static int mlx5e_macsec_upd_rxsc(struct macsec_context *ctx)
int i;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -642,9 +627,6 @@ static int mlx5e_macsec_del_rxsc(struct macsec_context *ctx)
int err = 0;
int i;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -710,9 +692,6 @@ static int mlx5e_macsec_add_rxsa(struct macsec_context *ctx)
struct list_head *list;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -794,9 +773,6 @@ static int mlx5e_macsec_upd_rxsa(struct macsec_context *ctx)
struct list_head *list;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -853,9 +829,6 @@ static int mlx5e_macsec_del_rxsa(struct macsec_context *ctx)
struct list_head *list;
int err = 0;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
@@ -905,9 +878,6 @@ static int mlx5e_macsec_add_secy(struct macsec_context *ctx)
struct mlx5e_macsec *macsec;
int err = 0;
- if (ctx->prepare)
- return 0;
-
if (!mlx5e_macsec_secy_features_validate(ctx))
return -EINVAL;
@@ -1008,9 +978,6 @@ static int mlx5e_macsec_upd_secy(struct macsec_context *ctx)
struct mlx5e_macsec *macsec;
int i, err = 0;
- if (ctx->prepare)
- return 0;
-
if (!mlx5e_macsec_secy_features_validate(ctx))
return -EINVAL;
@@ -1069,9 +1036,6 @@ static int mlx5e_macsec_del_secy(struct macsec_context *ctx)
int err = 0;
int i;
- if (ctx->prepare)
- return 0;
-
mutex_lock(&priv->macsec->lock);
macsec = priv->macsec;
macsec_device = mlx5e_macsec_get_macsec_device_context(macsec, ctx);
--
2.37.3
Powered by blists - more mailing lists