From cecc9870f7b87c0eca3e1c682f6ba1cfefa5b816 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Sun, 5 Aug 2012 21:19:52 +0300 Subject: [PATCH] compat: Add netdev_tx_reset_queue and NETIF_F_LOOPBACK Required by mlx4_en Signed-off-by: Vladimir Sokolovsky --- include/linux/compat-3.3.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/compat-3.3.h b/include/linux/compat-3.3.h index 45a078a..0c8fd08 100644 --- a/include/linux/compat-3.3.h +++ b/include/linux/compat-3.3.h @@ -82,6 +82,16 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue, { } +static inline void netdev_tx_reset_queue(struct netdev_queue *q) +{ +#ifdef CONFIG_BQL + clear_bit(__QUEUE_STATE_STACK_XOFF, &q->state); + dql_reset(&q->dql); +#endif +} + +#define NETIF_F_LOOPBACK (1 << 31) /* Enable loopback */ + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */ #endif /* LINUX_3_3_COMPAT_H */ -- 2.41.0