mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
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: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230428150833.218605-10-martin.kaistra@linutronix.de
This commit is contained in:
committed by
Kalle Valo
parent
2be2eed4c3
commit
40d02ff2b1
@@ -6830,7 +6830,8 @@ static u8 rtl8xxxu_signal_to_snr(int signal)
|
||||
}
|
||||
|
||||
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;
|
||||
u16 wireless_mode;
|
||||
@@ -6864,7 +6865,7 @@ static void rtl8xxxu_refresh_rate_mask(struct rtl8xxxu_priv *priv,
|
||||
else
|
||||
rssi_level = RTL8XXXU_RATR_STA_LOW;
|
||||
|
||||
if (rssi_level != priv->rssi_level) {
|
||||
if (rssi_level != priv->rssi_level || force) {
|
||||
int sgi = 0;
|
||||
u32 rate_bitmap = 0;
|
||||
|
||||
@@ -7080,7 +7081,7 @@ static void rtl8xxxu_watchdog_callback(struct work_struct *work)
|
||||
if (priv->fops->set_crystal_cap)
|
||||
rtl8xxxu_track_cfo(priv);
|
||||
|
||||
rtl8xxxu_refresh_rate_mask(priv, signal, sta);
|
||||
rtl8xxxu_refresh_rate_mask(priv, signal, sta, false);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user