1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /**************************************************************************** 3 * Driver for Solarflare network controllers and boards 4 * Copyright 2019 Solarflare Communications Inc. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published 8 * by the Free Software Foundation, incorporated herein by reference. 9 */ 10 11 #ifndef EFX_ETHTOOL_COMMON_H 12 #define EFX_ETHTOOL_COMMON_H 13 14 extern const char *efx_driver_name; 15 16 void efx_ethtool_get_drvinfo(struct net_device *net_dev, 17 struct ethtool_drvinfo *info); 18 u32 efx_ethtool_get_msglevel(struct net_device *net_dev); 19 void efx_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable); 20 void efx_ethtool_self_test(struct net_device *net_dev, 21 struct ethtool_test *test, u64 *data); 22 int efx_ethtool_nway_reset(struct net_device *net_dev); 23 void efx_ethtool_get_pauseparam(struct net_device *net_dev, 24 struct ethtool_pauseparam *pause); 25 int efx_ethtool_set_pauseparam(struct net_device *net_dev, 26 struct ethtool_pauseparam *pause); 27 int efx_ethtool_fill_self_tests(struct efx_nic *efx, 28 struct efx_self_tests *tests, 29 u8 *strings, u64 *data); 30 int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set); 31 void efx_ethtool_get_strings(struct net_device *net_dev, u32 string_set, 32 u8 *strings); 33 void efx_ethtool_get_stats(struct net_device *net_dev, 34 struct ethtool_stats *stats __attribute__ ((unused)), 35 u64 *data); 36 int efx_ethtool_get_link_ksettings(struct net_device *net_dev, 37 struct ethtool_link_ksettings *out); 38 int efx_ethtool_set_link_ksettings(struct net_device *net_dev, 39 const struct ethtool_link_ksettings *settings); 40 int efx_ethtool_get_fecparam(struct net_device *net_dev, 41 struct ethtool_fecparam *fecparam); 42 int efx_ethtool_set_fecparam(struct net_device *net_dev, 43 struct ethtool_fecparam *fecparam); 44 int efx_ethtool_get_rxnfc(struct net_device *net_dev, 45 struct ethtool_rxnfc *info, u32 *rule_locs); 46 int efx_ethtool_set_rxnfc(struct net_device *net_dev, 47 struct ethtool_rxnfc *info); 48 u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev); 49 u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev); 50 int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key, 51 u8 *hfunc); 52 int efx_ethtool_set_rxfh(struct net_device *net_dev, 53 const u32 *indir, const u8 *key, const u8 hfunc); 54 int efx_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir, 55 u8 *key, u8 *hfunc, u32 rss_context); 56 int efx_ethtool_set_rxfh_context(struct net_device *net_dev, 57 const u32 *indir, const u8 *key, 58 const u8 hfunc, u32 *rss_context, 59 bool delete); 60 int efx_ethtool_reset(struct net_device *net_dev, u32 *flags); 61 int efx_ethtool_get_module_eeprom(struct net_device *net_dev, 62 struct ethtool_eeprom *ee, 63 u8 *data); 64 int efx_ethtool_get_module_info(struct net_device *net_dev, 65 struct ethtool_modinfo *modinfo); 66 #endif 67