Lines Matching refs:rtl_fw
42 static bool rtl_fw_format_ok(struct rtl_fw *rtl_fw) in rtl_fw_format_ok() argument
44 const struct firmware *fw = rtl_fw->fw; in rtl_fw_format_ok()
46 struct rtl_fw_phy_action *pa = &rtl_fw->phy_action; in rtl_fw_format_ok()
71 strscpy(rtl_fw->version, fw_info->version, RTL_VER_SIZE); in rtl_fw_format_ok()
79 strscpy(rtl_fw->version, rtl_fw->fw_name, RTL_VER_SIZE); in rtl_fw_format_ok()
88 static bool rtl_fw_data_ok(struct rtl_fw *rtl_fw) in rtl_fw_data_ok() argument
90 struct rtl_fw_phy_action *pa = &rtl_fw->phy_action; in rtl_fw_data_ok()
129 dev_err(rtl_fw->dev, "Invalid action 0x%08x\n", action); in rtl_fw_data_ok()
136 dev_err(rtl_fw->dev, "Out of range of firmware\n"); in rtl_fw_data_ok()
140 void rtl_fw_write_firmware(struct rtl8169_private *tp, struct rtl_fw *rtl_fw) in rtl_fw_write_firmware() argument
142 struct rtl_fw_phy_action *pa = &rtl_fw->phy_action; in rtl_fw_write_firmware()
143 rtl_fw_write_t fw_write = rtl_fw->phy_write; in rtl_fw_write_firmware()
144 rtl_fw_read_t fw_read = rtl_fw->phy_read; in rtl_fw_write_firmware()
170 fw_write = rtl_fw->mac_mcu_write; in rtl_fw_write_firmware()
171 fw_read = rtl_fw->mac_mcu_read; in rtl_fw_write_firmware()
173 fw_write = rtl_fw->phy_write; in rtl_fw_write_firmware()
174 fw_read = rtl_fw->phy_read; in rtl_fw_write_firmware()
209 void rtl_fw_release_firmware(struct rtl_fw *rtl_fw) in rtl_fw_release_firmware() argument
211 release_firmware(rtl_fw->fw); in rtl_fw_release_firmware()
214 int rtl_fw_request_firmware(struct rtl_fw *rtl_fw) in rtl_fw_request_firmware() argument
218 rc = request_firmware(&rtl_fw->fw, rtl_fw->fw_name, rtl_fw->dev); in rtl_fw_request_firmware()
222 if (!rtl_fw_format_ok(rtl_fw) || !rtl_fw_data_ok(rtl_fw)) { in rtl_fw_request_firmware()
223 release_firmware(rtl_fw->fw); in rtl_fw_request_firmware()
230 dev_err(rtl_fw->dev, "Unable to load firmware %s (%d)\n", in rtl_fw_request_firmware()
231 rtl_fw->fw_name, rc); in rtl_fw_request_firmware()