#ifndef __JME_H_INCLUDED__
#define __JME_H_INCLUDED__
+#include <linux/interrupt.h>
#define DRV_NAME "jme"
-#define DRV_VERSION "1.0.8-jmmod"
+#define DRV_VERSION "1.0.8.2-jmmod"
#define PFX DRV_NAME ": "
#define PCI_DEVICE_ID_JMICRON_JMC250 0x0250
NETIF_MSG_TX_ERR | \
NETIF_MSG_HW)
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
+#ifndef pr_err
#define pr_err(fmt, arg...) \
printk(KERN_ERR fmt, ##arg)
#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,33)
+#ifndef netdev_err
#define netdev_err(netdev, fmt, arg...) \
pr_err(fmt, ##arg)
#endif
#define msg_hw(priv, fmt, args...) \
jme_msg(KERN_ERR, hw, priv, fmt, ## args)
+#ifndef netif_info
#define netif_info(priv, type, dev, fmt, args...) \
msg_ ## type(priv, fmt, ## args)
+#endif
+#ifndef netif_err
#define netif_err(priv, type, dev, fmt, args...) \
msg_ ## type(priv, fmt, ## args)
#endif
+#endif
#ifndef NETIF_F_TSO6
#define NETIF_F_TSO6 0
#define NETIF_F_IPV6_CSUM 0
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
+#define __USE_NDO_FIX_FEATURES__
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+#define __UNIFY_VLAN_RX_PATH__
+#endif
+
/*
* Extra PCI Configuration space interface
*/
#define JME_NEW_PM_API
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,26)
+static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
+{
+ return ep->speed;
+}
+#endif
+
/*
* Jmac Adapter Private data
*/
u32 msg_enable;
struct ethtool_cmd old_ecmd;
unsigned int old_mtu;
+#ifndef __UNIFY_VLAN_RX_PATH__
struct vlan_group *vlgrp;
+#endif
struct dynpcc_info dpi;
atomic_t intr_sem;
atomic_t link_changing;
atomic_t rx_cleaning;
atomic_t rx_empty;
int (*jme_rx)(struct sk_buff *skb);
+#ifndef __UNIFY_VLAN_RX_PATH__
int (*jme_vlan_rx)(struct sk_buff *skb,
struct vlan_group *grp,
unsigned short vlan_tag);
+#endif
DECLARE_NAPI_STRUCT
DECLARE_NET_DEVICE_STATS
};
enum jme_flags_bits {
JME_FLAG_MSI = 1,
JME_FLAG_SSET = 2,
+#ifndef __USE_NDO_FIX_FEATURES__
JME_FLAG_TXCSUM = 3,
JME_FLAG_TSO = 4,
+#endif
JME_FLAG_POLL = 5,
JME_FLAG_SHUTDOWN = 6,
};