提交 99fff084 编写于 作者: C Chris Chiu 提交者: Yang Yingliang

rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot

[ Upstream commit 0eeb91ade90ce06d2fa1e2fcb55e3316b64c203c ]

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.
Signed-off-by: NChris Chiu <chiu@endlessm.com>
Signed-off-by: NJes Sorensen <Jes.Sorensen@gmail.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 31970194
...@@ -1349,6 +1349,7 @@ struct rtl8xxxu_fileops { ...@@ -1349,6 +1349,7 @@ struct rtl8xxxu_fileops {
u8 has_s0s1:1; u8 has_s0s1:1;
u8 has_tx_report:1; u8 has_tx_report:1;
u8 gen2_thermal_meter:1; u8 gen2_thermal_meter:1;
u8 needs_full_init:1;
u32 adda_1t_init; u32 adda_1t_init;
u32 adda_1t_path_on; u32 adda_1t_path_on;
u32 adda_2t_path_on_a; u32 adda_2t_path_on_a;
......
...@@ -1673,6 +1673,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops = { ...@@ -1673,6 +1673,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops = {
.has_s0s1 = 1, .has_s0s1 = 1,
.has_tx_report = 1, .has_tx_report = 1,
.gen2_thermal_meter = 1, .gen2_thermal_meter = 1,
.needs_full_init = 1,
.adda_1t_init = 0x01c00014, .adda_1t_init = 0x01c00014,
.adda_1t_path_on = 0x01c00014, .adda_1t_path_on = 0x01c00014,
.adda_2t_path_on_a = 0x01c00014, .adda_2t_path_on_a = 0x01c00014,
......
...@@ -3905,6 +3905,9 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw) ...@@ -3905,6 +3905,9 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
else else
macpower = true; macpower = true;
if (fops->needs_full_init)
macpower = false;
ret = fops->power_on(priv); ret = fops->power_on(priv);
if (ret < 0) { if (ret < 0) {
dev_warn(dev, "%s: Failed power on\n", __func__); dev_warn(dev, "%s: Failed power on\n", __func__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册