Skip to content

Commit

Permalink
rtlwifi: rtl8723: Add error handling to no existing firmware
Browse files Browse the repository at this point in the history
Without firmware, driver wastes time to download and wait for MCU bootup,
and then kernel core dump finally. If request_firmware fails, the value
max_fw_size=0 is set, so we check the value before downloading firmware.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Ping-Ke Shih authored and Kalle Valo committed Jan 8, 2018
1 parent d63589c commit 981a2b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int rtl8723_download_fw(struct ieee80211_hw *hw,
enum version_8723e version = rtlhal->version;
int max_page;

if (!rtlhal->pfirmware)
if (rtlpriv->max_fw_size == 0 || !rtlhal->pfirmware)
return 1;

pfwheader = (struct rtlwifi_firmware_header *)rtlhal->pfirmware;
Expand Down

0 comments on commit 981a2b6

Please sign in to comment.