mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 5.10/5.15] wifi: mac80211: apply mcast rate only if interface is up
@ 2024-08-09 14:31 Alexandr Shashkin
  0 siblings, 0 replies; only message in thread
From: Alexandr Shashkin @ 2024-08-09 14:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexandr Shashkin, stable, lvc-project, Johannes Berg,
	David S. Miller, Jakub Kicinski, Greg Kroah-Hartman, kovalev,
	syzbot+de87c09cc7b964ea2e23, Johannes Berg, Alexander Ofitserov

[ Upstream commit 02c665f048a439c0d58cc45334c94634bd7c18e6 ]

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

Reported-by: syzbot+de87c09cc7b964ea2e23@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[oficerovas: Backported to 5.10 and 5.15]
Signed-off-by: Alexander Ofitserov <oficerovas@altlinux.org>
Signed-off-by: Alexandr Shashkin <dutyrok@altlinux.org>
---
Changes in v2:
- edit comment of oficerovas and add upstream commit
---
 net/mac80211/cfg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0c3da7771b48..13ac16026129 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -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;
 }
-- 
2.42.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-09 14:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-09 14:31 [PATCH v2 5.10/5.15] wifi: mac80211: apply mcast rate only if interface is up Alexandr Shashkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®