]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: MACsec, fix update Rx secure channel active field
authorRaed Salem <raeds@nvidia.com>
Mon, 31 Oct 2022 06:22:04 +0000 (08:22 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 24 Nov 2022 08:03:22 +0000 (00:03 -0800)
commit2f66d7b2c57fef83dddd18f9db3ec83a9f4d21ff
tree9e83ba0e5426605ffe211ada7429ada6125d3cdc
parent660f36c89bbcef4dcb05848ac71069a595226171
net/mlx5e: MACsec, fix update Rx secure channel active field

The main functionality for this operation is to update the
active state of the Rx security channel (SC) if the new
active setting is different from the current active state
of this Rx SC, however the relevant active state check is
done post updating the current active state to match the
new active state, effectively blocks any offload state
update for the Rx SC in question.

Fix by delay the assignment to be post the relevant check.

Fixes: b995ba4f97bf ("net/mlx5e: Add MACsec offload Rx command support")
Signed-off-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Emeel Hakim <ehakim@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c