diff mbox

[v3] rtlwifi: rtl8821ae: fix firmware is not ready to run

Message ID 20180628020227.8776-1-pkshih@realtek.com (mailing list archive)
State Accepted
Commit 9a98302de19991d51e067b88750585203b2a3ab6
Delegated to: Kalle Valo
Headers show

Commit Message

Ping-Ke Shih June 28, 2018, 2:02 a.m. UTC
From: Ping-Ke Shih <pkshih@realtek.com>

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: fe89707f0afa ("rtlwifi: rtl8821ae: Simplify loading of WOWLAN firmware")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Cc: Stable <stable@vger.kernel.org> # 4.0+
Reviewed-by: Larry Finger <Larry.Finger@lwfinger.net>
---
V3: Add more commit logs, Cc and Reviewed-by. Thank you, Larry.
v2: fix commit log typo.
---
 drivers/net/wireless/realtek/rtlwifi/core.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Kalle Valo June 29, 2018, 7:09 a.m. UTC | #1
Ping-Ke Shih <pkshih@realtek.com> wrote:

> From: Ping-Ke Shih <pkshih@realtek.com>
> 
> 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: fe89707f0afa ("rtlwifi: rtl8821ae: Simplify loading of WOWLAN firmware")
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Stable <stable@vger.kernel.org> # 4.0+
> Reviewed-by: Larry Finger <Larry.Finger@lwfinger.net>

Patch applied to wireless-drivers.git, thanks.

9a98302de199 rtlwifi: rtl8821ae: fix firmware is not ready to run
diff mbox

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index a3f46203ee7a..4bf7967590ca 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -130,7 +130,6 @@  static void rtl_fw_do_work(const struct firmware *firmware, void *context,
 		       firmware->size);
 		rtlpriv->rtlhal.wowlan_fwsize = firmware->size;
 	}
-	rtlpriv->rtlhal.fwsize = firmware->size;
 	release_firmware(firmware);
 }