1 /* Broadcom NetXtreme-C/E network driver.
3 * Copyright (c) 2014-2016 Broadcom Corporation
4 * Copyright (c) 2016-2017 Broadcom Limited
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation.
11 #ifndef BNXT_ETHTOOL_H
12 #define BNXT_ETHTOOL_H
25 #define BNXT_LED_DFLT_ENA \
26 (PORT_LED_CFG_REQ_ENABLES_LED0_ID | \
27 PORT_LED_CFG_REQ_ENABLES_LED0_STATE | \
28 PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_ON | \
29 PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_OFF | \
30 PORT_LED_CFG_REQ_ENABLES_LED0_GROUP_ID)
32 #define BNXT_LED_DFLT_ENA_SHIFT 6
34 #define BNXT_LED_DFLT_ENABLES(x) \
35 cpu_to_le32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
37 #define BNXT_FW_RESET_AP 0xfffe
38 #define BNXT_FW_RESET_CHIP 0xffff
40 extern const struct ethtool_ops bnxt_ethtool_ops
;
42 u32
_bnxt_fw_to_ethtool_adv_spds(u16
, u8
);
43 u32
bnxt_fw_to_ethtool_speed(u16
);
44 u16
bnxt_get_fw_auto_link_speeds(u32
);
45 void bnxt_ethtool_init(struct bnxt
*bp
);
46 void bnxt_ethtool_free(struct bnxt
*bp
);