net/mlx5e: Fix macsec ssci attribute handling in offload path
authorEmeel Hakim <ehakim@nvidia.com>
Wed, 14 Dec 2022 14:34:13 +0000 (16:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:30 +0000 (11:58 +0100)
commit9be4e25bdc1fb6bacde61e3e35e276c821a485a0
tree9d18d0a8eeb16d798971d01386b96b74e07a123d
parente02190787f1141935784c1015b964fa39370c686
net/mlx5e: Fix macsec ssci attribute handling in offload path

[ Upstream commit f5e1ed04aa2ea665a796f0109091ca3f2b01024a ]

Currently when macsec offload is set with extended packet number (epn)
enabled, the driver wrongly deduce the short secure channel identifier
(ssci) from the salt instead of the stand alone ssci attribute as it
should, consequently creating a mismatch between the kernel and driver's
ssci values.
Fix by using the ssci value from the relevant attribute.

Fixes: 4411a6c0abd3 ("net/mlx5e: Support MACsec offload extended packet number (EPN)")
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c