return j;
 }
 
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
 static void enetc_get_rx_tstamp(struct net_device *ndev,
                                union enetc_rx_bd *rxbd,
                                struct sk_buff *skb)
                shhwtstamps->hwtstamp = ns_to_ktime(tstamp);
        }
 }
-#endif
 
 static void enetc_get_offloads(struct enetc_bdr *rx_ring,
                               union enetc_rx_bd *rxbd, struct sk_buff *skb)
                __vlan_hwaccel_put_tag(skb, tpid, le16_to_cpu(rxbd->r.vlan_opt));
        }
 
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
-       if (priv->active_offloads & ENETC_F_RX_TSTAMP)
+       if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK) &&
+           (priv->active_offloads & ENETC_F_RX_TSTAMP))
                enetc_get_rx_tstamp(rx_ring->ndev, rxbd, skb);
-#endif
 }
 
 /* This gets called during the non-XDP NAPI poll cycle as well as on XDP_PASS,
 }
 EXPORT_SYMBOL_GPL(enetc_set_features);
 
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
 static int enetc_hwtstamp_set(struct net_device *ndev, struct ifreq *ifr)
 {
        struct enetc_ndev_priv *priv = netdev_priv(ndev);
        return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
               -EFAULT : 0;
 }
-#endif
 
 int enetc_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
 {
        struct enetc_ndev_priv *priv = netdev_priv(ndev);
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
-       if (cmd == SIOCSHWTSTAMP)
-               return enetc_hwtstamp_set(ndev, rq);
-       if (cmd == SIOCGHWTSTAMP)
-               return enetc_hwtstamp_get(ndev, rq);
-#endif
+
+       if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK)) {
+               if (cmd == SIOCSHWTSTAMP)
+                       return enetc_hwtstamp_set(ndev, rq);
+               if (cmd == SIOCGHWTSTAMP)
+                       return enetc_hwtstamp_get(ndev, rq);
+       }
 
        if (!priv->phylink)
                return -EOPNOTSUPP;
 
 {
        int hw_idx = i;
 
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
-       if (rx_ring->ext_en)
+       if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK) && rx_ring->ext_en)
                hw_idx = 2 * i;
-#endif
+
        return &(((union enetc_rx_bd *)rx_ring->bd_base)[hw_idx]);
 }
 
 
        new_rxbd++;
 
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
-       if (rx_ring->ext_en)
+       if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK) && rx_ring->ext_en)
                new_rxbd++;
-#endif
 
        if (unlikely(++new_index == rx_ring->bd_count)) {
                new_rxbd = rx_ring->bd_base;
 
                symbol_put(enetc_phc_index);
        }
 
-#ifdef CONFIG_FSL_ENETC_PTP_CLOCK
+       if (!IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK)) {
+               info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
+
+               return 0;
+       }
+
        info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
                                SOF_TIMESTAMPING_RX_HARDWARE |
                                SOF_TIMESTAMPING_RAW_HARDWARE |
        info->tx_types = (1 << HWTSTAMP_TX_OFF) |
                         (1 << HWTSTAMP_TX_ON) |
                         (1 << HWTSTAMP_TX_ONESTEP_SYNC);
+
        info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
                           (1 << HWTSTAMP_FILTER_ALL);
-#else
-       info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
-#endif
+
        return 0;
 }