Skip to content

Commit

Permalink
net/mlx5e: macsec: remove checks on the prepare phase
Browse files Browse the repository at this point in the history
Remove checks on the prepare phase as it is now unused by the MACsec
core implementation.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Antoine Tenart authored and Jakub Kicinski committed Sep 23, 2022
1 parent 27418b5 commit 36c2ebc
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,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;
Expand Down Expand Up @@ -595,9 +592,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;
Expand Down Expand Up @@ -658,9 +652,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);
Expand Down Expand Up @@ -713,9 +704,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);
Expand Down Expand Up @@ -793,9 +781,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;
Expand Down Expand Up @@ -844,9 +829,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;
Expand Down Expand Up @@ -912,9 +894,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;
Expand Down Expand Up @@ -999,9 +978,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;
Expand Down Expand Up @@ -1058,9 +1034,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;
Expand Down Expand Up @@ -1110,9 +1083,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;

Expand Down Expand Up @@ -1213,9 +1183,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;

Expand Down Expand Up @@ -1274,9 +1241,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);
Expand Down

0 comments on commit 36c2ebc

Please sign in to comment.