blob: ed1e555292e9ce404b44017eca84fac5edb23d85 [file] [log] [blame]
Michael Chanc0c050c2015-10-22 16:01:17 -04001/* Broadcom NetXtreme-C/E network driver.
2 *
Michael Chan11f15ed2016-04-05 14:08:55 -04003 * Copyright (c) 2014-2016 Broadcom Corporation
Michael Chanc0c050c2015-10-22 16:01:17 -04004 *
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
10#ifndef BNXT_ETHTOOL_H
11#define BNXT_ETHTOOL_H
12
Michael Chan5ad2cbe2017-01-13 01:32:03 -050013struct bnxt_led_cfg {
14 u8 led_id;
15 u8 led_state;
16 u8 led_color;
17 u8 unused;
18 __le16 led_blink_on;
19 __le16 led_blink_off;
20 u8 led_group_id;
21 u8 rsvd;
22};
23
24#define BNXT_LED_DFLT_ENA \
25 (PORT_LED_CFG_REQ_ENABLES_LED0_ID | \
26 PORT_LED_CFG_REQ_ENABLES_LED0_STATE | \
27 PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_ON | \
28 PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_OFF | \
29 PORT_LED_CFG_REQ_ENABLES_LED0_GROUP_ID)
30
31#define BNXT_LED_DFLT_ENA_SHIFT 6
32
33#define BNXT_LED_DFLT_ENABLES(x) \
34 cpu_to_le32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
35
Michael Chanc0c050c2015-10-22 16:01:17 -040036extern const struct ethtool_ops bnxt_ethtool_ops;
37
Michael Chan170ce012016-04-05 14:08:57 -040038u32 _bnxt_fw_to_ethtool_adv_spds(u16, u8);
Michael Chanc0c050c2015-10-22 16:01:17 -040039u32 bnxt_fw_to_ethtool_speed(u16);
Michael Chan939f7f02016-04-05 14:08:58 -040040u16 bnxt_get_fw_auto_link_speeds(u32);
Michael Chanc0c050c2015-10-22 16:01:17 -040041
42#endif