File openSUSE-Leap-42.3-ndo.patch of Package ethercat
diff -r 6cc95eefc0cf devices/8139too-4.4-ethercat.c
--- a/devices/8139too-4.4-ethercat.c Tue Oct 23 15:06:54 2018 +0200
+++ b/devices/8139too-4.4-ethercat.c Tue Oct 23 15:09:57 2018 +0200
@@ -705,7 +705,7 @@
static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance);
static int rtl8139_close (struct net_device *dev);
static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd);
-static struct rtnl_link_stats64 *rtl8139_get_stats64(struct net_device *dev,
+static void rtl8139_get_stats64(struct net_device *dev,
struct rtnl_link_stats64
*stats);
static void rtl8139_set_rx_mode (struct net_device *dev);
@@ -2677,7 +2677,7 @@
}
-static struct rtnl_link_stats64 *
+static void
rtl8139_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
struct rtl8139_private *tp = netdev_priv(dev);
@@ -2705,8 +2705,6 @@
stats->tx_packets = tp->tx_stats.packets;
stats->tx_bytes = tp->tx_stats.bytes;
} while (u64_stats_fetch_retry_irq(&tp->tx_stats.syncp, start));
-
- return stats;
}
/* Set or clear the multicast filter for this adaptor.
diff -r 6cc95eefc0cf devices/ccat/netdev.c
--- a/devices/ccat/netdev.c Tue Oct 23 15:06:54 2018 +0200
+++ b/devices/ccat/netdev.c Tue Oct 23 15:09:57 2018 +0200
@@ -794,12 +794,7 @@
return HRTIMER_RESTART;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
-static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64
- *storage)
-#else
static void ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage)
-#endif
{
struct ccat_eth_priv *const priv = netdev_priv(dev);
struct ccat_mac_register mac;
@@ -834,9 +829,6 @@
/* for cslip etc */
//TODO __u64 rx_compressed;
//TODO __u64 tx_compressed;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
- return storage;
-#endif
}
static int ccat_eth_open(struct net_device *dev)
diff -r 6cc95eefc0cf devices/igb/igb_main-4.4-ethercat.c
--- a/devices/igb/igb_main-4.4-ethercat.c Tue Oct 23 15:06:54 2018 +0200
+++ b/devices/igb/igb_main-4.4-ethercat.c Tue Oct 23 15:09:57 2018 +0200
@@ -138,7 +138,7 @@
static void igb_watchdog(unsigned long);
static void igb_watchdog_task(struct work_struct *);
static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *);
-static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *dev,
+static void igb_get_stats64(struct net_device *dev,
struct rtnl_link_stats64 *stats);
static int igb_change_mtu(struct net_device *, int);
static int igb_set_mac(struct net_device *, void *);
@@ -170,7 +170,7 @@
static void igb_restore_vf_multicasts(struct igb_adapter *adapter);
static int igb_ndo_set_vf_mac(struct net_device *netdev, int vf, u8 *mac);
static int igb_ndo_set_vf_vlan(struct net_device *netdev,
- int vf, u16 vlan, u8 qos);
+ int vf, u16 vlan, u8 qos, __be16 vlan_proto);
static int igb_ndo_set_vf_bw(struct net_device *, int, int, int);
static int igb_ndo_set_vf_spoofchk(struct net_device *netdev, int vf,
bool setting);
@@ -382,9 +382,9 @@
/* Print netdevice Info */
if (netdev) {
dev_info(&adapter->pdev->dev, "Net device Info\n");
- pr_info("Device Name state trans_start last_rx\n");
- pr_info("%-15s %016lX %016lX %016lX\n", netdev->name,
- netdev->state, netdev->trans_start, netdev->last_rx);
+ pr_info("Device Name state trans_start\n");
+ pr_info("%-15s %016lX %016lX\n", netdev->name,
+ netdev->state, dev_trans_start(netdev));
}
/* Print Registers */
@@ -5260,7 +5260,7 @@
* @netdev: network interface device structure
* @stats: rtnl_link_stats64 pointer
**/
-static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *netdev,
+static void igb_get_stats64(struct net_device *netdev,
struct rtnl_link_stats64 *stats)
{
struct igb_adapter *adapter = netdev_priv(netdev);
@@ -5269,8 +5269,6 @@
igb_update_stats(adapter, &adapter->stats64);
memcpy(stats, &adapter->stats64, sizeof(*stats));
spin_unlock(&adapter->stats64_lock);
-
- return stats;
}
/**
@@ -6042,11 +6040,14 @@
}
static int igb_ndo_set_vf_vlan(struct net_device *netdev,
- int vf, u16 vlan, u8 qos)
+ int vf, u16 vlan, u8 qos, __be16 vlan_proto)
{
int err = 0;
struct igb_adapter *adapter = netdev_priv(netdev);
+ if (vlan_proto != htons(ETH_P_8021Q))
+ return -EPROTONOSUPPORT;
+
if ((vf >= adapter->vfs_allocated_count) || (vlan > 4095) || (qos > 7))
return -EINVAL;
if (vlan || qos) {
@@ -6162,7 +6163,8 @@
if (adapter->vf_data[vf].pf_vlan)
igb_ndo_set_vf_vlan(adapter->netdev, vf,
adapter->vf_data[vf].pf_vlan,
- adapter->vf_data[vf].pf_qos);
+ adapter->vf_data[vf].pf_qos,
+ htons(ETH_P_8021Q));
else
igb_clear_vf_vfta(adapter, vf);
diff -r 6cc95eefc0cf devices/r8169-4.4-ethercat.c
--- a/devices/r8169-4.4-ethercat.c Tue Oct 23 15:06:54 2018 +0200
+++ b/devices/r8169-4.4-ethercat.c Tue Oct 23 15:09:57 2018 +0200
@@ -7817,7 +7817,7 @@
goto out;
}
-static struct rtnl_link_stats64 *
+static void
rtl8169_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
struct rtl8169_private *tp = netdev_priv(dev);
@@ -7865,8 +7865,6 @@
le32_to_cpu(tp->tc_offset.tx_multi_collision);
stats->tx_aborted_errors = le16_to_cpu(counters->tx_aborted) -
le16_to_cpu(tp->tc_offset.tx_aborted);
-
- return stats;
}
static void rtl8169_net_suspend(struct net_device *dev)