Commit e31f6456 authored by Amar Singhal's avatar Amar Singhal Committed by Johannes Berg
Browse files

cfg80211: never ignore user regulatory hint

Currently user regulatory hint is ignored if all wiphys
in the system are self managed. But the hint is not ignored
if there is no wiphy in the system. This affects the global
regulatory setting. Global regulatory setting needs to be
maintained so that it can be applied to a new wiphy entering
the system. Therefore, do not ignore user regulatory setting
even if all wiphys in the system are self managed.
Signed-off-by: default avatarAmar Singhal <>
Signed-off-by: default avatarJohannes Berg <>
parent 5cf3006c
......@@ -2240,7 +2240,9 @@ static void wiphy_update_regulatory(struct wiphy *wiphy,
* as some drivers used this to restore its orig_* reg domain.
if (initiator == NL80211_REGDOM_SET_BY_CORE &&
wiphy->regulatory_flags & REGULATORY_CUSTOM_REG)
wiphy->regulatory_flags & REGULATORY_CUSTOM_REG &&
!(wiphy->regulatory_flags &
reg_call_notifier(wiphy, lr);
......@@ -2787,26 +2789,6 @@ static void notify_self_managed_wiphys(struct regulatory_request *request)
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
......@@ -2839,10 +2821,6 @@ 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