Skip to content

Commit

Permalink
rtlwifi: rtl8192ce: Fix loading of incorrect firmware
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Jurij Smakov authored and Kalle Valo committed Jan 31, 2017
1 parent 2b1d530 commit 52f5631
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,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);

Expand Down Expand Up @@ -164,8 +164,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);
Expand Down

0 comments on commit 52f5631

Please sign in to comment.