@@ -156,9 +156,10 @@ struct regulatory_request {
* system. Conversely, a self-managed wiphy does not share its regulatory
* hints with other devices in the system. If a system contains several
* devices, one or more of which are self-managed, there might be
- * contradictory regulatory settings between them. Usage of flag is
- * generally discouraged. Only use it if the FW/driver is incompatible
- * with non-locally originated hints.
+ * contradictory regulatory settings between them. Regulatory information
+ * from trusted user space sources can still be passed to self-managed
+ * wiphy. Usage of this flag is generally discouraged. Only use it if the
+ * FW/driver is incompatible with non-locally originated hints.
* This flag is incompatible with the flags: %REGULATORY_CUSTOM_REG,
* %REGULATORY_STRICT_REG, %REGULATORY_COUNTRY_IE_FOLLOW_POWER,
* %REGULATORY_COUNTRY_IE_IGNORE and %REGULATORY_DISABLE_BEACON_HINTS.
@@ -2580,7 +2580,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
reg_free_request(reg_request);
}
-static bool reg_only_self_managed_wiphys(void)
+static bool reg_only_self_managed_wiphys(struct regulatory_request *reg_request)
{
struct cfg80211_registered_device *rdev;
struct wiphy *wiphy;
@@ -2590,10 +2590,16 @@ static bool reg_only_self_managed_wiphys(void)
list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
wiphy = &rdev->wiphy;
- if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED)
+ if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) {
self_managed_found = true;
- else
+ if (reg_request->initiator ==
+ NL80211_REGDOM_SET_BY_USER &&
+ reg_request->user_reg_hint_type ==
+ NL80211_USER_REG_HINT_CELL_BASE)
+ reg_call_notifier(wiphy, reg_request);
+ } else {
return false;
+ }
}
/* make sure at least one self-managed wiphy exists */
@@ -2631,7 +2637,7 @@ static void reg_process_pending_hints(void)
spin_unlock(®_requests_lock);
- if (reg_only_self_managed_wiphys()) {
+ if (reg_only_self_managed_wiphys(reg_request)) {
reg_free_request(reg_request);
return;
}