slicoss.c (a402eae64d0ad12b1c4a411f250d6c161e67f623) slicoss.c (bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221)
1/*
2 * Driver for Gigabit Ethernet adapters based on the Session Layer
3 * Interface (SLIC) technology by Alacritech. The driver does not
4 * support the hardware acceleration features provided by these cards.
5 *
6 * Copyright (C) 2016 Lino Sanfilippo <LinoSanfilippo@gmx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 1457 unchanged lines hidden (view full) ---

1466
1467 return NETDEV_TX_OK;
1468drop_skb:
1469 dev_kfree_skb_any(skb);
1470
1471 return NETDEV_TX_OK;
1472}
1473
1/*
2 * Driver for Gigabit Ethernet adapters based on the Session Layer
3 * Interface (SLIC) technology by Alacritech. The driver does not
4 * support the hardware acceleration features provided by these cards.
5 *
6 * Copyright (C) 2016 Lino Sanfilippo <LinoSanfilippo@gmx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 1457 unchanged lines hidden (view full) ---

1466
1467 return NETDEV_TX_OK;
1468drop_skb:
1469 dev_kfree_skb_any(skb);
1470
1471 return NETDEV_TX_OK;
1472}
1473
1474static struct rtnl_link_stats64 *slic_get_stats(struct net_device *dev,
1475 struct rtnl_link_stats64 *lst)
1474static void slic_get_stats(struct net_device *dev,
1475 struct rtnl_link_stats64 *lst)
1476{
1477 struct slic_device *sdev = netdev_priv(dev);
1478 struct slic_stats *stats = &sdev->stats;
1479
1480 SLIC_GET_STATS_COUNTER(lst->rx_packets, stats, rx_packets);
1481 SLIC_GET_STATS_COUNTER(lst->tx_packets, stats, tx_packets);
1482 SLIC_GET_STATS_COUNTER(lst->rx_bytes, stats, rx_bytes);
1483 SLIC_GET_STATS_COUNTER(lst->tx_bytes, stats, tx_bytes);
1484 SLIC_GET_STATS_COUNTER(lst->rx_errors, stats, rx_errors);
1485 SLIC_GET_STATS_COUNTER(lst->rx_dropped, stats, rx_buff_miss);
1486 SLIC_GET_STATS_COUNTER(lst->tx_dropped, stats, tx_dropped);
1487 SLIC_GET_STATS_COUNTER(lst->multicast, stats, rx_mcasts);
1488 SLIC_GET_STATS_COUNTER(lst->rx_over_errors, stats, rx_buffoflow);
1489 SLIC_GET_STATS_COUNTER(lst->rx_crc_errors, stats, rx_crc);
1490 SLIC_GET_STATS_COUNTER(lst->rx_fifo_errors, stats, rx_oflow802);
1491 SLIC_GET_STATS_COUNTER(lst->tx_carrier_errors, stats, tx_carrier);
1476{
1477 struct slic_device *sdev = netdev_priv(dev);
1478 struct slic_stats *stats = &sdev->stats;
1479
1480 SLIC_GET_STATS_COUNTER(lst->rx_packets, stats, rx_packets);
1481 SLIC_GET_STATS_COUNTER(lst->tx_packets, stats, tx_packets);
1482 SLIC_GET_STATS_COUNTER(lst->rx_bytes, stats, rx_bytes);
1483 SLIC_GET_STATS_COUNTER(lst->tx_bytes, stats, tx_bytes);
1484 SLIC_GET_STATS_COUNTER(lst->rx_errors, stats, rx_errors);
1485 SLIC_GET_STATS_COUNTER(lst->rx_dropped, stats, rx_buff_miss);
1486 SLIC_GET_STATS_COUNTER(lst->tx_dropped, stats, tx_dropped);
1487 SLIC_GET_STATS_COUNTER(lst->multicast, stats, rx_mcasts);
1488 SLIC_GET_STATS_COUNTER(lst->rx_over_errors, stats, rx_buffoflow);
1489 SLIC_GET_STATS_COUNTER(lst->rx_crc_errors, stats, rx_crc);
1490 SLIC_GET_STATS_COUNTER(lst->rx_fifo_errors, stats, rx_oflow802);
1491 SLIC_GET_STATS_COUNTER(lst->tx_carrier_errors, stats, tx_carrier);
1492
1493 return lst;
1494}
1495
1496static int slic_get_sset_count(struct net_device *dev, int sset)
1497{
1498 switch (sset) {
1499 case ETH_SS_STATS:
1500 return ARRAY_SIZE(slic_stats_strings);
1501 default:

--- 369 unchanged lines hidden ---
1492}
1493
1494static int slic_get_sset_count(struct net_device *dev, int sset)
1495{
1496 switch (sset) {
1497 case ETH_SS_STATS:
1498 return ARRAY_SIZE(slic_stats_strings);
1499 default:

--- 369 unchanged lines hidden ---