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.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index a0ec143ba3dc..7da67fd0b418 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -787,7 +787,6 @@ const char *reg_initiator_name(enum nl80211_reg_initiator initiator)
787EXPORT_SYMBOL(reg_initiator_name); 787EXPORT_SYMBOL(reg_initiator_name);
788 788
789#ifdef CONFIG_CFG80211_REG_DEBUG 789#ifdef CONFIG_CFG80211_REG_DEBUG
790
791static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan, 790static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
792 const struct ieee80211_reg_rule *reg_rule) 791 const struct ieee80211_reg_rule *reg_rule)
793{ 792{
@@ -974,6 +973,13 @@ static bool reg_dev_ignore_cell_hint(struct wiphy *wiphy)
974} 973}
975#endif 974#endif
976 975
976static bool wiphy_strict_alpha2_regd(struct wiphy *wiphy)
977{
978 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY &&
979 !(wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY))
980 return true;
981 return false;
982}
977 983
978static bool ignore_reg_update(struct wiphy *wiphy, 984static bool ignore_reg_update(struct wiphy *wiphy,
979 enum nl80211_reg_initiator initiator) 985 enum nl80211_reg_initiator initiator)
@@ -1000,7 +1006,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
1000 * wiphy->regd will be set once the device has its own 1006 * wiphy->regd will be set once the device has its own
1001 * desired regulatory domain set 1007 * desired regulatory domain set
1002 */ 1008 */
1003 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd && 1009 if (wiphy_strict_alpha2_regd(wiphy) && !wiphy->regd &&
1004 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && 1010 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
1005 !is_world_regdom(lr->alpha2)) { 1011 !is_world_regdom(lr->alpha2)) {
1006 REG_DBG_PRINT("Ignoring regulatory request set by %s " 1012 REG_DBG_PRINT("Ignoring regulatory request set by %s "
@@ -1706,8 +1712,8 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2)
1706} 1712}
1707EXPORT_SYMBOL(regulatory_hint); 1713EXPORT_SYMBOL(regulatory_hint);
1708 1714
1709void regulatory_hint_11d(struct wiphy *wiphy, enum ieee80211_band band, 1715void regulatory_hint_country_ie(struct wiphy *wiphy, enum ieee80211_band band,
1710 const u8 *country_ie, u8 country_ie_len) 1716 const u8 *country_ie, u8 country_ie_len)
1711{ 1717{
1712 char alpha2[2]; 1718 char alpha2[2];
1713 enum environment_cap env = ENVIRON_ANY; 1719 enum environment_cap env = ENVIRON_ANY;