2017-01-30 17:41:04

by Larry Finger

[permalink] [raw]
Subject: [PATCH] rtlwifi: rtl8192ce: Fix loading of incorrect firmware

In commit cf4747d7535a ("rtlwifi: Fix regression caused by commit
d86e64768859, an error in the edit results in the wrong firmware
being loaded for some models of the RTL8188/8192CE.

Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859")
Signed-off-by: Jurij Smakov <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Stable <[email protected]>
---
Kalle,

This patch should be pushed upstream as soon as possible. Note that it
does not cause a kernel panic. It does, however, reduce the reliability
of the wireless connection.

Larry
---
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
index b875a72..9a94e45 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
@@ -96,7 +96,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
- char *fw_name = "rtlwifi/rtl8192cfwU.bin";
+ char *fw_name;

rtl8192ce_bt_reg_init(hw);

@@ -167,8 +167,13 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
}

/* request fw */
- if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
+ if (IS_VENDOR_UMC_A_CUT(rtlhal->version) &&
+ !IS_92C_SERIAL(rtlhal->version))
+ fw_name = "rtlwifi/rtl8192cfwU.bin";
+ else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
fw_name = "rtlwifi/rtl8192cfwU_B.bin";
+ else
+ fw_name = "rtlwifi/rtl8192cfw.bin";

rtlpriv->max_fw_size = 0x4000;
pr_info("Using firmware %s\n", fw_name);
--
2.10.2


2017-01-30 19:10:23

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] rtlwifi: rtl8192ce: Fix loading of incorrect firmware

Larry Finger <[email protected]> writes:

> In commit cf4747d7535a ("rtlwifi: Fix regression caused by commit
> d86e64768859, an error in the edit results in the wrong firmware
> being loaded for some models of the RTL8188/8192CE.
>
> Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859")
> Signed-off-by: Jurij Smakov <[email protected]>
> Signed-off-by: Larry Finger <[email protected]>

This patch is written by Jurij, right? So then there should be a From
line in the commit log making him the author. An example here from Luca
where Sara is the author:

https://patchwork.kernel.org/patch/9544763/

> Cc: Stable <[email protected]>

You could add "# 4.9" here to make Greg's life easier. And no need to CC
stable in the email headers, having it in the commit log is enough.

> Kalle,
>
> This patch should be pushed upstream as soon as possible. Note that it
> does not cause a kernel panic. It does, however, reduce the reliability
> of the wireless connection.

Yeah, this looks like to be valid for 4.10 still. But please mention in
the commit log about the bug symptoms (reliability problems etc).

--
Kalle Valo