Skip to contentSkip to conversation

wifi: mac80211: apply mcast rate only if interface is up

PATCH New Alexandr Shashkin 1 participant 1 message Aug 9, 2024 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 wifi: mac80211: apply mcast rate only if interface is up

[ Upstream commit 02c665f048a439c0d58cc45334c94634bd7c18e6 ]

If the interface isn't enabled, don't apply multicast rate changes immediately.

Reported-by [email protected]
[oficerovas: Backported to 5.10 and 5.15]

---
Changes in v2:
- edit comment of oficerovas and add upstream commit

---
 net/mac80211/cfg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/cfg.c +2 -1
index 0c3da7771b48..13ac16026129 100644
@@ -2560,7 +2560,8 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
 	memcpy(sdata->vif.bss_conf.mcast_rate, rate,
 	       sizeof(int) * NUM_NL80211_BANDS);
 
-	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_MCAST_RATE);
+	if (ieee80211_sdata_running(sdata))
+		ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_MCAST_RATE);
 
 	return 0;
 }
Signature · 1 line
2.42.2