diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-05-29 17:35:31 +0530 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-05-29 17:35:31 +0530 |
commit | e67fc860fba84e8684e36dfe0aa4a8def1e6cd1a (patch) | |
tree | 0a312475da2e48156f9b531bde86edba8680955c | |
parent | c6f4ce6dd3af29c7d78f9c2d109fb592e27b1b3e (diff) | |
download | compat-wireless-2.6-old-e67fc860fba84e8684e36dfe0aa4a8def1e6cd1a.tar.gz |
Add port for __netif_subqueue_stopped()
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | compat/compat.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/compat/compat.h b/compat/compat.h index 30a4cd5..ab73c30 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -145,6 +145,27 @@ static inline void pci_clear_mwi(struct pci_dev *dev) /* Compat work for 2.6.21, 2.6.22 and 2.6.23 */ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) +/* Added as of 2.6.24 in include/linux/netdevice.h */ + +/** + * netif_subqueue_stopped - test status of subqueue + * @dev: network device + * @queue_index: sub queue index + * + * Check individual transmit queue of a device with multiple transmit queues. + */ +static inline int __netif_subqueue_stopped(const struct net_device *dev, + u16 queue_index) +{ +#ifdef CONFIG_NETDEVICES_MULTIQUEUE + return test_bit(__LINK_STATE_XOFF, + &dev->egress_subqueue[queue_index].state); +#else + return 0; +#endif +} + + /* Added as of 2.6.24 in include/linux/skbuff.h. * * Although 2.6.23 does support for CONFIG_NETDEVICES_MULTIQUEUE |