aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 9f3aa5cabdef..18fc37b6f2bd 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -751,9 +751,10 @@ static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
751 chan->center_freq, 751 chan->center_freq,
752 KHZ_TO_MHZ(desired_bw_khz)); 752 KHZ_TO_MHZ(desired_bw_khz));
753 753
754 REG_DBG_PRINT("%d KHz - %d KHz @ KHz), (%s mBi, %d mBm)\n", 754 REG_DBG_PRINT("%d KHz - %d KHz @ %d KHz), (%s mBi, %d mBm)\n",
755 freq_range->start_freq_khz, 755 freq_range->start_freq_khz,
756 freq_range->end_freq_khz, 756 freq_range->end_freq_khz,
757 freq_range->max_bandwidth_khz,
757 max_antenna_gain, 758 max_antenna_gain,
758 power_rule->max_eirp); 759 power_rule->max_eirp);
759} 760}
@@ -910,14 +911,6 @@ static bool ignore_reg_update(struct wiphy *wiphy,
910 return false; 911 return false;
911} 912}
912 913
913static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
914{
915 struct cfg80211_registered_device *rdev;
916
917 list_for_each_entry(rdev, &cfg80211_rdev_list, list)
918 wiphy_update_regulatory(&rdev->wiphy, initiator);
919}
920
921static void handle_reg_beacon(struct wiphy *wiphy, 914static void handle_reg_beacon(struct wiphy *wiphy,
922 unsigned int chan_idx, 915 unsigned int chan_idx,
923 struct reg_beacon *reg_beacon) 916 struct reg_beacon *reg_beacon)
@@ -1117,11 +1110,13 @@ static void reg_process_ht_flags(struct wiphy *wiphy)
1117 1110
1118} 1111}
1119 1112
1120void wiphy_update_regulatory(struct wiphy *wiphy, 1113static void wiphy_update_regulatory(struct wiphy *wiphy,
1121 enum nl80211_reg_initiator initiator) 1114 enum nl80211_reg_initiator initiator)
1122{ 1115{
1123 enum ieee80211_band band; 1116 enum ieee80211_band band;
1124 1117
1118 assert_reg_lock();
1119
1125 if (ignore_reg_update(wiphy, initiator)) 1120 if (ignore_reg_update(wiphy, initiator))
1126 return; 1121 return;
1127 1122
@@ -1136,6 +1131,22 @@ void wiphy_update_regulatory(struct wiphy *wiphy,
1136 wiphy->reg_notifier(wiphy, last_request); 1131 wiphy->reg_notifier(wiphy, last_request);
1137} 1132}
1138 1133
1134void regulatory_update(struct wiphy *wiphy,
1135 enum nl80211_reg_initiator setby)
1136{
1137 mutex_lock(&reg_mutex);
1138 wiphy_update_regulatory(wiphy, setby);
1139 mutex_unlock(&reg_mutex);
1140}
1141
1142static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
1143{
1144 struct cfg80211_registered_device *rdev;
1145
1146 list_for_each_entry(rdev, &cfg80211_rdev_list, list)
1147 wiphy_update_regulatory(&rdev->wiphy, initiator);
1148}
1149
1139static void handle_channel_custom(struct wiphy *wiphy, 1150static void handle_channel_custom(struct wiphy *wiphy,
1140 enum ieee80211_band band, 1151 enum ieee80211_band band,
1141 unsigned int chan_idx, 1152 unsigned int chan_idx,