diff options
author | Joe Perches <joe@perches.com> | 2010-11-16 22:56:49 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-24 16:19:33 -0500 |
commit | e9c0268f02f8970149158a9b7ea1e5c1c45c819d (patch) | |
tree | 1c73aeb5aa981379545a0b1edbd13dc6cbea6fee /net/wireless/reg.c | |
parent | d7a066c92394f3e777351de0c903beeb8a08af76 (diff) |
net/wireless: Use pr_<level> and netdev_<level>
No change in output for pr_<level> prefixes.
netdev_<level> output is different, arguably improved.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bc14caab19cd..5ed615f94e0c 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -32,6 +32,9 @@ | |||
32 | * rely on some SHA1 checksum of the regdomain for example. | 32 | * rely on some SHA1 checksum of the regdomain for example. |
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | |||
36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
37 | |||
35 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
36 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
37 | #include <linux/list.h> | 40 | #include <linux/list.h> |
@@ -48,7 +51,7 @@ | |||
48 | #ifdef CONFIG_CFG80211_REG_DEBUG | 51 | #ifdef CONFIG_CFG80211_REG_DEBUG |
49 | #define REG_DBG_PRINT(format, args...) \ | 52 | #define REG_DBG_PRINT(format, args...) \ |
50 | do { \ | 53 | do { \ |
51 | printk(KERN_DEBUG "cfg80211: " format , ## args); \ | 54 | printk(KERN_DEBUG pr_fmt(format), ##args); \ |
52 | } while (0) | 55 | } while (0) |
53 | #else | 56 | #else |
54 | #define REG_DBG_PRINT(args...) | 57 | #define REG_DBG_PRINT(args...) |
@@ -370,11 +373,10 @@ static int call_crda(const char *alpha2) | |||
370 | }; | 373 | }; |
371 | 374 | ||
372 | if (!is_world_regdom((char *) alpha2)) | 375 | if (!is_world_regdom((char *) alpha2)) |
373 | printk(KERN_INFO "cfg80211: Calling CRDA for country: %c%c\n", | 376 | pr_info("Calling CRDA for country: %c%c\n", |
374 | alpha2[0], alpha2[1]); | 377 | alpha2[0], alpha2[1]); |
375 | else | 378 | else |
376 | printk(KERN_INFO "cfg80211: Calling CRDA to update world " | 379 | pr_info("Calling CRDA to update world regulatory domain\n"); |
377 | "regulatory domain\n"); | ||
378 | 380 | ||
379 | /* query internal regulatory database (if it exists) */ | 381 | /* query internal regulatory database (if it exists) */ |
380 | reg_regdb_query(alpha2); | 382 | reg_regdb_query(alpha2); |
@@ -1851,8 +1853,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd) | |||
1851 | const struct ieee80211_freq_range *freq_range = NULL; | 1853 | const struct ieee80211_freq_range *freq_range = NULL; |
1852 | const struct ieee80211_power_rule *power_rule = NULL; | 1854 | const struct ieee80211_power_rule *power_rule = NULL; |
1853 | 1855 | ||
1854 | printk(KERN_INFO " (start_freq - end_freq @ bandwidth), " | 1856 | pr_info(" (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)\n"); |
1855 | "(max_antenna_gain, max_eirp)\n"); | ||
1856 | 1857 | ||
1857 | for (i = 0; i < rd->n_reg_rules; i++) { | 1858 | for (i = 0; i < rd->n_reg_rules; i++) { |
1858 | reg_rule = &rd->reg_rules[i]; | 1859 | reg_rule = &rd->reg_rules[i]; |
@@ -1864,16 +1865,14 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd) | |||
1864 | * in certain regions | 1865 | * in certain regions |
1865 | */ | 1866 | */ |
1866 | if (power_rule->max_antenna_gain) | 1867 | if (power_rule->max_antenna_gain) |
1867 | printk(KERN_INFO " (%d KHz - %d KHz @ %d KHz), " | 1868 | pr_info(" (%d KHz - %d KHz @ %d KHz), (%d mBi, %d mBm)\n", |
1868 | "(%d mBi, %d mBm)\n", | ||
1869 | freq_range->start_freq_khz, | 1869 | freq_range->start_freq_khz, |
1870 | freq_range->end_freq_khz, | 1870 | freq_range->end_freq_khz, |
1871 | freq_range->max_bandwidth_khz, | 1871 | freq_range->max_bandwidth_khz, |
1872 | power_rule->max_antenna_gain, | 1872 | power_rule->max_antenna_gain, |
1873 | power_rule->max_eirp); | 1873 | power_rule->max_eirp); |
1874 | else | 1874 | else |
1875 | printk(KERN_INFO " (%d KHz - %d KHz @ %d KHz), " | 1875 | pr_info(" (%d KHz - %d KHz @ %d KHz), (N/A, %d mBm)\n", |
1876 | "(N/A, %d mBm)\n", | ||
1877 | freq_range->start_freq_khz, | 1876 | freq_range->start_freq_khz, |
1878 | freq_range->end_freq_khz, | 1877 | freq_range->end_freq_khz, |
1879 | freq_range->max_bandwidth_khz, | 1878 | freq_range->max_bandwidth_khz, |
@@ -1892,27 +1891,20 @@ static void print_regdomain(const struct ieee80211_regdomain *rd) | |||
1892 | rdev = cfg80211_rdev_by_wiphy_idx( | 1891 | rdev = cfg80211_rdev_by_wiphy_idx( |
1893 | last_request->wiphy_idx); | 1892 | last_request->wiphy_idx); |
1894 | if (rdev) { | 1893 | if (rdev) { |
1895 | printk(KERN_INFO "cfg80211: Current regulatory " | 1894 | pr_info("Current regulatory domain updated by AP to: %c%c\n", |
1896 | "domain updated by AP to: %c%c\n", | ||
1897 | rdev->country_ie_alpha2[0], | 1895 | rdev->country_ie_alpha2[0], |
1898 | rdev->country_ie_alpha2[1]); | 1896 | rdev->country_ie_alpha2[1]); |
1899 | } else | 1897 | } else |
1900 | printk(KERN_INFO "cfg80211: Current regulatory " | 1898 | pr_info("Current regulatory domain intersected:\n"); |
1901 | "domain intersected:\n"); | ||
1902 | } else | 1899 | } else |
1903 | printk(KERN_INFO "cfg80211: Current regulatory " | 1900 | pr_info("Current regulatory domain intersected:\n"); |
1904 | "domain intersected:\n"); | ||
1905 | } else if (is_world_regdom(rd->alpha2)) | 1901 | } else if (is_world_regdom(rd->alpha2)) |
1906 | printk(KERN_INFO "cfg80211: World regulatory " | 1902 | pr_info("World regulatory domain updated:\n"); |
1907 | "domain updated:\n"); | ||
1908 | else { | 1903 | else { |
1909 | if (is_unknown_alpha2(rd->alpha2)) | 1904 | if (is_unknown_alpha2(rd->alpha2)) |
1910 | printk(KERN_INFO "cfg80211: Regulatory domain " | 1905 | pr_info("Regulatory domain changed to driver built-in settings (unknown country)\n"); |
1911 | "changed to driver built-in settings " | ||
1912 | "(unknown country)\n"); | ||
1913 | else | 1906 | else |
1914 | printk(KERN_INFO "cfg80211: Regulatory domain " | 1907 | pr_info("Regulatory domain changed to country: %c%c\n", |
1915 | "changed to country: %c%c\n", | ||
1916 | rd->alpha2[0], rd->alpha2[1]); | 1908 | rd->alpha2[0], rd->alpha2[1]); |
1917 | } | 1909 | } |
1918 | print_rd_rules(rd); | 1910 | print_rd_rules(rd); |
@@ -1920,8 +1912,7 @@ static void print_regdomain(const struct ieee80211_regdomain *rd) | |||
1920 | 1912 | ||
1921 | static void print_regdomain_info(const struct ieee80211_regdomain *rd) | 1913 | static void print_regdomain_info(const struct ieee80211_regdomain *rd) |
1922 | { | 1914 | { |
1923 | printk(KERN_INFO "cfg80211: Regulatory domain: %c%c\n", | 1915 | pr_info("Regulatory domain: %c%c\n", rd->alpha2[0], rd->alpha2[1]); |
1924 | rd->alpha2[0], rd->alpha2[1]); | ||
1925 | print_rd_rules(rd); | 1916 | print_rd_rules(rd); |
1926 | } | 1917 | } |
1927 | 1918 | ||
@@ -1972,8 +1963,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) | |||
1972 | return -EINVAL; | 1963 | return -EINVAL; |
1973 | 1964 | ||
1974 | if (!is_valid_rd(rd)) { | 1965 | if (!is_valid_rd(rd)) { |
1975 | printk(KERN_ERR "cfg80211: Invalid " | 1966 | pr_err("Invalid regulatory domain detected:\n"); |
1976 | "regulatory domain detected:\n"); | ||
1977 | print_regdomain_info(rd); | 1967 | print_regdomain_info(rd); |
1978 | return -EINVAL; | 1968 | return -EINVAL; |
1979 | } | 1969 | } |
@@ -2147,8 +2137,7 @@ int __init regulatory_init(void) | |||
2147 | * early boot for call_usermodehelper(). For now treat these | 2137 | * early boot for call_usermodehelper(). For now treat these |
2148 | * errors as non-fatal. | 2138 | * errors as non-fatal. |
2149 | */ | 2139 | */ |
2150 | printk(KERN_ERR "cfg80211: kobject_uevent_env() was unable " | 2140 | pr_err("kobject_uevent_env() was unable to call CRDA during init\n"); |
2151 | "to call CRDA during init"); | ||
2152 | #ifdef CONFIG_CFG80211_REG_DEBUG | 2141 | #ifdef CONFIG_CFG80211_REG_DEBUG |
2153 | /* We want to find out exactly why when debugging */ | 2142 | /* We want to find out exactly why when debugging */ |
2154 | WARN_ON(err); | 2143 | WARN_ON(err); |