Commit ef51fb1d authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Johannes Berg

cfg80211: avoid reg-hints in self-managed only systems

When a system contains only self-managed regulatory devices all hints
from the regulatory core are ignored. Stop hint processing early in this
case. These systems usually don't have CRDA deployed, which results in
endless (irrelevent) logs of the form:
cfg80211: Calling CRDA to update world regulatory domain

Make sure there's at least one self-managed device before discarding a
hint, in order to prevent initial hints from disappearing on CRDA
managed systems.
Signed-off-by: default avatarArik Nemtsov <>
Signed-off-by: default avatarJohannes Berg <>
parent 2c3e861c
......@@ -2108,6 +2108,26 @@ out_free:
static bool reg_only_self_managed_wiphys(void)
struct cfg80211_registered_device *rdev;
struct wiphy *wiphy;
bool self_managed_found = false;
list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
wiphy = &rdev->wiphy;
if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED)
self_managed_found = true;
return false;
/* make sure at least one self-managed wiphy exists */
return self_managed_found;
* Processes regulatory hints, this is all the NL80211_REGDOM_SET_BY_*
* Regulatory hints come on a first come first serve basis and we
......@@ -2139,6 +2159,11 @@ static void reg_process_pending_hints(void)
if (reg_only_self_managed_wiphys()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment