linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] rtlwifi: rtl8192ce: Fix loading of incorrect firmware
@ 2017-01-30 21:41 Larry Finger
  2017-01-31  6:27 ` Kalle Valo
  2017-01-31  7:06 ` [V2] " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Larry Finger @ 2017-01-30 21:41 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Jurij Smakov, Larry Finger

From: Jurij Smakov <jurij@wooyd.org>

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. In this condition,
the connection suffered from high ping latency, slow transfer rates,
 and required higher signal strengths to work at all

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853073,
https://bugzilla.opensuse.org/show_bug.cgi?id=1017471, and
https://github.com/lwfinger/rtlwifi_new/issues/203 for descriptions
of the problems. This patch fixes all of those problems.

Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859")
Signed-off-by: Jurij Smakov <jurij@wooyd.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> # 4.9+
---
V2 - answer the comments of Kalle
---
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] rtlwifi: rtl8192ce: Fix loading of incorrect firmware
  2017-01-30 21:41 [PATCH V2] rtlwifi: rtl8192ce: Fix loading of incorrect firmware Larry Finger
@ 2017-01-31  6:27 ` Kalle Valo
  2017-01-31  7:06 ` [V2] " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-01-31  6:27 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, Jurij Smakov

Larry Finger <Larry.Finger@lwfinger.net> writes:

> From: Jurij Smakov <jurij@wooyd.org>
>
> 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. In this condition,
> the connection suffered from high ping latency, slow transfer rates,
>  and required higher signal strengths to work at all
>
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853073,
> https://bugzilla.opensuse.org/show_bug.cgi?id=1017471, and
> https://github.com/lwfinger/rtlwifi_new/issues/203 for descriptions
> of the problems. This patch fixes all of those problems.
>
> Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859")
> Signed-off-by: Jurij Smakov <jurij@wooyd.org>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Stable <stable@vger.kernel.org> # 4.9+
> ---
> V2 - answer the comments of Kalle

Perfect, thanks. Now it should be obvious why this patch needs to be in
4.10.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [V2] rtlwifi: rtl8192ce: Fix loading of incorrect firmware
  2017-01-30 21:41 [PATCH V2] rtlwifi: rtl8192ce: Fix loading of incorrect firmware Larry Finger
  2017-01-31  6:27 ` Kalle Valo
@ 2017-01-31  7:06 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-01-31  7:06 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, Jurij Smakov, Larry Finger

Larry Finger <Larry.Finger@lwfinger.net> wrote:
> From: Jurij Smakov <jurij@wooyd.org>
> 
> 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. In this condition,
> the connection suffered from high ping latency, slow transfer rates,
>  and required higher signal strengths to work at all
> 
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853073,
> https://bugzilla.opensuse.org/show_bug.cgi?id=1017471, and
> https://github.com/lwfinger/rtlwifi_new/issues/203 for descriptions
> of the problems. This patch fixes all of those problems.
> 
> Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859")
> Signed-off-by: Jurij Smakov <jurij@wooyd.org>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Stable <stable@vger.kernel.org> # 4.9+

Patch applied to wireless-drivers.git, thanks.

52f5631a4c05 rtlwifi: rtl8192ce: Fix loading of incorrect firmware

-- 
https://patchwork.kernel.org/patch/9546113/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-31  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-30 21:41 [PATCH V2] rtlwifi: rtl8192ce: Fix loading of incorrect firmware Larry Finger
2017-01-31  6:27 ` Kalle Valo
2017-01-31  7:06 ` [V2] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).