treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / net / ethernet / realtek / r8169_firmware.h
blob7dc348ed834574391f7c5b11dc42eddb066ead5d
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* r8169_firmware.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.
9 */
11 #include <linux/device.h>
12 #include <linux/firmware.h>
14 struct rtl8169_private;
15 typedef void (*rtl_fw_write_t)(struct rtl8169_private *tp, int reg, int val);
16 typedef int (*rtl_fw_read_t)(struct rtl8169_private *tp, int reg);
18 #define RTL_VER_SIZE 32
20 struct rtl_fw {
21 rtl_fw_write_t phy_write;
22 rtl_fw_read_t phy_read;
23 rtl_fw_write_t mac_mcu_write;
24 rtl_fw_read_t mac_mcu_read;
25 const struct firmware *fw;
26 const char *fw_name;
27 struct device *dev;
29 char version[RTL_VER_SIZE];
31 struct rtl_fw_phy_action {
32 __le32 *code;
33 size_t size;
34 } phy_action;
37 int rtl_fw_request_firmware(struct rtl_fw *rtl_fw);
38 void rtl_fw_release_firmware(struct rtl_fw *rtl_fw);
39 void rtl_fw_write_firmware(struct rtl8169_private *tp, struct rtl_fw *rtl_fw);