Merge tag 'gpio-updates-for-v5.13-v2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx5 / core / en / ptp.c
index 72e7dd6..d907c1a 100644 (file)
@@ -792,6 +792,9 @@ int mlx5e_ptp_rx_manage_fs(struct mlx5e_priv *priv, bool set)
        if (!priv->profile->rx_ptp_support)
                return 0;
 
+       if (!test_bit(MLX5E_STATE_OPENED, &priv->state))
+               return 0;
+
        if (set) {
                if (!c || !test_bit(MLX5E_PTP_STATE_RX, c->state)) {
                        netdev_WARN_ONCE(priv->netdev, "Don't try to add PTP RX-FS rules");