Skip to content

Commit

Permalink
wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Jul 15, 2022
1 parent c5c48a1 commit 28977e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 28977e7

Please sign in to comment.