1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* r8169.h: RealTek 8169/8168/8101 ethernet driver.
4 * Copyright (c) 2002 ShuChen <shuchen@realtek.com.tw>
5 * Copyright (c) 2003 - 2007 Francois Romieu <romieu@fr.zoreil.com>
6 * Copyright (c) a lot of people too. Please respect their work.
8 * See MAINTAINERS file for support contact information.
11 #include <linux/netdevice.h>
12 #include <linux/types.h>
13 #include <linux/phy.h>
16 /* support for ancient RTL_GIGA_MAC_VER_01 has been removed */
27 /* RTL_GIGA_MAC_VER_12 was handled the same as VER_17 */
28 /* RTL_GIGA_MAC_VER_13 was merged with VER_10 */
30 /* RTL_GIGA_MAC_VER_16 was merged with VER_10 */
41 /* support for RTL_GIGA_MAC_VER_27 has been removed */
55 /* support for RTL_GIGA_MAC_VER_41 has been removed */
59 /* support for RTL_GIGA_MAC_VER_45 has been removed */
61 /* support for RTL_GIGA_MAC_VER_47 has been removed */
63 /* support for RTL_GIGA_MAC_VER_49 has been removed */
64 /* support for RTL_GIGA_MAC_VER_50 has been removed */
68 /* support for RTL_GIGA_MAC_VER_60 has been removed */
77 struct rtl8169_private
;
78 struct r8169_led_classdev
;
80 void r8169_apply_firmware(struct rtl8169_private
*tp
);
81 u16
rtl8168h_2_get_adc_bias_ioffset(struct rtl8169_private
*tp
);
82 u8
rtl8168d_efuse_read(struct rtl8169_private
*tp
, int reg_addr
);
83 void r8169_hw_phy_config(struct rtl8169_private
*tp
, struct phy_device
*phydev
,
84 enum mac_version ver
);
86 void r8169_get_led_name(struct rtl8169_private
*tp
, int idx
,
87 char *buf
, int buf_len
);
88 int rtl8168_get_led_mode(struct rtl8169_private
*tp
);
89 int rtl8168_led_mod_ctrl(struct rtl8169_private
*tp
, u16 mask
, u16 val
);
90 struct r8169_led_classdev
*rtl8168_init_leds(struct net_device
*ndev
);
91 int rtl8125_get_led_mode(struct rtl8169_private
*tp
, int index
);
92 int rtl8125_set_led_mode(struct rtl8169_private
*tp
, int index
, u16 mode
);
93 struct r8169_led_classdev
*rtl8125_init_leds(struct net_device
*ndev
);
94 void r8169_remove_leds(struct r8169_led_classdev
*leds
);