Skip to content

Commit

Permalink
Import changes from linux 5.17 for compatibility
Browse files Browse the repository at this point in the history
kernel/git/torvalds/linux.git - 7462494408cd3de8b0bc1e79670bf213288501d0

ethtool: extend ringparam setting/getting API with rx_buf_len

Add two new parameters kernel_ringparam and extack for
.get_ringparam and .set_ringparam to extend more ring params
through netlink.
  • Loading branch information
hcartiaux committed Apr 1, 2022
1 parent d4f36d3 commit 665b2bd
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 665b2bd

Please sign in to comment.