From patchwork Wed Mar 24 21:57:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 88074 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2OLvmYA024003 for ; Wed, 24 Mar 2010 21:57:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752486Ab0CXV5p (ORCPT ); Wed, 24 Mar 2010 17:57:45 -0400 Received: from c60.cesmail.net ([216.154.195.49]:33023 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019Ab0CXV5o (ORCPT ); Wed, 24 Mar 2010 17:57:44 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 24 Mar 2010 17:57:44 -0400 Received: from mj.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 899F534C6A; Wed, 24 Mar 2010 18:00:15 -0400 (EDT) Subject: [PATCH] compat: add qdisc_all_tx_empty for Linux 2.6.26 and older To: "Luis R. Rodriguez" , linux-wireless@vger.kernel.org From: Pavel Roskin Date: Wed, 24 Mar 2010 17:57:43 -0400 Message-ID: <20100324215743.24859.80517.stgit@mj.roinet.com> User-Agent: StGit/0.15-54-g6e68 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Mar 2010 21:57:48 +0000 (UTC) diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h index a690e2c..e27115b 100644 --- a/include/linux/compat-2.6.27.h +++ b/include/linux/compat-2.6.27.h @@ -18,6 +18,8 @@ #include #include #include +#include +#include #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); /*