diff options
author | Jurij Smakov <jurij@wooyd.org> | 2017-01-30 16:41:36 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-01-31 02:05:25 -0500 |
commit | 52f5631a4c056ad01682393be56d2be237e81610 (patch) | |
tree | 53d1ddd2c1b179c808df10b6ce731ad26aa9f31b | |
parent | 2b1d530cb3157f828fcaadd259613f59db3c6d1c (diff) |
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. 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+
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 9 |
1 files 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 691ddef1ae28..a33a06d58a9a 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | |||
@@ -92,7 +92,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) | |||
92 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 92 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
93 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 93 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
94 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 94 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
95 | char *fw_name = "rtlwifi/rtl8192cfwU.bin"; | 95 | char *fw_name; |
96 | 96 | ||
97 | rtl8192ce_bt_reg_init(hw); | 97 | rtl8192ce_bt_reg_init(hw); |
98 | 98 | ||
@@ -164,8 +164,13 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | /* request fw */ | 166 | /* 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)) | ||
168 | fw_name = "rtlwifi/rtl8192cfwU_B.bin"; | 171 | fw_name = "rtlwifi/rtl8192cfwU_B.bin"; |
172 | else | ||
173 | fw_name = "rtlwifi/rtl8192cfw.bin"; | ||
169 | 174 | ||
170 | rtlpriv->max_fw_size = 0x4000; | 175 | rtlpriv->max_fw_size = 0x4000; |
171 | pr_info("Using firmware %s\n", fw_name); | 176 | pr_info("Using firmware %s\n", fw_name); |