Currently offloading MACsec with authentication only (encrypt
property set to off) is not supported, block such requests
when adding/updating a macsec device.
Fixes: 8ff0ac5be144 ("net/mlx5: Add MACsec offload Tx command support")
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
                return false;
        }
 
+       if (!ctx->secy->tx_sc.encrypt) {
+               netdev_err(netdev, "MACsec offload: encrypt off isn't supported\n");
+               return false;
+       }
+
        return true;
 }