diff options
-rw-r--r-- | drivers/net/macsec.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 617f850bdb3a..160976929dfe 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -1663,22 +1663,9 @@ 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); |