|
@@ -2768,6 +2768,21 @@ out_free:
|
|
|
reg_free_request(reg_request);
|
|
|
}
|
|
|
|
|
|
+static void notify_self_managed_wiphys(struct regulatory_request *request)
|
|
|
+{
|
|
|
+ struct cfg80211_registered_device *rdev;
|
|
|
+ struct wiphy *wiphy;
|
|
|
+
|
|
|
+ list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
|
|
|
+ wiphy = &rdev->wiphy;
|
|
|
+ if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED &&
|
|
|
+ request->initiator == NL80211_REGDOM_SET_BY_USER &&
|
|
|
+ request->user_reg_hint_type ==
|
|
|
+ NL80211_USER_REG_HINT_CELL_BASE)
|
|
|
+ reg_call_notifier(wiphy, request);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static bool reg_only_self_managed_wiphys(void)
|
|
|
{
|
|
|
struct cfg80211_registered_device *rdev;
|
|
@@ -2819,6 +2834,7 @@ static void reg_process_pending_hints(void)
|
|
|
|
|
|
spin_unlock(®_requests_lock);
|
|
|
|
|
|
+ notify_self_managed_wiphys(reg_request);
|
|
|
if (reg_only_self_managed_wiphys()) {
|
|
|
reg_free_request(reg_request);
|
|
|
return;
|
|
@@ -3698,17 +3714,26 @@ EXPORT_SYMBOL(regulatory_set_wiphy_regd_sync_rtnl);
|
|
|
|
|
|
void wiphy_regulatory_register(struct wiphy *wiphy)
|
|
|
{
|
|
|
- struct regulatory_request *lr;
|
|
|
+ struct regulatory_request *lr = get_last_request();
|
|
|
|
|
|
- /* self-managed devices ignore external hints */
|
|
|
- if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED)
|
|
|
+ /* self-managed devices ignore beacon hints and country IE */
|
|
|
+ if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) {
|
|
|
wiphy->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS |
|
|
|
REGULATORY_COUNTRY_IE_IGNORE;
|
|
|
|
|
|
+ /*
|
|
|
+ * The last request may have been received before this
|
|
|
+ * registration call. Call the driver notifier if
|
|
|
+ * initiator is USER and user type is CELL_BASE.
|
|
|
+ */
|
|
|
+ if (lr->initiator == NL80211_REGDOM_SET_BY_USER &&
|
|
|
+ lr->user_reg_hint_type == NL80211_USER_REG_HINT_CELL_BASE)
|
|
|
+ reg_call_notifier(wiphy, lr);
|
|
|
+ }
|
|
|
+
|
|
|
if (!reg_dev_ignore_cell_hint(wiphy))
|
|
|
reg_num_devs_support_basehint++;
|
|
|
|
|
|
- lr = get_last_request();
|
|
|
wiphy_update_regulatory(wiphy, lr->initiator);
|
|
|
wiphy_all_share_dfs_chan_state(wiphy);
|
|
|
}
|