Search Linux Wireless

Re: [PATCH] wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/27/23 23:11, wo wrote:
[  149.595642] [pid:7,cpu6,kworker/u16:0,0]BEFORE: REG_RCR differs from regrcr: 0x1830613 insted of 0x7000604e [  160.676422] [pid:237,cpu6,kworker/u16:5,3]BEFORE: REG_RCR differs from regrcr: 0x70006009 insted of 0x700060ce
> [ 327.234588] [pid:7,cpu7,kworker/u16:0,5]BEFORE: REG_RCR differs from regrcr: 0x1830d33 insted of 0x7000604e


My patch was messed up, but it got the information that I wanted, which is shown in the quoted lines above. One of these differs only in the low-order byte, while the other 2 are completely different. Strange!

It is possible that there is a firmware error. My system, which does not show the problem, reports the following:

[54130.741148] usb 3-6: RTL8192CU rev A (TSMC) romver 0, 2T2R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[54130.741153] usb 3-6: RTL8192CU MAC: xx:xx:xx:xx:xx:xx
[54130.741155] usb 3-6: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[54130.742301] usb 3-6: Firmware revision 88.2 (signature 0x88c1)

Which firmware does your unit use?

Attached is a new test patch. When it logs a CORRUPTED value, I would like to know what task is attached to the pid listed in the message. Note that the two instances where the entire word was wrong came from pid:7.

Could improper locking could produce these results?

Larry
diff --git a/Makefile b/Makefile
index f5543eef4f82..6d985a175d78 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 6
-PATCHLEVEL = 3
+PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION =
+EXTRAVERSION = -rc0
 NAME = Hurr durr I'ma ninja sloth
 
 # *DOCUMENTATION*
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 831639d73657..9d778400d2b9 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -4864,6 +4864,10 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	u32 val32;
 	u8 val8;
 
+	if (priv->regrcr != rtl8xxxu_read32(priv, REG_RCR)) {
+		pr_info("REG_RCR corrupted in %s: 0x%x insted of 0x%x\n",
+			__func__, rtl8xxxu_read32(priv, REG_RCR), priv->regrcr);
+	}
 	rarpt = &priv->ra_report;
 
 	if (changed & BSS_CHANGED_ASSOC) {
@@ -6504,6 +6508,10 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw,
 	struct rtl8xxxu_priv *priv = hw->priv;
 	u32 rcr = priv->regrcr;
 
+	if (priv->regrcr != rtl8xxxu_read32(priv, REG_RCR)) {
+		pr_info("REG_RCR corrupted in %s: 0x%x insted of 0x%x\n",
+			__func__, rtl8xxxu_read32(priv, REG_RCR), priv->regrcr);
+	}
 	dev_dbg(&priv->udev->dev, "%s: changed_flags %08x, total_flags %08x\n",
 		__func__, changed_flags, *total_flags);
 

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux