linux/drivers/net/wireless/realtek
Ping-Ke Shih a7e9c2e407 wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS
commit 3918dd0177 upstream.

This driver relies on IEEE80211_CONF_PS of hw->conf.flags to turn off PS or
turn on dynamic PS controlled by driver and firmware. Though this would be
incorrect, it did work before because the flag is always recalculated until
the commit 28977e790b ("wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS")
is introduced by kernel 5.20 to skip to recalculate IEEE80211_CONF_PS
of hw->conf.flags if driver sets SUPPORTS_DYNAMIC_PS.

Correct this by doing recalculation while BSS_CHANGED_PS is changed and
interface is added or removed. It is allowed to enter PS only if single
one station vif is working. Without this fix, driver doesn't enter PS
anymore that causes higher power consumption.

Fixes: bcde60e599 ("rtw88: remove misleading module parameter rtw_fw_support_lps")
Cc: stable@vger.kernel.org # 6.1+
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230527082939.11206-2-pkshih@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-14 11:15:34 +02:00
..
rtl8xxxu wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value 2023-06-09 10:34:14 +02:00
rtl818x
rtlwifi wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg() 2023-05-11 23:03:20 +09:00
rtw88 wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS 2023-06-14 11:15:34 +02:00
rtw89 wifi: rtw89: correct PS calculation for SUPPORTS_DYNAMIC_PS 2023-06-14 11:15:34 +02:00
Kconfig
Makefile