xref: /linux/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 // Copyright (c) 2021 Hisilicon Limited.
3 
4 #ifndef __HNS3_ETHTOOL_H
5 #define __HNS3_ETHTOOL_H
6 
7 #include <linux/ethtool.h>
8 #include <linux/netdevice.h>
9 
10 struct hns3_stats {
11 	char stats_string[ETH_GSTRING_LEN];
12 	int stats_offset;
13 };
14 
15 struct hns3_sfp_type {
16 	u8 type;
17 	u8 ext_type;
18 };
19 
20 struct hns3_pflag_desc {
21 	char name[ETH_GSTRING_LEN];
22 	void (*handler)(struct net_device *netdev, bool enable);
23 };
24 
25 struct hns3_ethtool_link_ext_state_mapping {
26 	u32 status_code;
27 	enum ethtool_link_ext_state link_ext_state;
28 	u8 link_ext_substate;
29 };
30 
31 struct hns3_ring_param {
32 	u32 tx_desc_num;
33 	u32 rx_desc_num;
34 	u32 rx_buf_len;
35 };
36 
37 #endif
38