Skip to content

Commit 52f5631

Browse files
sadkingbillyKalle Valo
authored andcommitted
rtlwifi: rtl8192ce: Fix loading of incorrect firmware
In commit cf4747d ("rtlwifi: Fix regression caused by commit d86e647, 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: cf4747d ("rtlwifi: Fix regression caused by commit d86e647") Signed-off-by: Jurij Smakov <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> # 4.9+ Signed-off-by: Kalle Valo <[email protected]>
1 parent 2b1d530 commit 52f5631

File tree

1 file changed

+7
-2
lines changed
  • drivers/net/wireless/realtek/rtlwifi/rtl8192ce

1 file changed

+7
-2
lines changed

drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
9292
struct rtl_priv *rtlpriv = rtl_priv(hw);
9393
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
9494
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
95-
char *fw_name = "rtlwifi/rtl8192cfwU.bin";
95+
char *fw_name;
9696

9797
rtl8192ce_bt_reg_init(hw);
9898

@@ -164,8 +164,13 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
164164
}
165165

166166
/* request fw */
167-
if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
167+
if (IS_VENDOR_UMC_A_CUT(rtlhal->version) &&
168+
!IS_92C_SERIAL(rtlhal->version))
169+
fw_name = "rtlwifi/rtl8192cfwU.bin";
170+
else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
168171
fw_name = "rtlwifi/rtl8192cfwU_B.bin";
172+
else
173+
fw_name = "rtlwifi/rtl8192cfw.bin";
169174

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

0 commit comments

Comments
 (0)