xref: /linux/drivers/net/ethernet/wangxun/libwx/wx_ethtool.h (revision 06d07429858317ded2db7986113a9e0129cd599b)
11b8d1c50SMengyuan Lou /* SPDX-License-Identifier: GPL-2.0 */
21b8d1c50SMengyuan Lou /* Copyright (c) 2015 - 2023 Beijing WangXun Technology Co., Ltd. */
31b8d1c50SMengyuan Lou 
41b8d1c50SMengyuan Lou #ifndef _WX_ETHTOOL_H_
51b8d1c50SMengyuan Lou #define _WX_ETHTOOL_H_
61b8d1c50SMengyuan Lou 
746b92e10SJiawen Wu int wx_get_sset_count(struct net_device *netdev, int sset);
846b92e10SJiawen Wu void wx_get_strings(struct net_device *netdev, u32 stringset, u8 *data);
946b92e10SJiawen Wu void wx_get_ethtool_stats(struct net_device *netdev,
1046b92e10SJiawen Wu 			  struct ethtool_stats *stats, u64 *data);
1146b92e10SJiawen Wu void wx_get_mac_stats(struct net_device *netdev,
1246b92e10SJiawen Wu 		      struct ethtool_eth_mac_stats *mac_stats);
1346b92e10SJiawen Wu void wx_get_pause_stats(struct net_device *netdev,
1446b92e10SJiawen Wu 			struct ethtool_pause_stats *stats);
151b8d1c50SMengyuan Lou void wx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *info);
16e8e138cfSJiawen Wu int wx_nway_reset(struct net_device *netdev);
17e8e138cfSJiawen Wu int wx_get_link_ksettings(struct net_device *netdev,
18e8e138cfSJiawen Wu 			  struct ethtool_link_ksettings *cmd);
19e8e138cfSJiawen Wu int wx_set_link_ksettings(struct net_device *netdev,
20e8e138cfSJiawen Wu 			  const struct ethtool_link_ksettings *cmd);
212fe2ca09SJiawen Wu void wx_get_pauseparam(struct net_device *netdev,
222fe2ca09SJiawen Wu 		       struct ethtool_pauseparam *pause);
232fe2ca09SJiawen Wu int wx_set_pauseparam(struct net_device *netdev,
242fe2ca09SJiawen Wu 		      struct ethtool_pauseparam *pause);
25883b5984SJiawen Wu void wx_get_ringparam(struct net_device *netdev,
26883b5984SJiawen Wu 		      struct ethtool_ringparam *ring,
27883b5984SJiawen Wu 		      struct kernel_ethtool_ringparam *kernel_ring,
28883b5984SJiawen Wu 		      struct netlink_ext_ack *extack);
294ac2d9dfSJiawen Wu int wx_get_coalesce(struct net_device *netdev,
304ac2d9dfSJiawen Wu 		    struct ethtool_coalesce *ec,
314ac2d9dfSJiawen Wu 		    struct kernel_ethtool_coalesce *kernel_coal,
324ac2d9dfSJiawen Wu 		    struct netlink_ext_ack *extack);
334ac2d9dfSJiawen Wu int wx_set_coalesce(struct net_device *netdev,
344ac2d9dfSJiawen Wu 		    struct ethtool_coalesce *ec,
354ac2d9dfSJiawen Wu 		    struct kernel_ethtool_coalesce *kernel_coal,
364ac2d9dfSJiawen Wu 		    struct netlink_ext_ack *extack);
37937d46ecSJiawen Wu void wx_get_channels(struct net_device *dev,
38937d46ecSJiawen Wu 		     struct ethtool_channels *ch);
39937d46ecSJiawen Wu int wx_set_channels(struct net_device *dev,
40937d46ecSJiawen Wu 		    struct ethtool_channels *ch);
41*b746dc6bSJiawen Wu u32 wx_get_msglevel(struct net_device *netdev);
42*b746dc6bSJiawen Wu void wx_set_msglevel(struct net_device *netdev, u32 data);
431b8d1c50SMengyuan Lou #endif /* _WX_ETHTOOL_H_ */
44