diff options
author | Felix Fietkau <nbd@nbd.name> | 2024-02-21 15:05:35 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-02-23 09:22:52 +0100 |
commit | 413dafc8170fcb925fb17af8842f06af305f8e0b (patch) | |
tree | b8880b1eb234d3acbef4cca1da85686ffed88d6f /net/mac80211 | |
parent | MAINTAINERS: wifi: Add N: ath1*k entries to match .yaml files (diff) | |
download | linux-413dafc8170fcb925fb17af8842f06af305f8e0b.tar.xz linux-413dafc8170fcb925fb17af8842f06af305f8e0b.zip |
wifi: mac80211: only call drv_sta_rc_update for uploaded stations
When a station has not been uploaded yet, receiving SMPS or channel width
notification action frames can lead to rate_control_rate_update calling
drv_sta_rc_update with uninitialized driver private data.
Fix this by adding a missing check for sta->uploaded.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://msgid.link/20240221140535.16102-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index d5ea5f5bcf3a..9d33fd2377c8 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -119,7 +119,8 @@ void rate_control_rate_update(struct ieee80211_local *local, rcu_read_unlock(); } - drv_sta_rc_update(local, sta->sdata, &sta->sta, changed); + if (sta->uploaded) + drv_sta_rc_update(local, sta->sdata, &sta->sta, changed); } int ieee80211_rate_control_register(const struct rate_control_ops *ops) |