rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
Subsystems (3)
PATCH v2 1/1 rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
The RTL8723BU has problems connecting to AP after each warm reboot. Sometimes it returns no scan result, and in most cases, it fails the authentication for unknown reason. However, it works totally fine after cold reboot.
Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE for cold reboot and warm reboot, the registers imply that the MAC is already powered and thus some procedures are skipped during driver initialization. Double checked the vendor driver, it reads the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any during initialization based on them. This commit only tells the RTL8723BU to do full initialization without checking MAC status.
---
Note:
v2: fix typo of commit message
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +++ 3 files changed, 5 insertions(+)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +1 -0
@@ -1425,6 +1425,7 @@ struct rtl8xxxu_fileops { u8 has_s0s1:1; u8 has_tx_report:1; u8 gen2_thermal_meter:1; + u8 needs_full_init:1;u32 adda_1t_init;u32 adda_1t_path_on;u32 adda_2t_path_on_a;
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c +1 -0
@@ -1668,6 +1668,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops = { .has_s0s1 = 1, .has_tx_report = 1, .gen2_thermal_meter = 1, + .needs_full_init = 1, .adda_1t_init = 0x01c00014, .adda_1t_path_on = 0x01c00014, .adda_2t_path_on_a = 0x01c00014,
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +3 -0
@@ -3900,6 +3900,9 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)else macpower = true; +if (fops->needs_full_init) + macpower = false; + ret = fops->power_on (priv);if (ret <0 ) {dev_warn (dev,"%s: Failed power on\n" , __func__);
Signature · 1 line
2.23.0
Quoted 14 lines · Chris Chiu
The RTL8723BU has problems connecting to AP after each warm reboot. Sometimes it returns no scan result, and in most cases, it fails the authentication for unknown reason. However, it works totally fine after cold reboot.
Compare the value of register
SYS_CRandSYS_CLK_MAC_CLK_ENABLEfor cold reboot and warm reboot, the registers imply that the MAC is already powered and thus some procedures are skipped during driver initialization. Double checked the vendor driver, it reads theSYS_CRandSYS_CLK_MAC_CLK_ENABLEalso but doesn't skip any during initialization based on them. This commit only tells the RTL8723BU to do full initialization without checking MAC status.
Quoted 1 line
Signed-off-by Chris Chiu <[email protected]>
Sorry, I forgot to add Jes.
Chris
Quoted 6 lines
---
Note:
v2: fix typo of commit message
Quoted 16 lines · Chris Chiu
Quoted 14 lines · Chris Chiu
The RTL8723BU has problems connecting to AP after each warm reboot. Sometimes it returns no scan result, and in most cases, it fails the authentication for unknown reason. However, it works totally fine after cold reboot.
Compare the value of register
SYS_CRandSYS_CLK_MAC_CLK_ENABLEfor cold reboot and warm reboot, the registers imply that the MAC is already powered and thus some procedures are skipped during driver initialization. Double checked the vendor driver, it reads theSYS_CRandSYS_CLK_MAC_CLK_ENABLEalso but doesn't skip any during initialization based on them. This commit only tells the RTL8723BU to do full initialization without checking MAC status.
Quoted 12 lines
Quoted 1 line
Signed-off-by Chris Chiu <[email protected]>Signed-off-by Jes Sorensen <[email protected]>Sorry, I forgot to add Jes.
Chris
Quoted 6 lines
---
Note:
v2: fix typo of commit message
Gentle ping. Cheers.
Chris
Quoted 23 lines · Chris Chiu
Quoted 22 lines · Chris Chiu
Quoted 14 lines · Chris Chiu
The RTL8723BU has problems connecting to AP after each warm reboot. Sometimes it returns no scan result, and in most cases, it fails the authentication for unknown reason. However, it works totally fine after cold reboot.
Compare the value of register
SYS_CRandSYS_CLK_MAC_CLK_ENABLEfor cold reboot and warm reboot, the registers imply that the MAC is already powered and thus some procedures are skipped during driver initialization. Double checked the vendor driver, it reads theSYS_CRandSYS_CLK_MAC_CLK_ENABLEalso but doesn't skip any during initialization based on them. This commit only tells the RTL8723BU to do full initialization without checking MAC status.Quoted 1 line
Signed-off-by Chris Chiu <[email protected]>Signed-off-by Jes Sorensen <[email protected]>Sorry, I forgot to add Jes.
Chris
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
---
Note:
v2: fix typo of commit messageGentle ping. Cheers.
To reduce email please avoid pinging like this, it has been only five days since you submitted this version and this is not a 24/7 service. I have documented how you can follow the status from patchwork:
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 13 lines · Chris Chiu
The RTL8723BU has problems connecting to AP after each warm reboot. Sometimes it returns no scan result, and in most cases, it fails the authentication for unknown reason. However, it works totally fine after cold reboot.
Compare the value of register
SYS_CRandSYS_CLK_MAC_CLK_ENABLEfor cold reboot and warm reboot, the registers imply that the MAC is already powered and thus some procedures are skipped during driver initialization. Double checked the vendor driver, it reads theSYS_CRandSYS_CLK_MAC_CLK_ENABLEalso but doesn't skip any during initialization based on them. This commit only tells the RTL8723BU to do full initialization without checking MAC status.
Quoted 2 lines
Signed-off-by Chris Chiu <[email protected]>Signed-off-by Jes Sorensen <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
0eeb91ade90c rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
Signature · 3 lines
https://patchwork.kernel.org/patch/11192201/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches