1
2
3
4
5
6
7
8
9
10
11 #include <linux/device.h>
12 #include <linux/firmware.h>
13
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);
17
18 #define RTL_VER_SIZE 32
19
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;
28
29 char version[RTL_VER_SIZE];
30
31 struct rtl_fw_phy_action {
32 __le32 *code;
33 size_t size;
34 } phy_action;
35 };
36
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);