Loading net/wireless/reg.c +29 −4 Original line number Diff line number Diff line Loading @@ -2142,6 +2142,21 @@ static void reg_process_hint(struct regulatory_request *reg_request) 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; Loading Loading @@ -2193,6 +2208,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; Loading Loading @@ -3073,17 +3089,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); } Loading Loading
net/wireless/reg.c +29 −4 Original line number Diff line number Diff line Loading @@ -2142,6 +2142,21 @@ static void reg_process_hint(struct regulatory_request *reg_request) 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; Loading Loading @@ -2193,6 +2208,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; Loading Loading @@ -3073,17 +3089,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); } Loading