@@ -314,9 +314,15 @@ static ssize_t firmware_loading_store(st
static DEVICE_ATTR(loading, 0644, firmware_loading_show, firmware_loading_store);
+#if !defined(RHEL_MAJOR) || (RHEL_MAJOR != 6)
static ssize_t firmware_data_read(struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buffer, loff_t offset, size_t count)
+#else
+static ssize_t firmware_data_read(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *bin_attr,
+ char *buffer, loff_t offset, size_t count)
+#endif
{
struct device *dev = to_dev(kobj);
struct firmware_priv *fw_priv = to_firmware_priv(dev);
@@ -407,9 +413,15 @@ static int fw_realloc_buffer(struct firm
* Data written to the 'data' attribute will be later handed to
* the driver as a firmware image.
**/
+#if !defined(RHEL_MAJOR) || (RHEL_MAJOR != 6)
static ssize_t firmware_data_write(struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buffer, loff_t offset, size_t count)
+#else
+static ssize_t firmware_data_write(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *bin_attr,
+ char *buffer, loff_t offset, size_t count)
+#endif
{
struct device *dev = to_dev(kobj);
struct firmware_priv *fw_priv = to_firmware_priv(dev);
@@ -47,7 +47,9 @@ static inline void compat_release_firmwa
}
#endif
+#if (!defined(RHEL_MAJOR) || (RHEL_MAJOR != 6))
#define KEY_RFKILL 247 /* Key that controls all radios */
+#endif
#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
/* source: include/linux/if.h */
@@ -55,6 +57,7 @@ static inline void compat_release_firmwa
/* this will never happen on older kernels */
#define NETDEV_POST_INIT 0xffff
+#if (!defined(RHEL_MAJOR) || (RHEL_MAJOR != 6))
static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
unsigned int length)
{
@@ -64,6 +67,7 @@ static inline struct sk_buff *netdev_all
skb_reserve(skb, NET_IP_ALIGN);
return skb;
}
+#endif
#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
@@ -19,12 +19,14 @@
/* netdev_printk helpers, similar to dev_printk */
+#if (!defined(RHEL_MAJOR) || (RHEL_MAJOR != 6))
static inline const char *netdev_name(const struct net_device *dev)
{
if (dev->reg_state != NETREG_REGISTERED)
return "(unregistered net_device)";
return dev->name;
}
+#endif
#define netdev_printk(level, netdev, format, args...) \
dev_printk(level, (netdev)->dev.parent, \