aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-10-20 13:18:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:24:15 -0500
commitd91e41b690f795c04af4eb6fe28d2cafd3291051 (patch)
treeb37066063850a9e2003488d41ba49138d9109618 /net/wireless/reg.c
parente702d3cf29143327679ce2e2a60775eaf829f377 (diff)
cfg80211: prefix REG_DBG_PRINT() with cfg80211
Everyone's doing it, its the cool thing. Cc: Easwar Krishnan <easwar.krishnan@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 5556c5fe489a..3be18d9a944f 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -48,7 +48,7 @@
48#ifdef CONFIG_CFG80211_REG_DEBUG 48#ifdef CONFIG_CFG80211_REG_DEBUG
49#define REG_DBG_PRINT(format, args...) \ 49#define REG_DBG_PRINT(format, args...) \
50 do { \ 50 do { \
51 printk(KERN_DEBUG format , ## args); \ 51 printk(KERN_DEBUG "cfg80211: " format , ## args); \
52 } while (0) 52 } while (0)
53#else 53#else
54#define REG_DBG_PRINT(args...) 54#define REG_DBG_PRINT(args...)
@@ -745,12 +745,12 @@ static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
745 else 745 else
746 snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain); 746 snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain);
747 747
748 REG_DBG_PRINT("cfg80211: Updating information on frequency %d MHz " 748 REG_DBG_PRINT("Updating information on frequency %d MHz "
749 "for %d a MHz width channel with regulatory rule:\n", 749 "for %d a MHz width channel with regulatory rule:\n",
750 chan->center_freq, 750 chan->center_freq,
751 KHZ_TO_MHZ(desired_bw_khz)); 751 KHZ_TO_MHZ(desired_bw_khz));
752 752
753 REG_DBG_PRINT("cfg80211: %d KHz - %d KHz @ KHz), (%s mBi, %d mBm)\n", 753 REG_DBG_PRINT("%d KHz - %d KHz @ KHz), (%s mBi, %d mBm)\n",
754 freq_range->start_freq_khz, 754 freq_range->start_freq_khz,
755 freq_range->end_freq_khz, 755 freq_range->end_freq_khz,
756 max_antenna_gain, 756 max_antenna_gain,
@@ -819,8 +819,7 @@ static void handle_channel(struct wiphy *wiphy,
819 r == -ERANGE) 819 r == -ERANGE)
820 return; 820 return;
821 821
822 REG_DBG_PRINT("cfg80211: Disabling freq %d MHz\n", 822 REG_DBG_PRINT("Disabling freq %d MHz\n", chan->center_freq);
823 chan->center_freq);
824 chan->flags = IEEE80211_CHAN_DISABLED; 823 chan->flags = IEEE80211_CHAN_DISABLED;
825 return; 824 return;
826 } 825 }
@@ -878,7 +877,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
878 enum nl80211_reg_initiator initiator) 877 enum nl80211_reg_initiator initiator)
879{ 878{
880 if (!last_request) { 879 if (!last_request) {
881 REG_DBG_PRINT("cfg80211: Ignoring regulatory request %s since " 880 REG_DBG_PRINT("Ignoring regulatory request %s since "
882 "last_request is not set\n", 881 "last_request is not set\n",
883 reg_initiator_name(initiator)); 882 reg_initiator_name(initiator));
884 return true; 883 return true;
@@ -886,7 +885,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
886 885
887 if (initiator == NL80211_REGDOM_SET_BY_CORE && 886 if (initiator == NL80211_REGDOM_SET_BY_CORE &&
888 wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) { 887 wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) {
889 REG_DBG_PRINT("cfg80211: Ignoring regulatory request %s " 888 REG_DBG_PRINT("Ignoring regulatory request %s "
890 "since the driver uses its own custom " 889 "since the driver uses its own custom "
891 "regulatory domain ", 890 "regulatory domain ",
892 reg_initiator_name(initiator)); 891 reg_initiator_name(initiator));
@@ -900,7 +899,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
900 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd && 899 if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd &&
901 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && 900 initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
902 !is_world_regdom(last_request->alpha2)) { 901 !is_world_regdom(last_request->alpha2)) {
903 REG_DBG_PRINT("cfg80211: Ignoring regulatory request %s " 902 REG_DBG_PRINT("Ignoring regulatory request %s "
904 "since the driver requires its own regulaotry " 903 "since the driver requires its own regulaotry "
905 "domain to be set first", 904 "domain to be set first",
906 reg_initiator_name(initiator)); 905 reg_initiator_name(initiator));
@@ -1162,7 +1161,7 @@ static void handle_channel_custom(struct wiphy *wiphy,
1162 regd); 1161 regd);
1163 1162
1164 if (r) { 1163 if (r) {
1165 REG_DBG_PRINT("cfg80211: Disabling freq %d MHz as custom " 1164 REG_DBG_PRINT("Disabling freq %d MHz as custom "
1166 "regd has no rule that fits a %d MHz " 1165 "regd has no rule that fits a %d MHz "
1167 "wide channel\n", 1166 "wide channel\n",
1168 chan->center_freq, 1167 chan->center_freq,
@@ -1662,7 +1661,7 @@ static void restore_alpha2(char *alpha2, bool reset_user)
1662 if (is_user_regdom_saved()) { 1661 if (is_user_regdom_saved()) {
1663 /* Unless we're asked to ignore it and reset it */ 1662 /* Unless we're asked to ignore it and reset it */
1664 if (reset_user) { 1663 if (reset_user) {
1665 REG_DBG_PRINT("cfg80211: Restoring regulatory settings " 1664 REG_DBG_PRINT("Restoring regulatory settings "
1666 "including user preference\n"); 1665 "including user preference\n");
1667 user_alpha2[0] = '9'; 1666 user_alpha2[0] = '9';
1668 user_alpha2[1] = '7'; 1667 user_alpha2[1] = '7';
@@ -1673,7 +1672,7 @@ static void restore_alpha2(char *alpha2, bool reset_user)
1673 * back as they were for a full restore. 1672 * back as they were for a full restore.
1674 */ 1673 */
1675 if (!is_world_regdom(ieee80211_regdom)) { 1674 if (!is_world_regdom(ieee80211_regdom)) {
1676 REG_DBG_PRINT("cfg80211: Keeping preference on " 1675 REG_DBG_PRINT("Keeping preference on "
1677 "module parameter ieee80211_regdom: %c%c\n", 1676 "module parameter ieee80211_regdom: %c%c\n",
1678 ieee80211_regdom[0], 1677 ieee80211_regdom[0],
1679 ieee80211_regdom[1]); 1678 ieee80211_regdom[1]);
@@ -1681,7 +1680,7 @@ static void restore_alpha2(char *alpha2, bool reset_user)
1681 alpha2[1] = ieee80211_regdom[1]; 1680 alpha2[1] = ieee80211_regdom[1];
1682 } 1681 }
1683 } else { 1682 } else {
1684 REG_DBG_PRINT("cfg80211: Restoring regulatory settings " 1683 REG_DBG_PRINT("Restoring regulatory settings "
1685 "while preserving user preference for: %c%c\n", 1684 "while preserving user preference for: %c%c\n",
1686 user_alpha2[0], 1685 user_alpha2[0],
1687 user_alpha2[1]); 1686 user_alpha2[1]);
@@ -1689,14 +1688,14 @@ static void restore_alpha2(char *alpha2, bool reset_user)
1689 alpha2[1] = user_alpha2[1]; 1688 alpha2[1] = user_alpha2[1];
1690 } 1689 }
1691 } else if (!is_world_regdom(ieee80211_regdom)) { 1690 } else if (!is_world_regdom(ieee80211_regdom)) {
1692 REG_DBG_PRINT("cfg80211: Keeping preference on " 1691 REG_DBG_PRINT("Keeping preference on "
1693 "module parameter ieee80211_regdom: %c%c\n", 1692 "module parameter ieee80211_regdom: %c%c\n",
1694 ieee80211_regdom[0], 1693 ieee80211_regdom[0],
1695 ieee80211_regdom[1]); 1694 ieee80211_regdom[1]);
1696 alpha2[0] = ieee80211_regdom[0]; 1695 alpha2[0] = ieee80211_regdom[0];
1697 alpha2[1] = ieee80211_regdom[1]; 1696 alpha2[1] = ieee80211_regdom[1];
1698 } else 1697 } else
1699 REG_DBG_PRINT("cfg80211: Restoring regulatory settings\n"); 1698 REG_DBG_PRINT("Restoring regulatory settings\n");
1700} 1699}
1701 1700
1702/* 1701/*
@@ -1764,7 +1763,7 @@ static void restore_regulatory_settings(bool reset_user)
1764 1763
1765void regulatory_hint_disconnect(void) 1764void regulatory_hint_disconnect(void)
1766{ 1765{
1767 REG_DBG_PRINT("cfg80211: All devices are disconnected, going to " 1766 REG_DBG_PRINT("All devices are disconnected, going to "
1768 "restore regulatory settings\n"); 1767 "restore regulatory settings\n");
1769 restore_regulatory_settings(false); 1768 restore_regulatory_settings(false);
1770} 1769}
@@ -1794,7 +1793,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy,
1794 if (!reg_beacon) 1793 if (!reg_beacon)
1795 return -ENOMEM; 1794 return -ENOMEM;
1796 1795
1797 REG_DBG_PRINT("cfg80211: Found new beacon on " 1796 REG_DBG_PRINT("Found new beacon on "
1798 "frequency: %d MHz (Ch %d) on %s\n", 1797 "frequency: %d MHz (Ch %d) on %s\n",
1799 beacon_chan->center_freq, 1798 beacon_chan->center_freq,
1800 ieee80211_frequency_to_channel(beacon_chan->center_freq), 1799 ieee80211_frequency_to_channel(beacon_chan->center_freq),