Commit dc250e97 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kleber Sacilotto de Souza

rtlwifi: rtl8821ae: fix firmware is not ready to run

BugLink: https://bugs.launchpad.net/bugs/1790884

commit 9a98302d upstream.

Without this patch, firmware will not run properly on rtl8821ae, and it
causes bad user experience. For example, bad connection performance with
low rate, higher power consumption, and so on.

rtl8821ae uses two kinds of firmwares for normal and WoWlan cases, and
each firmware has firmware data buffer and size individually. Original
code always overwrite size of normal firmware rtlpriv->rtlhal.fwsize, and
this mismatch causes firmware checksum error, then firmware can't start.

In this situation, driver gives message "Firmware is not ready to run!".

Fixes: fe89707f ("rtlwifi: rtl8821ae: Simplify loading of WOWLAN firmware")
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Cc: Stable <stable@vger.kernel.org> # 4.0+
Reviewed-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 56ac094c
...@@ -135,7 +135,6 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context, ...@@ -135,7 +135,6 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context,
firmware->size); firmware->size);
rtlpriv->rtlhal.wowlan_fwsize = firmware->size; rtlpriv->rtlhal.wowlan_fwsize = firmware->size;
} }
rtlpriv->rtlhal.fwsize = firmware->size;
release_firmware(firmware); release_firmware(firmware);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment