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.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index f180db0de66c..edccc093e71b 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -723,7 +723,9 @@ EXPORT_SYMBOL(freq_reg_info);
723 * on the wiphy with the target_bw specified. Then we can simply use 723 * on the wiphy with the target_bw specified. Then we can simply use
724 * that below for the desired_bw_khz below. 724 * that below for the desired_bw_khz below.
725 */ 725 */
726static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band, 726static void handle_channel(struct wiphy *wiphy,
727 enum nl80211_reg_initiator initiator,
728 enum ieee80211_band band,
727 unsigned int chan_idx) 729 unsigned int chan_idx)
728{ 730{
729 int r; 731 int r;
@@ -787,7 +789,9 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
787 chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp); 789 chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp);
788} 790}
789 791
790static void handle_band(struct wiphy *wiphy, enum ieee80211_band band) 792static void handle_band(struct wiphy *wiphy,
793 enum ieee80211_band band,
794 enum nl80211_reg_initiator initiator)
791{ 795{
792 unsigned int i; 796 unsigned int i;
793 struct ieee80211_supported_band *sband; 797 struct ieee80211_supported_band *sband;
@@ -796,7 +800,7 @@ static void handle_band(struct wiphy *wiphy, enum ieee80211_band band)
796 sband = wiphy->bands[band]; 800 sband = wiphy->bands[band];
797 801
798 for (i = 0; i < sband->n_channels; i++) 802 for (i = 0; i < sband->n_channels; i++)
799 handle_channel(wiphy, band, i); 803 handle_channel(wiphy, initiator, band, i);
800} 804}
801 805
802static bool ignore_reg_update(struct wiphy *wiphy, 806static bool ignore_reg_update(struct wiphy *wiphy,
@@ -812,6 +816,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
812 * desired regulatory domain set 816 * desired regulatory domain set
813 */ 817 */
814 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd && 818 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd &&
819 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
815 !is_world_regdom(last_request->alpha2)) 820 !is_world_regdom(last_request->alpha2))
816 return true; 821 return true;
817 return false; 822 return false;
@@ -1033,7 +1038,7 @@ void wiphy_update_regulatory(struct wiphy *wiphy,
1033 goto out; 1038 goto out;
1034 for (band = 0; band < IEEE80211_NUM_BANDS; band++) { 1039 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1035 if (wiphy->bands[band]) 1040 if (wiphy->bands[band])
1036 handle_band(wiphy, band); 1041 handle_band(wiphy, band, initiator);
1037 } 1042 }
1038out: 1043out:
1039 reg_process_beacons(wiphy); 1044 reg_process_beacons(wiphy);
@@ -1170,7 +1175,7 @@ static int ignore_request(struct wiphy *wiphy,
1170 return 0; 1175 return 0;
1171 return -EALREADY; 1176 return -EALREADY;
1172 } 1177 }
1173 return REG_INTERSECT; 1178 return 0;
1174 case NL80211_REGDOM_SET_BY_DRIVER: 1179 case NL80211_REGDOM_SET_BY_DRIVER:
1175 if (last_request->initiator == NL80211_REGDOM_SET_BY_CORE) { 1180 if (last_request->initiator == NL80211_REGDOM_SET_BY_CORE) {
1176 if (regdom_changes(pending_request->alpha2)) 1181 if (regdom_changes(pending_request->alpha2))