ethtool_common.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #ifndef EFX_ETHTOOL_COMMON_H
  11. #define EFX_ETHTOOL_COMMON_H
  12. void efx_ethtool_get_drvinfo(struct net_device *net_dev,
  13. struct ethtool_drvinfo *info);
  14. u32 efx_ethtool_get_msglevel(struct net_device *net_dev);
  15. void efx_ethtool_set_msglevel(struct net_device *net_dev, u32 msg_enable);
  16. void efx_ethtool_self_test(struct net_device *net_dev,
  17. struct ethtool_test *test, u64 *data);
  18. void efx_ethtool_get_pauseparam(struct net_device *net_dev,
  19. struct ethtool_pauseparam *pause);
  20. int efx_ethtool_set_pauseparam(struct net_device *net_dev,
  21. struct ethtool_pauseparam *pause);
  22. int efx_ethtool_fill_self_tests(struct efx_nic *efx,
  23. struct efx_self_tests *tests,
  24. u8 *strings, u64 *data);
  25. int efx_ethtool_get_sset_count(struct net_device *net_dev, int string_set);
  26. void efx_ethtool_get_strings(struct net_device *net_dev, u32 string_set,
  27. u8 *strings);
  28. u32 efx_ethtool_get_priv_flags(struct net_device *net_dev);
  29. int efx_ethtool_set_priv_flags(struct net_device *net_dev, u32 flags);
  30. void efx_ethtool_get_stats(struct net_device *net_dev,
  31. struct ethtool_stats *stats __attribute__ ((unused)),
  32. u64 *data);
  33. int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
  34. struct ethtool_link_ksettings *out);
  35. int efx_ethtool_set_link_ksettings(struct net_device *net_dev,
  36. const struct ethtool_link_ksettings *settings);
  37. int efx_ethtool_get_fecparam(struct net_device *net_dev,
  38. struct ethtool_fecparam *fecparam);
  39. int efx_ethtool_set_fecparam(struct net_device *net_dev,
  40. struct ethtool_fecparam *fecparam);
  41. int efx_ethtool_get_rxnfc(struct net_device *net_dev,
  42. struct ethtool_rxnfc *info, u32 *rule_locs);
  43. int efx_ethtool_set_rxnfc(struct net_device *net_dev,
  44. struct ethtool_rxnfc *info);
  45. u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev);
  46. u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev);
  47. int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key,
  48. u8 *hfunc);
  49. int efx_ethtool_set_rxfh(struct net_device *net_dev,
  50. const u32 *indir, const u8 *key, const u8 hfunc);
  51. int efx_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir,
  52. u8 *key, u8 *hfunc, u32 rss_context);
  53. int efx_ethtool_set_rxfh_context(struct net_device *net_dev,
  54. const u32 *indir, const u8 *key,
  55. const u8 hfunc, u32 *rss_context,
  56. bool delete);
  57. int efx_ethtool_reset(struct net_device *net_dev, u32 *flags);
  58. int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
  59. struct ethtool_eeprom *ee,
  60. u8 *data);
  61. int efx_ethtool_get_module_info(struct net_device *net_dev,
  62. struct ethtool_modinfo *modinfo);
  63. #endif