#include <linux/compat.h>
#include <linux/autoconf.h>
+#ifndef CONFIG_COMPAT_RHEL_6_4
+
#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
/**
#endif /* CONFIG_PCMCIA */
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
+
#endif /* CONFIG_PCCARD */
}
EXPORT_SYMBOL_GPL(compat_hex_to_bin);
+#ifndef CONFIG_COMPAT_RHEL_6_4
/**
* noop_llseek - No Operation Performed llseek implementation
* @file: file structure to seek on
return file->f_pos;
}
EXPORT_SYMBOL_GPL(noop_llseek);
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
* Compatibility file for Linux wireless for kernels 3.0.
*/
+#ifndef CONFIG_COMPAT_RHEL_6_4
+
#include <linux/compat.h>
#include <linux/if_ether.h>
kstrto_from_user(kstrtos16_from_user, kstrtos16, s16);
kstrto_from_user(kstrtou8_from_user, kstrtou8, u8);
kstrto_from_user(kstrtos8_from_user, kstrtos8, s8);
+
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
* Compatibility file for Linux wireless for kernels 3.4.
*/
+#ifndef CONFIG_COMPAT_RHEL_6_4
+
#include <linux/fs.h>
#include <linux/module.h>
return 0;
}
EXPORT_SYMBOL_GPL(simple_open);
+
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
*
* Compatibility file for Linux wireless for kernels 3.4.
*/
+#ifndef CONFIG_COMPAT_RHEL_6_4
#include <linux/pkt_sched.h>
#define ECN_OR_COST(class) TC_PRIO_##class
ECN_OR_COST(INTERACTIVE_BULK)
};
EXPORT_SYMBOL(ip_tos2prio);
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#include <linux/module.h>
#include <linux/types.h>
+#ifndef CONFIG_COMPAT_RHEL_6_4
+
static inline char _tolower(const char c)
{
return c | 0x20;
return 0;
}
EXPORT_SYMBOL_GPL(kstrtos8);
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
+
#endif /* #ifndef strict_strtol */
static inline int usb_disable_autosuspend(struct usb_device *udev)
{ return 0; }
+#ifndef CONFIG_COMPAT_RHEL_6_4
#define rcu_dereference_protected(p, c) (p)
#define rcu_access_pointer(p) ACCESS_ONCE(p)
-
#define rcu_dereference_raw(p) rcu_dereference(p)
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
#include <linux/pm_qos_params.h>
#include <linux/smp_lock.h>
+#ifndef CONFIG_COMPAT_RHEL_6_4
#define kparam_block_sysfs_write(a)
#define kparam_unblock_sysfs_write(a)
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
/* mask va_format as RHEL6 backports this */
#define va_format compat_va_format
extern void compat_usb_scuttle_anchored_urbs(struct usb_anchor *anchor);
#endif
+#ifndef CONFIG_COMPAT_RHEL_6_4
/**
* pcmcia_read_config_byte() - read a byte from a card configuration register
*
conf_reg_t reg = { 0, CS_WRITE, where, val };
return pcmcia_access_configuration_register(p_dev, ®);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
struct pm_qos_request_list {
u32 qos;
return false;
}
+#ifndef CONFIG_COMPAT_RHEL_6_4
static inline void skb_tx_timestamp(struct sk_buff *skb)
{
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
/*
* System-wide workqueues which are always present.
#define VLAN_N_VID 4096
+#ifndef CONFIG_COMPAT_RHEL_6_4
/*
* netif_set_real_num_rx_queues - set actual number of RX queues used
* @dev: Network device
{
return 0;
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
extern struct kobj_ns_type_operations net_ns_type_operations;
#endif
}
+#ifndef CONFIG_COMPAT_RHEL_6_4
#define pcmcia_enable_device(link) pcmcia_request_configuration(link, &link->conf)
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#include <net/genetlink.h>
extern void *vzalloc(unsigned long size);
+#ifndef CONFIG_COMPAT_RHEL_6_4
#define rtnl_dereference(p) \
rcu_dereference_protected(p, lockdep_rtnl_is_held())
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
/**
* RCU_INIT_POINTER() - initialize an RCU protected pointer
}
#define pr_warn pr_warning
+
+#ifndef CONFIG_COMPAT_RHEL_6_4
#define create_freezable_workqueue create_freezeable_workqueue
static inline int skb_checksum_start_offset(const struct sk_buff *skb)
{
return skb->csum_start - skb_headroom(skb);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
/* from include/linux/printk.h */
#define pr_emerg_once(fmt, ...) \
{
return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
}
+
+#ifndef CONFIG_COMPAT_RHEL_6_4
static inline int irq_set_irq_wake(unsigned int irq, unsigned int on)
{
return set_irq_wake(irq, on);
{
return set_irq_type(irq, type);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
+
static inline int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry)
{
return set_irq_msi(irq, entry);
}
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) */
+#ifndef CONFIG_COMPAT_RHEL_6_4
/*
* kstrto* was included in kernel 2.6.38.4 and causes conflicts with the
* version included in compat-wireless. We use strict_strtol to check if
{
__clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
int mac_pton(const char *s, u8 *mac);
+#ifndef CONFIG_COMPAT_RHEL_6_4
int __must_check kstrtoull_from_user(const char __user *s, size_t count, unsigned int base, unsigned long long *res);
int __must_check kstrtoll_from_user(const char __user *s, size_t count, unsigned int base, long long *res);
int __must_check kstrtoul_from_user(const char __user *s, size_t count, unsigned int base, unsigned long *res);
} \
call_rcu(&(data)->rcuhead, __kfree_rcu_fn); \
} while (0)
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#ifdef MODULE
#endif
+#ifndef CONFIG_COMPAT_RHEL_6_4
/*
* enum ethtool_phys_id_state - indicator state for physical identification
* @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated
ETHTOOL_ID_ON,
ETHTOOL_ID_OFF
};
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)) */
module_driver(__platform_driver, platform_driver_register, \
platform_driver_unregister)
+#ifndef CONFIG_COMPAT_RHEL_6_4
static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag)
{
memset(ret, 0, size);
return ret;
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
extern int __netdev_printk(const char *level, const struct net_device *dev,
struct va_format *vaf);
extern struct sk_buff *__pskb_copy(struct sk_buff *skb,
int headroom, gfp_t gfp_mask);
+#ifndef CONFIG_COMPAT_RHEL_6_4
static inline void skb_complete_wifi_ack(struct sk_buff *skb, bool acked)
{
WARN_ON(1);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
+
#define NL80211_FEATURE_SK_TX_STATUS 0
typedef u32 netdev_features_t;
#define NET_ADDR_RANDOM 1 /* address is generated randomly */
#define NET_ADDR_STOLEN 2 /* address is stolen from other device */
+#ifndef CONFIG_COMPAT_RHEL_6_4
static inline void eth_hw_addr_random(struct net_device *dev)
{
random_ether_addr(dev->dev_addr);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#else /* 2.6.36 and on */
static inline void eth_hw_addr_random(struct net_device *dev)
*
*/
+#ifndef CONFIG_COMPAT_RHEL_6_4
static inline int fault_in_multipages_writeable(char __user *uaddr, int size)
{
int ret = 0;
return ret;
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
/* switcheroo is available on >= 2.6.34 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
#define tty_lock(__tty) tty_lock()
#define tty_unlock(__tty) tty_unlock()
+#ifndef CONFIG_COMPAT_RHEL_6_4
/* Backport ether_addr_equal */
static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
{
return !compare_ether_addr(addr1, addr2);
}
+#endif /* CONFIG_COMPAT_RHEL_6_4 */
#define net_ratelimited_function(function, ...) \
do { \