linux/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.h
Hao Chen 07fdc163ac net: hns3: refactor hns3_set_ringparam()
Use struct hns3_ring_param to replace variable new/old_xxx and
add hns3_is_ringparam_changed() to judge them if is changed to
improve code readability.

Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-04-20 10:45:50 +01:00

37 lines
661 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
// Copyright (c) 2021 Hisilicon Limited.
#ifndef __HNS3_ETHTOOL_H
#define __HNS3_ETHTOOL_H
#include <linux/ethtool.h>
#include <linux/netdevice.h>
struct hns3_stats {
char stats_string[ETH_GSTRING_LEN];
int stats_offset;
};
struct hns3_sfp_type {
u8 type;
u8 ext_type;
};
struct hns3_pflag_desc {
char name[ETH_GSTRING_LEN];
void (*handler)(struct net_device *netdev, bool enable);
};
struct hns3_ethtool_link_ext_state_mapping {
u32 status_code;
enum ethtool_link_ext_state link_ext_state;
u8 link_ext_substate;
};
struct hns3_ring_param {
u32 tx_desc_num;
u32 rx_desc_num;
u32 rx_buf_len;
};
#endif