ethtool_common.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. void efx_ethtool_get_stats(struct net_device *net_dev,
  29. struct ethtool_stats *stats __attribute__ ((unused)),
  30. u64 *data);
  31. int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
  32. struct ethtool_link_ksettings *out);
  33. int efx_ethtool_set_link_ksettings(struct net_device *net_dev,
  34. const struct ethtool_link_ksettings *settings);
  35. int efx_ethtool_get_fecparam(struct net_device *net_dev,
  36. struct ethtool_fecparam *fecparam);
  37. int efx_ethtool_set_fecparam(struct net_device *net_dev,
  38. struct ethtool_fecparam *fecparam);
  39. int efx_ethtool_get_rxnfc(struct net_device *net_dev,
  40. struct ethtool_rxnfc *info, u32 *rule_locs);
  41. u32 efx_ethtool_get_rx_ring_count(struct net_device *net_dev);
  42. int efx_ethtool_set_rxnfc(struct net_device *net_dev,
  43. struct ethtool_rxnfc *info);
  44. u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev);
  45. u32 efx_ethtool_get_rxfh_key_size(struct net_device *net_dev);
  46. int efx_ethtool_get_rxfh(struct net_device *net_dev,
  47. struct ethtool_rxfh_param *rxfh);
  48. int efx_ethtool_set_rxfh(struct net_device *net_dev,
  49. struct ethtool_rxfh_param *rxfh,
  50. struct netlink_ext_ack *extack);
  51. int efx_ethtool_get_rxfh_fields(struct net_device *net_dev,
  52. struct ethtool_rxfh_fields *info);
  53. int efx_ethtool_create_rxfh_context(struct net_device *net_dev,
  54. struct ethtool_rxfh_context *ctx,
  55. const struct ethtool_rxfh_param *rxfh,
  56. struct netlink_ext_ack *extack);
  57. int efx_ethtool_modify_rxfh_context(struct net_device *net_dev,
  58. struct ethtool_rxfh_context *ctx,
  59. const struct ethtool_rxfh_param *rxfh,
  60. struct netlink_ext_ack *extack);
  61. int efx_ethtool_remove_rxfh_context(struct net_device *net_dev,
  62. struct ethtool_rxfh_context *ctx,
  63. u32 rss_context,
  64. struct netlink_ext_ack *extack);
  65. int efx_ethtool_reset(struct net_device *net_dev, u32 *flags);
  66. int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
  67. struct ethtool_eeprom *ee,
  68. u8 *data);
  69. int efx_ethtool_get_module_info(struct net_device *net_dev,
  70. struct ethtool_modinfo *modinfo);
  71. #endif