aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/macsec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/macsec.c')
-rw-r--r--drivers/net/macsec.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 617f850bdb3a..8193ab39206f 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -1663,22 +1663,8 @@ static int macsec_offload(int (* const func)(struct macsec_context *),
if (ctx->offload == MACSEC_OFFLOAD_PHY)
mutex_lock(&ctx->phydev->lock);
- /* Phase I: prepare. The drive should fail here if there are going to be
- * issues in the commit phase.
- */
- ctx->prepare = true;
- ret = (*func)(ctx);
- if (ret)
- goto phy_unlock;
-
- /* Phase II: commit. This step cannot fail. */
- ctx->prepare = false;
ret = (*func)(ctx);
- /* This should never happen: commit is not allowed to fail */
- if (unlikely(ret))
- WARN(1, "MACsec offloading commit failed (%d)\n", ret);
-phy_unlock:
if (ctx->offload == MACSEC_OFFLOAD_PHY)
mutex_unlock(&ctx->phydev->lock);