mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
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@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
27418b55f0
commit
36c2ebced3
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user