mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
67 lines
1.9 KiB
Diff
67 lines
1.9 KiB
Diff
|
From 3f9baa99f8429ea6f56e7cc8d881c027518e9573 Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Kaistra <martin.kaistra@linutronix.de>
|
||
|
Date: Fri, 22 Dec 2023 11:14:34 +0100
|
||
|
Subject: [PATCH 13/21] wifi: rtl8xxxu: support multiple interfaces in
|
||
|
watchdog_callback()
|
||
|
|
||
|
Check first whether priv->vifs[0] exists and is of type STATION, then go
|
||
|
to priv->vifs[1]. Make sure to call refresh_rate_mask for both
|
||
|
interfaces.
|
||
|
|
||
|
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
|
||
|
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
|
||
|
Signed-off-by: Kalle Valo <kvalo@kernel.org>
|
||
|
Link: https://msgid.link/20231222101442.626837-14-martin.kaistra@linutronix.de
|
||
|
---
|
||
|
.../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 19 +++++++++++--------
|
||
|
1 file changed, 11 insertions(+), 8 deletions(-)
|
||
|
|
||
|
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
|
||
|
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
|
||
|
@@ -7200,11 +7200,15 @@ static void rtl8xxxu_watchdog_callback(s
|
||
|
{
|
||
|
struct ieee80211_vif *vif;
|
||
|
struct rtl8xxxu_priv *priv;
|
||
|
+ int i;
|
||
|
|
||
|
priv = container_of(work, struct rtl8xxxu_priv, ra_watchdog.work);
|
||
|
- vif = priv->vif;
|
||
|
+ for (i = 0; i < ARRAY_SIZE(priv->vifs); i++) {
|
||
|
+ vif = priv->vifs[i];
|
||
|
+
|
||
|
+ if (!vif || vif->type != NL80211_IFTYPE_STATION)
|
||
|
+ continue;
|
||
|
|
||
|
- if (vif && vif->type == NL80211_IFTYPE_STATION) {
|
||
|
int signal;
|
||
|
struct ieee80211_sta *sta;
|
||
|
|
||
|
@@ -7215,22 +7219,21 @@ static void rtl8xxxu_watchdog_callback(s
|
||
|
|
||
|
dev_dbg(dev, "%s: no sta found\n", __func__);
|
||
|
rcu_read_unlock();
|
||
|
- goto out;
|
||
|
+ continue;
|
||
|
}
|
||
|
rcu_read_unlock();
|
||
|
|
||
|
signal = ieee80211_ave_rssi(vif);
|
||
|
|
||
|
- priv->fops->report_rssi(priv, 0,
|
||
|
+ priv->fops->report_rssi(priv, rtl8xxxu_get_macid(priv, sta),
|
||
|
rtl8xxxu_signal_to_snr(signal));
|
||
|
|
||
|
- if (priv->fops->set_crystal_cap)
|
||
|
- rtl8xxxu_track_cfo(priv);
|
||
|
-
|
||
|
rtl8xxxu_refresh_rate_mask(priv, signal, sta, false);
|
||
|
}
|
||
|
|
||
|
-out:
|
||
|
+ if (priv->fops->set_crystal_cap)
|
||
|
+ rtl8xxxu_track_cfo(priv);
|
||
|
+
|
||
|
schedule_delayed_work(&priv->ra_watchdog, 2 * HZ);
|
||
|
}
|
||
|
|