diff options
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 4dab993ea488..0990059f7e48 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -816,12 +816,23 @@ static void handle_band(struct ieee80211_supported_band *sband) | |||
816 | handle_channel(&sband->channels[i]); | 816 | handle_channel(&sband->channels[i]); |
817 | } | 817 | } |
818 | 818 | ||
819 | static bool ignore_reg_update(struct wiphy *wiphy, enum reg_set_by setby) | ||
820 | { | ||
821 | if (!last_request) | ||
822 | return true; | ||
823 | if (setby == REGDOM_SET_BY_CORE && | ||
824 | wiphy->fw_handles_regulatory) | ||
825 | return true; | ||
826 | return false; | ||
827 | } | ||
828 | |||
819 | static void update_all_wiphy_regulatory(enum reg_set_by setby) | 829 | static void update_all_wiphy_regulatory(enum reg_set_by setby) |
820 | { | 830 | { |
821 | struct cfg80211_registered_device *drv; | 831 | struct cfg80211_registered_device *drv; |
822 | 832 | ||
823 | list_for_each_entry(drv, &cfg80211_drv_list, list) | 833 | list_for_each_entry(drv, &cfg80211_drv_list, list) |
824 | wiphy_update_regulatory(&drv->wiphy, setby); | 834 | if (!ignore_reg_update(&drv->wiphy, setby)) |
835 | wiphy_update_regulatory(&drv->wiphy, setby); | ||
825 | } | 836 | } |
826 | 837 | ||
827 | void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby) | 838 | void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby) |