summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
diff options
context:
space:
mode:
authorDaode Huang <huangdaode@hisilicon.com>2016-06-21 11:56:33 +0800
committerDavid S. Miller <davem@davemloft.net>2016-06-21 04:51:55 -0400
commitad59a17f0a8ea31e6235e77fb4dda3cd22978914 (patch)
treeb304ab8fe8dd6bd4d02f1fbe6e891344463f0de7 /drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
parentf56c1b3de7a2c7435e991a01350b0b32664ba5fb (diff)
downloadlinux-ad59a17f0a8ea31e6235e77fb4dda3cd22978914.tar.bz2
net: hns: add get_coalesce_range api for hns
This patch adds get_coalesce_range api for hns, it shows range of coalesce usecs and frames that can be set on this interface. Signed-off-by: Daode Huang <huangdaode@hisilicon.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_ethtool.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_ethtool.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 564ae1ec6aa8..a395ca1405c3 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -751,6 +751,16 @@ static int hns_get_coalesce(struct net_device *net_dev,
&ec->tx_max_coalesced_frames,
&ec->rx_max_coalesced_frames);
+ ops->get_coalesce_range(priv->ae_handle,
+ &ec->tx_max_coalesced_frames_low,
+ &ec->rx_max_coalesced_frames_low,
+ &ec->tx_max_coalesced_frames_high,
+ &ec->rx_max_coalesced_frames_high,
+ &ec->tx_coalesce_usecs_low,
+ &ec->rx_coalesce_usecs_low,
+ &ec->tx_coalesce_usecs_high,
+ &ec->rx_coalesce_usecs_high);
+
return 0;
}