Skip to contentSkip to conversation

compat: add qdisc_all_tx_empty for Linux 2.6.26 and older

PATCH New Pavel Roskin 1 participant 1 message Mar 24, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat: add qdisc_all_tx_empty for Linux 2.6.26 and older

---
 include/linux/compat-2.6.27.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
include/linux/compat-2.6.27.h +8 -0
index a690e2c..e27115b 100644
@@ -18,6 +18,8 @@
 #include <net/iw_handler.h>
 #include <asm-generic/bug.h>
 #include <linux/wireless.h>
+#include <linux/skbuff.h>
+#include <net/sch_generic.h>
 
 #define PCI_PM_CAP_PME_SHIFT	11
 
@@ -49,6 +51,12 @@ static inline void netif_tx_stop_all_queues(struct net_device *dev)
 	netif_stop_queue(dev);
 }
 
+/* Are all TX queues of the device empty?  */
+static inline bool qdisc_all_tx_empty(const struct net_device *dev)
+{
+	return skb_queue_empty(&dev->qdisc->q);
+}
+
 bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
 
 /*