<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From: Felix Fietkau &lt;nbd@nbd.name&gt;
Date: Wed, 21 Feb 2024 14:41:40 +0100
Subject: [PATCH] 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-&gt;uploaded.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
---

--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -119,7 +119,8 @@ void rate_control_rate_update(struct iee
 		rcu_read_unlock();
 	}
 
-	drv_sta_rc_update(local, sta-&gt;sdata, &amp;sta-&gt;sta, changed);
+	if (sta-&gt;uploaded)
+		drv_sta_rc_update(local, sta-&gt;sdata, &amp;sta-&gt;sta, changed);
 }
 
 int ieee80211_rate_control_register(const struct rate_control_ops *ops)
</pre></body></html>