Merge branch 'stable/for-linus-5.11' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx4 / mlx4_en.h
index 30378e4..17f2b19 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <linux/bitops.h>
 #include <linux/compiler.h>
+#include <linux/ethtool.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/netdevice.h>
 #define MLX4_EN_LOOPBACK_RETRIES       5
 #define MLX4_EN_LOOPBACK_TIMEOUT       100
 
-#ifdef MLX4_EN_PERF_STAT
-/* Number of samples to 'average' */
-#define AVG_SIZE                       128
-#define AVG_FACTOR                     1024
-
-#define INC_PERF_COUNTER(cnt)          (++(cnt))
-#define ADD_PERF_COUNTER(cnt, add)     ((cnt) += (add))
-#define AVG_PERF_COUNTER(cnt, sample) \
-       ((cnt) = ((cnt) * (AVG_SIZE - 1) + (sample) * AVG_FACTOR) / AVG_SIZE)
-#define GET_PERF_COUNTER(cnt)          (cnt)
-#define GET_AVG_PERF_COUNTER(cnt)      ((cnt) / AVG_FACTOR)
-
-#else
-
-#define INC_PERF_COUNTER(cnt)          do {} while (0)
-#define ADD_PERF_COUNTER(cnt, add)     do {} while (0)
-#define AVG_PERF_COUNTER(cnt, sample)  do {} while (0)
-#define GET_PERF_COUNTER(cnt)          (0)
-#define GET_AVG_PERF_COUNTER(cnt)      (0)
-#endif /* MLX4_EN_PERF_STAT */
-
 /* Constants for TX flow */
 enum {
        MAX_INLINE = 104, /* 128 - 16 - 4 - 4 */
@@ -608,7 +588,6 @@ struct mlx4_en_priv {
        struct work_struct linkstate_task;
        struct delayed_work stats_task;
        struct delayed_work service_task;
-       struct mlx4_en_perf_stats pstats;
        struct mlx4_en_pkt_stats pkstats;
        struct mlx4_en_counter_stats pf_stats;
        struct mlx4_en_flow_stats_rx rx_priority_flowstats[MLX4_NUM_PRIORITIES];