bnxt_ethtool.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Broadcom NetXtreme-C/E network driver.
  2. *
  3. * Copyright (c) 2014-2016 Broadcom Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation.
  8. */
  9. #ifndef BNXT_ETHTOOL_H
  10. #define BNXT_ETHTOOL_H
  11. struct bnxt_led_cfg {
  12. u8 led_id;
  13. u8 led_state;
  14. u8 led_color;
  15. u8 unused;
  16. __le16 led_blink_on;
  17. __le16 led_blink_off;
  18. u8 led_group_id;
  19. u8 rsvd;
  20. };
  21. #define BNXT_LED_DFLT_ENA \
  22. (PORT_LED_CFG_REQ_ENABLES_LED0_ID | \
  23. PORT_LED_CFG_REQ_ENABLES_LED0_STATE | \
  24. PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_ON | \
  25. PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_OFF | \
  26. PORT_LED_CFG_REQ_ENABLES_LED0_GROUP_ID)
  27. #define BNXT_LED_DFLT_ENA_SHIFT 6
  28. #define BNXT_LED_DFLT_ENABLES(x) \
  29. cpu_to_le32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
  30. extern const struct ethtool_ops bnxt_ethtool_ops;
  31. u32 _bnxt_fw_to_ethtool_adv_spds(u16, u8);
  32. u32 bnxt_fw_to_ethtool_speed(u16);
  33. u16 bnxt_get_fw_auto_link_speeds(u32);
  34. #endif