]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS
authorJohannes Berg <johannes.berg@intel.com>
Thu, 23 Jun 2022 07:48:00 +0000 (09:48 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:14 +0000 (11:43 +0200)
There are a few places that check ps_sdata and/or the dynamic
PS timeout, but they're erroneous in case SUPPORTS_DYNAMIC_PS
is set by the driver.

Skip the entire recalculation in this case so we cannot get
into those paths elsewhere, and so we simplify this for the
purpose of implementing MLO.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 52a41416b8bb26629909494b076b493499e81420..e5c058db451d5e73ed6e65936d5174dcd9ab0120 100644 (file)
@@ -1787,7 +1787,8 @@ void ieee80211_recalc_ps(struct ieee80211_local *local)
        int count = 0;
        int timeout;
 
-       if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS)) {
+       if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS) ||
+           ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) {
                local->ps_sdata = NULL;
                return;
        }