]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/ath/regd.c
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
[~andy/linux] / drivers / net / wireless / ath / regd.c
index e93e517a699f4d09d33ef2ebd8005b69c36317dd..d3bbf48522b62e1af70cdea2685c74d3ab25d29f 100644 (file)
@@ -355,7 +355,8 @@ static int __ath_reg_dyn_country(struct wiphy *wiphy,
 {
        u16 country_code;
 
-       if (!ath_is_world_regd(reg))
+       if (request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE &&
+           !ath_is_world_regd(reg))
                return -EINVAL;
 
        country_code = ath_regd_find_country_by_name(request->alpha2);
@@ -601,7 +602,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
        const struct ieee80211_regdomain *regd;
 
        wiphy->reg_notifier = reg_notifier;
-       wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
+       wiphy->regulatory_flags |= REGULATORY_STRICT_REG;
 
        if (ath_is_world_regd(reg)) {
                /*
@@ -609,7 +610,8 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
                 * saved on the wiphy orig_* parameters
                 */
                regd = ath_world_regdomain(reg);
-               wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
+               wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG |
+                                          REGULATORY_COUNTRY_IE_FOLLOW_POWER;
        } else {
                /*
                 * This gets applied in the case of the absence of CRDA,