[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2170471a1c144adb882d06e08f3c9d1a@realtek.com>
Date: Mon, 19 Jul 2021 05:47:01 +0000
From: Pkshih <pkshih@...ltek.com>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: "tony0620emma@...il.com" <tony0620emma@...il.com>,
"kvalo@...eaurora.org" <kvalo@...eaurora.org>,
"johannes@...solutions.net" <johannes@...solutions.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Neo Jou <neojou@...il.com>,
Jernej Skrabec <jernej.skrabec@...il.com>
Subject: RE: [PATCH RFC v1 2/7] rtw88: Use rtw_iterate_vifs where the iterator reads or writes registers
> -----Original Message-----
> From: Martin Blumenstingl [mailto:martin.blumenstingl@...glemail.com]
> Sent: Sunday, July 18, 2021 4:41 AM
> To: linux-wireless@...r.kernel.org
> Cc: tony0620emma@...il.com; kvalo@...eaurora.org; johannes@...solutions.net; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; Neo Jou; Jernej Skrabec; Martin Blumenstingl
> Subject: [PATCH RFC v1 2/7] rtw88: Use rtw_iterate_vifs where the iterator reads or writes registers
>
> Upcoming SDIO support may sleep in the read/write handlers. Switch
> all users of rtw_iterate_vifs_atomic() which are either reading or
> writing a register to rtw_iterate_vifs().
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
> ---
> drivers/net/wireless/realtek/rtw88/main.c | 6 +++---
> drivers/net/wireless/realtek/rtw88/ps.c | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index c6364837e83b..207161a8f5bd 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -229,8 +229,8 @@ static void rtw_watch_dog_work(struct work_struct *work)
> rtw_phy_dynamic_mechanism(rtwdev);
>
> data.rtwdev = rtwdev;
> - /* use atomic version to avoid taking local->iflist_mtx mutex */
> - rtw_iterate_vifs_atomic(rtwdev, rtw_vif_watch_dog_iter, &data);
> +
> + rtw_iterate_vifs(rtwdev, rtw_vif_watch_dog_iter, &data);
You revert the fix of [1].
I think we can move out rtw_chip_cfg_csi_rate() from rtw_dynamic_csi_rate(), and
add/set a field cfg_csi_rate to itera data. Then, we do rtw_chip_cfg_csi_rate()
outside iterate function. Therefore, we can keep the atomic version of iterate_vifs.
[1] https://lore.kernel.org/linux-wireless/1556886547-23632-1-git-send-email-sgruszka@redhat.com/
--
Ping-Ke
Powered by blists - more mailing lists