fix nasmesh kernel 4.15

This commit is contained in:
laurent
2018-09-07 15:44:57 +02:00
parent c8eb68d556
commit 7d22622474
6 changed files with 24 additions and 14 deletions
+3 -3
View File
@@ -241,7 +241,7 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
netif_stop_queue(dev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || RHEL_RELEASE_CODE>=1796
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE>=1796)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
@@ -306,7 +306,7 @@ void nas_tx_timeout(struct net_device *dev)
printk("TX_TIMEOUT: begin\n");
// (struct nas_priv *)(dev->priv)->stats.tx_errors++;
(priv->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || RHEL_RELEASE_CODE>=1796
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE>=1796)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
@@ -324,7 +324,7 @@ static const struct net_device_ops nasmesh_netdev_ops = {
.ndo_set_mac_address = NULL,
.ndo_set_config = nas_set_config,
.ndo_do_ioctl = nas_CTL_ioctl,
#if RHEL_RELEASE_CODE>=1797
#if (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE>=1797)
.extended.ndo_change_mtu = nas_change_mtu,
#else
.ndo_change_mtu = nas_change_mtu,