]> bbs.cooldavid.org Git - jme.git/blobdiff - jme.h
Fix version.h include order
[jme.git] / jme.h
diff --git a/jme.h b/jme.h
index 7d7d5fc40142dd7a35b2375d66f264fb8c7e893f..ee0177d56fc7be4a764aa298bd43becfd6585c09 100644 (file)
--- a/jme.h
+++ b/jme.h
@@ -25,7 +25,7 @@
 #define __JME_H_INCLUDED__
 
 #define DRV_NAME       "jme"
-#define DRV_VERSION    "1.0.6-jmmod"
+#define DRV_VERSION    "1.0.6.1-jmmod"
 #define PFX            DRV_NAME ": "
 
 #define PCI_DEVICE_ID_JMICRON_JMC250   0x0250
@@ -55,7 +55,6 @@ do {                                                                  \
 } while (0)
 #endif
 
-#include <linux/version.h>
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,33)
 #define jme_msg(msglvl, type, priv, fmt, args...) \
        if (netif_msg_##type(priv)) \
@@ -411,6 +410,23 @@ struct jme_ring {
 #define NETDEV_GET_STATS(netdev, fun_ptr) \
        netdev->get_stats = fun_ptr
 #define DECLARE_NET_DEVICE_STATS struct net_device_stats stats;
+/*
+ * CentOS 5.5 have *_hdr helpers back-ported
+ */
+#ifdef RHEL_RELEASE_CODE
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,5)
+#define __DEFINE_IPHDR_HELPERS__
+#endif
+#else
+#define __DEFINE_IPHDR_HELPERS__
+#endif
+#else
+#define NET_STAT(priv) (priv->dev->stats)
+#define NETDEV_GET_STATS(netdev, fun_ptr)
+#define DECLARE_NET_DEVICE_STATS
+#endif
+
+#ifdef __DEFINE_IPHDR_HELPERS__
 static inline struct iphdr *ip_hdr(const struct sk_buff *skb)
 {
        return skb->nh.iph;
@@ -425,10 +441,6 @@ static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
 {
        return skb->h.th;
 }
-#else
-#define NET_STAT(priv) (priv->dev->stats)
-#define NETDEV_GET_STATS(netdev, fun_ptr)
-#define DECLARE_NET_DEVICE_STATS
 #endif
 
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
@@ -481,7 +493,6 @@ struct jme_adapter {
        spinlock_t              phy_lock;
        spinlock_t              macaddr_lock;
        spinlock_t              rxmcs_lock;
-       spinlock_t              vlgrp_lock;
        struct tasklet_struct   rxempty_task;
        struct tasklet_struct   rxclean_task;
        struct tasklet_struct   txclean_task;
@@ -1307,3 +1318,4 @@ static int jme_set_settings(struct net_device *netdev,
 static void jme_set_multi(struct net_device *netdev);
 
 #endif
+