net: phy: mscc: macsec: reject PN update requests
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Thu, 5 Oct 2023 18:06:35 +0000 (21:06 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Oct 2023 08:30:31 +0000 (10:30 +0200)
commite0a8c918daa58700609ebd45e3fcd49965be8bbc
tree147947adb99a56608f160ef487b828cac7a4a0e2
parent4dcf38ae3ca16b8872f151d46ba5ac28dd580b60
net: phy: mscc: macsec: reject PN update requests

Updating the PN is not supported.
Return -EINVAL if update_pn is true.

The following command succeeded, but it should fail because the driver
does not update the PN:
ip macsec set macsec0 tx sa 0 pn 232 on

Fixes: 28c5107aa904 ("net: phy: mscc: macsec support")
Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/mscc/mscc_macsec.c