diff options
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index f256dfffbf46..c01470e7de15 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1008,7 +1008,7 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band, | |||
1008 | 1008 | ||
1009 | if (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER && | 1009 | if (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER && |
1010 | request_wiphy && request_wiphy == wiphy && | 1010 | request_wiphy && request_wiphy == wiphy && |
1011 | request_wiphy->strict_regulatory) { | 1011 | request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) { |
1012 | /* | 1012 | /* |
1013 | * This gaurantees the driver's requested regulatory domain | 1013 | * This gaurantees the driver's requested regulatory domain |
1014 | * will always be used as a base for further regulatory | 1014 | * will always be used as a base for further regulatory |
@@ -1051,13 +1051,13 @@ static bool ignore_reg_update(struct wiphy *wiphy, | |||
1051 | if (!last_request) | 1051 | if (!last_request) |
1052 | return true; | 1052 | return true; |
1053 | if (initiator == NL80211_REGDOM_SET_BY_CORE && | 1053 | if (initiator == NL80211_REGDOM_SET_BY_CORE && |
1054 | wiphy->custom_regulatory) | 1054 | wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) |
1055 | return true; | 1055 | return true; |
1056 | /* | 1056 | /* |
1057 | * wiphy->regd will be set once the device has its own | 1057 | * wiphy->regd will be set once the device has its own |
1058 | * desired regulatory domain set | 1058 | * desired regulatory domain set |
1059 | */ | 1059 | */ |
1060 | if (wiphy->strict_regulatory && !wiphy->regd && | 1060 | if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd && |
1061 | !is_world_regdom(last_request->alpha2)) | 1061 | !is_world_regdom(last_request->alpha2)) |
1062 | return true; | 1062 | return true; |
1063 | return false; | 1063 | return false; |
@@ -1093,7 +1093,7 @@ static void handle_reg_beacon(struct wiphy *wiphy, | |||
1093 | 1093 | ||
1094 | chan->beacon_found = true; | 1094 | chan->beacon_found = true; |
1095 | 1095 | ||
1096 | if (wiphy->disable_beacon_hints) | 1096 | if (wiphy->flags & WIPHY_FLAG_DISABLE_BEACON_HINTS) |
1097 | return; | 1097 | return; |
1098 | 1098 | ||
1099 | chan_before.center_freq = chan->center_freq; | 1099 | chan_before.center_freq = chan->center_freq; |
@@ -1164,7 +1164,7 @@ static bool reg_is_world_roaming(struct wiphy *wiphy) | |||
1164 | return true; | 1164 | return true; |
1165 | if (last_request && | 1165 | if (last_request && |
1166 | last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && | 1166 | last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && |
1167 | wiphy->custom_regulatory) | 1167 | wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) |
1168 | return true; | 1168 | return true; |
1169 | return false; | 1169 | return false; |
1170 | } | 1170 | } |
@@ -1591,7 +1591,8 @@ static void reg_process_hint(struct regulatory_request *reg_request) | |||
1591 | 1591 | ||
1592 | r = __regulatory_hint(wiphy, reg_request); | 1592 | r = __regulatory_hint(wiphy, reg_request); |
1593 | /* This is required so that the orig_* parameters are saved */ | 1593 | /* This is required so that the orig_* parameters are saved */ |
1594 | if (r == -EALREADY && wiphy && wiphy->strict_regulatory) | 1594 | if (r == -EALREADY && wiphy && |
1595 | wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) | ||
1595 | wiphy_update_regulatory(wiphy, reg_request->initiator); | 1596 | wiphy_update_regulatory(wiphy, reg_request->initiator); |
1596 | out: | 1597 | out: |
1597 | mutex_unlock(®_mutex); | 1598 | mutex_unlock(®_mutex); |
@@ -1930,7 +1931,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd) | |||
1930 | const struct ieee80211_freq_range *freq_range = NULL; | 1931 | const struct ieee80211_freq_range *freq_range = NULL; |
1931 | const struct ieee80211_power_rule *power_rule = NULL; | 1932 | const struct ieee80211_power_rule *power_rule = NULL; |
1932 | 1933 | ||
1933 | printk(KERN_INFO "\t(start_freq - end_freq @ bandwidth), " | 1934 | printk(KERN_INFO " (start_freq - end_freq @ bandwidth), " |
1934 | "(max_antenna_gain, max_eirp)\n"); | 1935 | "(max_antenna_gain, max_eirp)\n"); |
1935 | 1936 | ||
1936 | for (i = 0; i < rd->n_reg_rules; i++) { | 1937 | for (i = 0; i < rd->n_reg_rules; i++) { |
@@ -1943,7 +1944,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd) | |||
1943 | * in certain regions | 1944 | * in certain regions |
1944 | */ | 1945 | */ |
1945 | if (power_rule->max_antenna_gain) | 1946 | if (power_rule->max_antenna_gain) |
1946 | printk(KERN_INFO "\t(%d KHz - %d KHz @ %d KHz), " | 1947 | printk(KERN_INFO " (%d KHz - %d KHz @ %d KHz), " |
1947 | "(%d mBi, %d mBm)\n", | 1948 | "(%d mBi, %d mBm)\n", |
1948 | freq_range->start_freq_khz, | 1949 | freq_range->start_freq_khz, |
1949 | freq_range->end_freq_khz, | 1950 | freq_range->end_freq_khz, |
@@ -1951,7 +1952,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd) | |||
1951 | power_rule->max_antenna_gain, | 1952 | power_rule->max_antenna_gain, |
1952 | power_rule->max_eirp); | 1953 | power_rule->max_eirp); |
1953 | else | 1954 | else |
1954 | printk(KERN_INFO "\t(%d KHz - %d KHz @ %d KHz), " | 1955 | printk(KERN_INFO " (%d KHz - %d KHz @ %d KHz), " |
1955 | "(N/A, %d mBm)\n", | 1956 | "(N/A, %d mBm)\n", |
1956 | freq_range->start_freq_khz, | 1957 | freq_range->start_freq_khz, |
1957 | freq_range->end_freq_khz, | 1958 | freq_range->end_freq_khz, |