Message ID | 4fb4ec3c0ad5e48c82389b3c40bd045f3d9eaf76.1665416630.git.sd@queasysnail.net (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | macsec: offload-related fixes | expand |
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index cdee342e42cd..0ad6eba0a807 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -2572,7 +2572,7 @@ static bool macsec_is_configured(struct macsec_dev *macsec) struct macsec_tx_sc *tx_sc = &secy->tx_sc; int i; - if (secy->n_rx_sc > 0) + if (secy->rx_sc) return true; for (i = 0; i < MACSEC_NUM_AN; i++)
macsec_is_configured incorrectly uses secy->n_rx_sc to check if some RXSCs exist. secy->n_rx_sc only counts the number of active RXSCs, but there can also be inactive SCs as well, which may be stored in the driver (in case we're disabling offloading), or would have to be pushed to the device (in case we're trying to enable offloading). As long as RXSCs active on creation and never turned off, the issue is not visible. Fixes: dcb780fb2795 ("net: macsec: add nla support for changing the offloading selection") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> --- drivers/net/macsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)