Lines Matching refs:rtl_fw
842 struct rtl_fw { struct
853 } *rtl_fw; member
1873 struct rtl_fw *rtl_fw = tp->rtl_fw; in rtl8169_get_drvinfo() local
1878 BUILD_BUG_ON(sizeof(info->fw_version) < sizeof(rtl_fw->version)); in rtl8169_get_drvinfo()
1879 if (!IS_ERR_OR_NULL(rtl_fw)) in rtl8169_get_drvinfo()
1880 strlcpy(info->fw_version, rtl_fw->version, in rtl8169_get_drvinfo()
2519 static bool rtl_fw_format_ok(struct rtl8169_private *tp, struct rtl_fw *rtl_fw) in rtl_fw_format_ok() argument
2521 const struct firmware *fw = rtl_fw->fw; in rtl_fw_format_ok()
2523 struct rtl_fw_phy_action *pa = &rtl_fw->phy_action; in rtl_fw_format_ok()
2524 char *version = rtl_fw->version; in rtl_fw_format_ok()
2626 static int rtl_check_firmware(struct rtl8169_private *tp, struct rtl_fw *rtl_fw) in rtl_check_firmware() argument
2631 if (!rtl_fw_format_ok(tp, rtl_fw)) { in rtl_check_firmware()
2636 if (rtl_fw_data_ok(tp, dev, &rtl_fw->phy_action)) in rtl_check_firmware()
2642 static void rtl_phy_write_fw(struct rtl8169_private *tp, struct rtl_fw *rtl_fw) in rtl_phy_write_fw() argument
2644 struct rtl_fw_phy_action *pa = &rtl_fw->phy_action; in rtl_phy_write_fw()
2733 if (!IS_ERR_OR_NULL(tp->rtl_fw)) { in rtl_release_firmware()
2734 release_firmware(tp->rtl_fw->fw); in rtl_release_firmware()
2735 kfree(tp->rtl_fw); in rtl_release_firmware()
2737 tp->rtl_fw = RTL_FIRMWARE_UNKNOWN; in rtl_release_firmware()
2742 struct rtl_fw *rtl_fw = tp->rtl_fw; in rtl_apply_firmware() local
2745 if (!IS_ERR_OR_NULL(rtl_fw)) in rtl_apply_firmware()
2746 rtl_phy_write_fw(tp, rtl_fw); in rtl_apply_firmware()
5144 struct rtl_fw *rtl_fw; in rtl_request_uncached_firmware() local
5152 rtl_fw = kzalloc(sizeof(*rtl_fw), GFP_KERNEL); in rtl_request_uncached_firmware()
5153 if (!rtl_fw) in rtl_request_uncached_firmware()
5156 rc = request_firmware(&rtl_fw->fw, name, &tp->pci_dev->dev); in rtl_request_uncached_firmware()
5160 rc = rtl_check_firmware(tp, rtl_fw); in rtl_request_uncached_firmware()
5164 tp->rtl_fw = rtl_fw; in rtl_request_uncached_firmware()
5169 release_firmware(rtl_fw->fw); in rtl_request_uncached_firmware()
5171 kfree(rtl_fw); in rtl_request_uncached_firmware()
5176 tp->rtl_fw = NULL; in rtl_request_uncached_firmware()
5182 if (IS_ERR(tp->rtl_fw)) in rtl_request_firmware()
8409 tp->rtl_fw = RTL_FIRMWARE_UNKNOWN; in rtl_init_one()