From: Fiona Klute <fiona.klute@gmx.de>
To: linux-wireless@vger.kernel.org, Ping-Ke Shih <pkshih@realtek.com>
Cc: "Fiona Klute" <fiona.klute@gmx.de>,
"Kalle Valo" <kvalo@kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org, "Pavel Machek" <pavel@ucw.cz>,
"Ondřej Jirman" <megi@xff.cz>
Subject: [PATCH v3 8/9] wifi: rtw88: Reset 8703b firmware before download
Date: Sat, 9 Mar 2024 12:56:44 +0100 [thread overview]
Message-ID: <20240309115650.367204-9-fiona.klute@gmx.de> (raw)
In-Reply-To: <20240309115650.367204-1-fiona.klute@gmx.de>
Sometimes 8703b firmware is still active from previous use when the
driver needs to download the firmware during MAC activation. Reset it
in that case.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
drivers/net/wireless/realtek/rtw88/mac.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c
index 298663b0358..5fa38b1068e 100644
--- a/drivers/net/wireless/realtek/rtw88/mac.c
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
@@ -936,6 +936,12 @@ static int __rtw_download_firmware_legacy(struct rtw_dev *rtwdev,
{
int ret = 0;
+ /* reset firmware if still present */
+ if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B &&
+ rtw_read8_mask(rtwdev, REG_MCUFW_CTRL, BIT_RAM_DL_SEL)) {
+ rtw_write8(rtwdev, REG_MCUFW_CTRL, 0x00);
+ }
+
en_download_firmware_legacy(rtwdev, true);
ret = download_firmware_legacy(rtwdev, fw->firmware->data, fw->firmware->size);
en_download_firmware_legacy(rtwdev, false);
--
2.43.0
next prev parent reply other threads:[~2024-03-09 11:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 11:56 [PATCH v3 0/9] rtw88: Add support for RTL8723CS/RTL8703B Fiona Klute
2024-03-09 11:56 ` [PATCH v3 1/9] wifi: rtw88: Shared module for rtw8723x devices Fiona Klute
2024-03-09 11:56 ` [PATCH v3 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE Fiona Klute
2024-03-09 11:56 ` [PATCH v3 3/9] wifi: rtw88: Add definitions for 8703b chip Fiona Klute
2024-03-09 11:56 ` [PATCH v3 4/9] wifi: rtw88: Add rtw8703b.h Fiona Klute
2024-03-09 11:56 ` [PATCH v3 5/9] wifi: rtw88: Add rtw8703b.c Fiona Klute
2024-03-11 3:54 ` Ping-Ke Shih
2024-03-09 11:56 ` [PATCH v3 6/9] wifi: rtw88: Add rtw8703b_tables.h Fiona Klute
2024-03-09 11:56 ` [PATCH v3 7/9] wifi: rtw88: Add rtw8703b_tables.c Fiona Klute
2024-03-09 11:56 ` Fiona Klute [this message]
2024-03-09 11:56 ` [PATCH v3 9/9] wifi: rtw88: SDIO device driver for RTL8723CS Fiona Klute
2024-03-11 4:27 ` [PATCH v3 0/9] rtw88: Add support for RTL8723CS/RTL8703B Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240309115650.367204-9-fiona.klute@gmx.de \
--to=fiona.klute@gmx.de \
--cc=kvalo@kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=megi@xff.cz \
--cc=pavel@ucw.cz \
--cc=pkshih@realtek.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox