From: Ben Greear <greearb@candelatech.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Should we check netif_running in cfg80211_calculate_bi_data?
Date: Mon, 22 Oct 2018 13:27:53 -0700 [thread overview]
Message-ID: <8c876445-a065-ddb2-4dcf-e922f22a1b7d@candelatech.com> (raw)
I was testing on my 4.16 kernel with a bunch of VAPs and I had two configured
for 100 beacon interval, and more at 240. This failed for reasons I figured out
(gcd logic), but even once I tried to configure the vaps for 240 interval they
could not come up. I am thinking maybe it was because I could only re-configure
admin-up interfaces, and they couldn't come up due the gcd thing?
Anyway, while poking, I thought maybe the patch below would be helpful since
we shouldn't care about admin-down interfaces in this case?
diff --git a/net/wireless/util.c b/net/wireless/util.c
index fbc880e..56d7583 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1541,6 +1541,9 @@ static void cfg80211_calculate_bi_data(struct wiphy *wiphy, u32 new_beacon_int,
if (wdev->beacon_interval == *beacon_int_gcd)
continue;
+ if (!netif_running(wdev->netdev))
+ continue;
+
*beacon_int_different = true;
*beacon_int_gcd = gcd(*beacon_int_gcd, wdev->beacon_interval);
}
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next reply other threads:[~2018-10-22 20:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-22 20:27 Ben Greear [this message]
2018-10-23 9:32 ` Should we check netif_running in cfg80211_calculate_bi_data? Johannes Berg
2018-10-23 19:19 ` Ben Greear
2018-10-23 19:53 ` Johannes Berg
2018-10-23 20:22 ` Ben Greear
2018-10-23 20:26 ` Johannes Berg
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=8c876445-a065-ddb2-4dcf-e922f22a1b7d@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
/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