Skip to content

Commit

Permalink
Merge pull request #17 from hcartiaux/master
Browse files Browse the repository at this point in the history
Import changes from linux 5.17 for compatibility (closes #16)
  • Loading branch information
hcartiaux authored Apr 1, 2022
2 parents d4f36d3 + 665b2bd commit 54b8e29
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -18481,17 +18481,31 @@ static int rtl8152_set_tunable(struct net_device *netdev,
}
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) */

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
static void rtl8152_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring)
#else
static void rtl8152_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
#endif
{
struct r8152 *tp = netdev_priv(netdev);

ring->rx_max_pending = RTL8152_RX_MAX_PENDING;
ring->rx_pending = tp->rx_pending;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
static int rtl8152_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring)
#else
static int rtl8152_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring,
struct kernel_ethtool_ringparam *kernel_ring,
struct netlink_ext_ack *extack)
#endif
{
struct r8152 *tp = netdev_priv(netdev);

Expand Down

0 comments on commit 54b8e29

Please sign in to comment.