Linux wireless drivers development
 help / color / mirror / Atom feed
* Should we check netif_running in cfg80211_calculate_bi_data?
@ 2018-10-22 20:27 Ben Greear
  2018-10-23  9:32 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2018-10-22 20:27 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-23 20:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-22 20:27 Should we check netif_running in cfg80211_calculate_bi_data? Ben Greear
2018-10-23  9:32 ` 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

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