Commit 40d02ff2 authored by Martin Kaistra's avatar Martin Kaistra Committed by Kalle Valo

wifi: rtl8xxxu: Add parameter force to rtl8xxxu_refresh_rate_mask

In AP mode, when multiple STAs connect to us, we need to set an initial
rate mask for each of them. This initialisation should happen regardless
of the rssi_level saved in the priv struct.

Add a parameter called force to rtl8xxxu_refresh_rate_mask() which will
be used for this initialisation.
Signed-off-by: default avatarMartin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230428150833.218605-10-martin.kaistra@linutronix.de
parent 2be2eed4
...@@ -6830,7 +6830,8 @@ static u8 rtl8xxxu_signal_to_snr(int signal) ...@@ -6830,7 +6830,8 @@ static u8 rtl8xxxu_signal_to_snr(int signal)
} }
static void rtl8xxxu_refresh_rate_mask(struct rtl8xxxu_priv *priv, static void rtl8xxxu_refresh_rate_mask(struct rtl8xxxu_priv *priv,
int signal, struct ieee80211_sta *sta) int signal, struct ieee80211_sta *sta,
bool force)
{ {
struct ieee80211_hw *hw = priv->hw; struct ieee80211_hw *hw = priv->hw;
u16 wireless_mode; u16 wireless_mode;
...@@ -6864,7 +6865,7 @@ static void rtl8xxxu_refresh_rate_mask(struct rtl8xxxu_priv *priv, ...@@ -6864,7 +6865,7 @@ static void rtl8xxxu_refresh_rate_mask(struct rtl8xxxu_priv *priv,
else else
rssi_level = RTL8XXXU_RATR_STA_LOW; rssi_level = RTL8XXXU_RATR_STA_LOW;
if (rssi_level != priv->rssi_level) { if (rssi_level != priv->rssi_level || force) {
int sgi = 0; int sgi = 0;
u32 rate_bitmap = 0; u32 rate_bitmap = 0;
...@@ -7080,7 +7081,7 @@ static void rtl8xxxu_watchdog_callback(struct work_struct *work) ...@@ -7080,7 +7081,7 @@ static void rtl8xxxu_watchdog_callback(struct work_struct *work)
if (priv->fops->set_crystal_cap) if (priv->fops->set_crystal_cap)
rtl8xxxu_track_cfo(priv); rtl8xxxu_track_cfo(priv);
rtl8xxxu_refresh_rate_mask(priv, signal, sta); rtl8xxxu_refresh_rate_mask(priv, signal, sta, false);
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment