2023-12-18 14:37:55

by Martin Kaistra

[permalink] [raw]
Subject: [PATCH 12/20] wifi: rtl8xxxu: support multiple interfaces in watchdog_callback()

Check first whether priv->vifs[0] exists and is of type STATION, otherwise
go to priv->vifs[1].

Signed-off-by: Martin Kaistra <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index f54d7b1647792..0d171f61ac8e8 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -7190,7 +7190,9 @@ static void rtl8xxxu_watchdog_callback(struct work_struct *work)
struct rtl8xxxu_priv *priv;

priv = container_of(work, struct rtl8xxxu_priv, ra_watchdog.work);
- vif = priv->vif;
+ vif = priv->vifs[0];
+ if (vif && vif->type != NL80211_IFTYPE_STATION)
+ vif = priv->vifs[1];

if (vif && vif->type == NL80211_IFTYPE_STATION) {
int signal;
--
2.39.2



2023-12-20 06:06:23

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH 12/20] wifi: rtl8xxxu: support multiple interfaces in watchdog_callback()



> -----Original Message-----
> From: Martin Kaistra <[email protected]>
> Sent: Monday, December 18, 2023 10:37 PM
> To: [email protected]
> Cc: Jes Sorensen <[email protected]>; Kalle Valo <[email protected]>; Ping-Ke Shih
> <[email protected]>; Bitterblue Smith <[email protected]>; Sebastian Andrzej Siewior
> <[email protected]>
> Subject: [PATCH 12/20] wifi: rtl8xxxu: support multiple interfaces in watchdog_callback()
>
> Check first whether priv->vifs[0] exists and is of type STATION, otherwise
> go to priv->vifs[1].
>
> Signed-off-by: Martin Kaistra <[email protected]>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index f54d7b1647792..0d171f61ac8e8 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -7190,7 +7190,9 @@ static void rtl8xxxu_watchdog_callback(struct work_struct *work)

This patch is fine. But, we need to extend this function to support
multiple sta to rtl8xxxu_refresh_rate_mask(sta) at least.

Ping-Ke