From a36206a6bb2982a260f4299b257b1ad5d0c9da12 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Nov 2023 09:51:28 +0000 Subject: [PATCH] Revert "net/mlx5e: macsec: use update_pn flag instead of PN comparation" This reverts commit 89be6ad344f7632554aa444e1798a763281ea5e6 which is commit fde2f2d7f23d39f2fc699ba6d91ac3f4a2e637ca upstream. It breaks the Android ABI so revert it for now, if it is needed in the future, it can be brought back in an ABI-safe way. Bug: 161946584 Change-Id: Icb4a02c431ae7caeb4669c205d016e991b7d935a Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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 a7832a0180ee..0f8f3ce35537 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c @@ -611,7 +611,7 @@ static int mlx5e_macsec_upd_txsa(struct macsec_context *ctx) goto out; } - if (ctx->sa.update_pn) { + if (tx_sa->next_pn != ctx_tx_sa->next_pn_halves.lower) { netdev_err(netdev, "MACsec offload: update TX sa %d PN isn't supported\n", assoc_num); err = -EINVAL; @@ -1016,7 +1016,7 @@ static int mlx5e_macsec_upd_rxsa(struct macsec_context *ctx) goto out; } - if (ctx->sa.update_pn) { + if (rx_sa->next_pn != ctx_rx_sa->next_pn_halves.lower) { netdev_err(ctx->netdev, "MACsec offload update RX sa %d PN isn't supported\n", assoc_num);