* [PATCH] rtlwifi: rtl8192ce: Log message that B_CUT device may not work
@ 2012-09-11 16:11 Larry Finger
2012-09-11 17:23 ` Anisse Astier
0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2012-09-11 16:11 UTC (permalink / raw)
To: linville
Cc: linux-wireless, Larry Finger, netdev, Stable, Anisse Astier,
Li Chaoming
There are a number of problems that occur for the latest version
of the Realtek RTL8188CE device with the in-kernel driver. These
include selection of the wrong firmware, and system lockup. A full
fix is known, but is too invasive for inclusion in stable. This patch
fixes the problem with loading the wrong firmware, and logs a message
that the device may not work for kernels 3.6 and older.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Cc: Anisse Astier <anisse@astier.eu>
Cc: Li Chaoming <chaoming_li@realsil.com.cn>
---
drivers/net/wireless/rtlwifi/rtl8192ce/def.h | 1 +
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 12 ++++++++++--
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 6 ++++--
3 files changed, 15 insertions(+), 4 deletions(-)
---
John,
Although this patch does not fix a regression, it should prevent the
system freezes that are associated with selecting the wrong firmware
for the new devices. I hope it can be included in 3.6.
A full patch to fix the problems is nearly ready, and will be submitted
for -next later today.
Thanks,
Larry
---
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/def.h b/drivers/net/wireless/rtlwifi/rtl8192ce/def.h
index 04c3aef..2925094 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/def.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/def.h
@@ -117,6 +117,7 @@
#define CHIP_VER_B BIT(4)
#define CHIP_92C_BITMASK BIT(0)
+#define CHIP_UNKNOWN BIT(7)
#define CHIP_92C_1T2R 0x03
#define CHIP_92C 0x01
#define CHIP_88C 0x00
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index cc89582..86d73b3 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -994,8 +994,16 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw)
version = (value32 & TYPE_ID) ? VERSION_A_CHIP_92C :
VERSION_A_CHIP_88C;
} else {
- version = (value32 & TYPE_ID) ? VERSION_B_CHIP_92C :
- VERSION_B_CHIP_88C;
+ version = (enum version_8192c) (CHIP_VER_B |
+ ((value32 & TYPE_ID) ? CHIP_92C_BITMASK : 0) |
+ ((value32 & VENDOR_ID) ? CHIP_VENDOR_UMC : 0));
+ if ((!IS_CHIP_VENDOR_UMC(version)) && (value32 &
+ CHIP_VER_RTL_MASK)) {
+ version = (enum version_8192c)(version |
+ ((((value32 & CHIP_VER_RTL_MASK) == BIT(12))
+ ? CHIP_VENDOR_UMC_B_CUT : CHIP_UNKNOWN) |
+ CHIP_VENDOR_UMC));
+ }
}
switch (version) {
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
index 60451ee..ea2e1bd 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
@@ -162,10 +162,12 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
/* request fw */
if (IS_VENDOR_UMC_A_CUT(rtlhal->version) &&
- !IS_92C_SERIAL(rtlhal->version))
+ !IS_92C_SERIAL(rtlhal->version)) {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cfwU.bin";
- else if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version))
+ } else if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version)) {
rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cfwU_B.bin";
+ pr_info("****** This B_CUT device may not work with kernels 3.6 and earlier\n");
+ }
rtlpriv->max_fw_size = 0x4000;
pr_info("Using firmware %s\n", rtlpriv->cfg->fw_name);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] rtlwifi: rtl8192ce: Log message that B_CUT device may not work
2012-09-11 16:11 [PATCH] rtlwifi: rtl8192ce: Log message that B_CUT device may not work Larry Finger
@ 2012-09-11 17:23 ` Anisse Astier
0 siblings, 0 replies; 2+ messages in thread
From: Anisse Astier @ 2012-09-11 17:23 UTC (permalink / raw)
To: Larry Finger; +Cc: linville, linux-wireless, netdev, Stable, Li Chaoming
On Tue, 11 Sep 2012 11:11:13 -0500, Larry Finger <Larry.Finger@lwfinger.net> wrote :
> There are a number of problems that occur for the latest version
> of the Realtek RTL8188CE device with the in-kernel driver. These
> include selection of the wrong firmware, and system lockup. A full
> fix is known, but is too invasive for inclusion in stable. This patch
> fixes the problem with loading the wrong firmware, and logs a message
> that the device may not work for kernels 3.6 and older.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Stable <stable@vger.kernel.org>
> Cc: Anisse Astier <anisse@astier.eu>
> Cc: Li Chaoming <chaoming_li@realsil.com.cn>
Tested-by: Anisse Astier <anisse@astier.eu>
Behaves as expected: I can see the warning then about 20 seconds later
the machine locks up.
Regards,
Anisse
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-11 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 16:11 [PATCH] rtlwifi: rtl8192ce: Log message that B_CUT device may not work Larry Finger
2012-09-11 17:23 ` Anisse Astier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox