mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandr Shashkin <dutyrok@altlinux.org>
To: linux-kernel@vger.kernel.org
Cc: Alexandr Shashkin <dutyrok@altlinux.org>,
	stable@vger.kernel.org, lvc-project@linuxtesting.org,
	Johannes Berg <johannes@sipsolutions.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kovalev@altlinux.org,
	syzbot+de87c09cc7b964ea2e23@syzkaller.appspotmail.com,
	Johannes Berg <johannes.berg@intel.com>,
	Alexander Ofitserov <oficerovas@altlinux.org>
Subject: [PATCH v2 5.10/5.15] wifi: mac80211: apply mcast rate only if interface is up
Date: Fri,  9 Aug 2024 17:31:22 +0300	[thread overview]
Message-ID: <20240809143122.534704-1-dutyrok@altlinux.org> (raw)

[ 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


                 reply	other threads:[~2024-08-09 14:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240809143122.534704-1-dutyrok@altlinux.org \
    --to=dutyrok@altlinux.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=kovalev@altlinux.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=oficerovas@altlinux.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+de87c09cc7b964ea2e23@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®