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.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 3b0ce1c484a3..547ceecc0523 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -231,20 +231,22 @@ static const struct ieee80211_regdomain world_regdom = {
231 /* IEEE 802.11b/g, channels 1..11 */ 231 /* IEEE 802.11b/g, channels 1..11 */
232 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), 232 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
233 /* IEEE 802.11b/g, channels 12..13. */ 233 /* IEEE 802.11b/g, channels 12..13. */
234 REG_RULE(2467-10, 2472+10, 40, 6, 20, 234 REG_RULE(2467-10, 2472+10, 20, 6, 20,
235 NL80211_RRF_NO_IR), 235 NL80211_RRF_NO_IR | NL80211_RRF_AUTO_BW),
236 /* IEEE 802.11 channel 14 - Only JP enables 236 /* IEEE 802.11 channel 14 - Only JP enables
237 * this and for 802.11b only */ 237 * this and for 802.11b only */
238 REG_RULE(2484-10, 2484+10, 20, 6, 20, 238 REG_RULE(2484-10, 2484+10, 20, 6, 20,
239 NL80211_RRF_NO_IR | 239 NL80211_RRF_NO_IR |
240 NL80211_RRF_NO_OFDM), 240 NL80211_RRF_NO_OFDM),
241 /* IEEE 802.11a, channel 36..48 */ 241 /* IEEE 802.11a, channel 36..48 */
242 REG_RULE(5180-10, 5240+10, 160, 6, 20, 242 REG_RULE(5180-10, 5240+10, 80, 6, 20,
243 NL80211_RRF_NO_IR), 243 NL80211_RRF_NO_IR |
244 NL80211_RRF_AUTO_BW),
244 245
245 /* IEEE 802.11a, channel 52..64 - DFS required */ 246 /* IEEE 802.11a, channel 52..64 - DFS required */
246 REG_RULE(5260-10, 5320+10, 160, 6, 20, 247 REG_RULE(5260-10, 5320+10, 80, 6, 20,
247 NL80211_RRF_NO_IR | 248 NL80211_RRF_NO_IR |
249 NL80211_RRF_AUTO_BW |
248 NL80211_RRF_DFS), 250 NL80211_RRF_DFS),
249 251
250 /* IEEE 802.11a, channel 100..144 - DFS required */ 252 /* IEEE 802.11a, channel 100..144 - DFS required */
@@ -2745,7 +2747,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
2745 const struct ieee80211_power_rule *power_rule = NULL; 2747 const struct ieee80211_power_rule *power_rule = NULL;
2746 char bw[32], cac_time[32]; 2748 char bw[32], cac_time[32];
2747 2749
2748 pr_info(" (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)\n"); 2750 pr_debug(" (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)\n");
2749 2751
2750 for (i = 0; i < rd->n_reg_rules; i++) { 2752 for (i = 0; i < rd->n_reg_rules; i++) {
2751 reg_rule = &rd->reg_rules[i]; 2753 reg_rule = &rd->reg_rules[i];
@@ -2772,7 +2774,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
2772 * in certain regions 2774 * in certain regions
2773 */ 2775 */
2774 if (power_rule->max_antenna_gain) 2776 if (power_rule->max_antenna_gain)
2775 pr_info(" (%d KHz - %d KHz @ %s), (%d mBi, %d mBm), (%s)\n", 2777 pr_debug(" (%d KHz - %d KHz @ %s), (%d mBi, %d mBm), (%s)\n",
2776 freq_range->start_freq_khz, 2778 freq_range->start_freq_khz,
2777 freq_range->end_freq_khz, 2779 freq_range->end_freq_khz,
2778 bw, 2780 bw,
@@ -2780,7 +2782,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
2780 power_rule->max_eirp, 2782 power_rule->max_eirp,
2781 cac_time); 2783 cac_time);
2782 else 2784 else
2783 pr_info(" (%d KHz - %d KHz @ %s), (N/A, %d mBm), (%s)\n", 2785 pr_debug(" (%d KHz - %d KHz @ %s), (N/A, %d mBm), (%s)\n",
2784 freq_range->start_freq_khz, 2786 freq_range->start_freq_khz,
2785 freq_range->end_freq_khz, 2787 freq_range->end_freq_khz,
2786 bw, 2788 bw,
@@ -2813,35 +2815,35 @@ static void print_regdomain(const struct ieee80211_regdomain *rd)
2813 struct cfg80211_registered_device *rdev; 2815 struct cfg80211_registered_device *rdev;
2814 rdev = cfg80211_rdev_by_wiphy_idx(lr->wiphy_idx); 2816 rdev = cfg80211_rdev_by_wiphy_idx(lr->wiphy_idx);
2815 if (rdev) { 2817 if (rdev) {
2816 pr_info("Current regulatory domain updated by AP to: %c%c\n", 2818 pr_debug("Current regulatory domain updated by AP to: %c%c\n",
2817 rdev->country_ie_alpha2[0], 2819 rdev->country_ie_alpha2[0],
2818 rdev->country_ie_alpha2[1]); 2820 rdev->country_ie_alpha2[1]);
2819 } else 2821 } else
2820 pr_info("Current regulatory domain intersected:\n"); 2822 pr_debug("Current regulatory domain intersected:\n");
2821 } else 2823 } else
2822 pr_info("Current regulatory domain intersected:\n"); 2824 pr_debug("Current regulatory domain intersected:\n");
2823 } else if (is_world_regdom(rd->alpha2)) { 2825 } else if (is_world_regdom(rd->alpha2)) {
2824 pr_info("World regulatory domain updated:\n"); 2826 pr_debug("World regulatory domain updated:\n");
2825 } else { 2827 } else {
2826 if (is_unknown_alpha2(rd->alpha2)) 2828 if (is_unknown_alpha2(rd->alpha2))
2827 pr_info("Regulatory domain changed to driver built-in settings (unknown country)\n"); 2829 pr_debug("Regulatory domain changed to driver built-in settings (unknown country)\n");
2828 else { 2830 else {
2829 if (reg_request_cell_base(lr)) 2831 if (reg_request_cell_base(lr))
2830 pr_info("Regulatory domain changed to country: %c%c by Cell Station\n", 2832 pr_debug("Regulatory domain changed to country: %c%c by Cell Station\n",
2831 rd->alpha2[0], rd->alpha2[1]); 2833 rd->alpha2[0], rd->alpha2[1]);
2832 else 2834 else
2833 pr_info("Regulatory domain changed to country: %c%c\n", 2835 pr_debug("Regulatory domain changed to country: %c%c\n",
2834 rd->alpha2[0], rd->alpha2[1]); 2836 rd->alpha2[0], rd->alpha2[1]);
2835 } 2837 }
2836 } 2838 }
2837 2839
2838 pr_info(" DFS Master region: %s", reg_dfs_region_str(rd->dfs_region)); 2840 pr_debug(" DFS Master region: %s", reg_dfs_region_str(rd->dfs_region));
2839 print_rd_rules(rd); 2841 print_rd_rules(rd);
2840} 2842}
2841 2843
2842static void print_regdomain_info(const struct ieee80211_regdomain *rd) 2844static void print_regdomain_info(const struct ieee80211_regdomain *rd)
2843{ 2845{
2844 pr_info("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]); 2846 pr_debug("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]);
2845 print_rd_rules(rd); 2847 print_rd_rules(rd);
2846} 2848}
2847 2849
@@ -2862,7 +2864,8 @@ static int reg_set_rd_user(const struct ieee80211_regdomain *rd,
2862 return -EALREADY; 2864 return -EALREADY;
2863 2865
2864 if (!is_valid_rd(rd)) { 2866 if (!is_valid_rd(rd)) {
2865 pr_err("Invalid regulatory domain detected:\n"); 2867 pr_err("Invalid regulatory domain detected: %c%c\n",
2868 rd->alpha2[0], rd->alpha2[1]);
2866 print_regdomain_info(rd); 2869 print_regdomain_info(rd);
2867 return -EINVAL; 2870 return -EINVAL;
2868 } 2871 }
@@ -2898,7 +2901,8 @@ static int reg_set_rd_driver(const struct ieee80211_regdomain *rd,
2898 return -EALREADY; 2901 return -EALREADY;
2899 2902
2900 if (!is_valid_rd(rd)) { 2903 if (!is_valid_rd(rd)) {
2901 pr_err("Invalid regulatory domain detected:\n"); 2904 pr_err("Invalid regulatory domain detected: %c%c\n",
2905 rd->alpha2[0], rd->alpha2[1]);
2902 print_regdomain_info(rd); 2906 print_regdomain_info(rd);
2903 return -EINVAL; 2907 return -EINVAL;
2904 } 2908 }
@@ -2956,7 +2960,8 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd,
2956 */ 2960 */
2957 2961
2958 if (!is_valid_rd(rd)) { 2962 if (!is_valid_rd(rd)) {
2959 pr_err("Invalid regulatory domain detected:\n"); 2963 pr_err("Invalid regulatory domain detected: %c%c\n",
2964 rd->alpha2[0], rd->alpha2[1]);
2960 print_regdomain_info(rd); 2965 print_regdomain_info(rd);
2961 return -EINVAL; 2966 return -EINVAL;
2962 } 2967 }