rxfh->indir, rxfh->key, rxfh->hfunc);
}
-static int hns_get_rxnfc(struct net_device *netdev,
- struct ethtool_rxnfc *cmd,
- u32 *rule_locs)
+static u32 hns_get_rx_ring_count(struct net_device *netdev)
{
struct hns_nic_priv *priv = netdev_priv(netdev);
- switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = priv->ae_handle->q_num;
- break;
- default:
- return -EOPNOTSUPP;
- }
-
- return 0;
+ return priv->ae_handle->q_num;
}
static const struct ethtool_ops hns_ethtool_ops = {
.get_rxfh_indir_size = hns_get_rss_indir_size,
.get_rxfh = hns_get_rss,
.set_rxfh = hns_set_rss,
- .get_rxnfc = hns_get_rxnfc,
+ .get_rx_ring_count = hns_get_rx_ring_count,
.get_link_ksettings = hns_nic_get_link_ksettings,
.set_link_ksettings = hns_nic_set_link_ksettings,
};