提交 d91e41b6 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

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: NLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e702d3cf
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#ifdef CONFIG_CFG80211_REG_DEBUG #ifdef CONFIG_CFG80211_REG_DEBUG
#define REG_DBG_PRINT(format, args...) \ #define REG_DBG_PRINT(format, args...) \
do { \ do { \
printk(KERN_DEBUG format , ## args); \ printk(KERN_DEBUG "cfg80211: " format , ## args); \
} while (0) } while (0)
#else #else
#define REG_DBG_PRINT(args...) #define REG_DBG_PRINT(args...)
...@@ -745,12 +745,12 @@ static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan, ...@@ -745,12 +745,12 @@ static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
else else
snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain); snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain);
REG_DBG_PRINT("cfg80211: Updating information on frequency %d MHz " REG_DBG_PRINT("Updating information on frequency %d MHz "
"for %d a MHz width channel with regulatory rule:\n", "for %d a MHz width channel with regulatory rule:\n",
chan->center_freq, chan->center_freq,
KHZ_TO_MHZ(desired_bw_khz)); KHZ_TO_MHZ(desired_bw_khz));
REG_DBG_PRINT("cfg80211: %d KHz - %d KHz @ KHz), (%s mBi, %d mBm)\n", REG_DBG_PRINT("%d KHz - %d KHz @ KHz), (%s mBi, %d mBm)\n",
freq_range->start_freq_khz, freq_range->start_freq_khz,
freq_range->end_freq_khz, freq_range->end_freq_khz,
max_antenna_gain, max_antenna_gain,
...@@ -819,8 +819,7 @@ static void handle_channel(struct wiphy *wiphy, ...@@ -819,8 +819,7 @@ static void handle_channel(struct wiphy *wiphy,
r == -ERANGE) r == -ERANGE)
return; return;
REG_DBG_PRINT("cfg80211: Disabling freq %d MHz\n", REG_DBG_PRINT("Disabling freq %d MHz\n", chan->center_freq);
chan->center_freq);
chan->flags = IEEE80211_CHAN_DISABLED; chan->flags = IEEE80211_CHAN_DISABLED;
return; return;
} }
...@@ -878,7 +877,7 @@ static bool ignore_reg_update(struct wiphy *wiphy, ...@@ -878,7 +877,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
enum nl80211_reg_initiator initiator) enum nl80211_reg_initiator initiator)
{ {
if (!last_request) { if (!last_request) {
REG_DBG_PRINT("cfg80211: Ignoring regulatory request %s since " REG_DBG_PRINT("Ignoring regulatory request %s since "
"last_request is not set\n", "last_request is not set\n",
reg_initiator_name(initiator)); reg_initiator_name(initiator));
return true; return true;
...@@ -886,7 +885,7 @@ static bool ignore_reg_update(struct wiphy *wiphy, ...@@ -886,7 +885,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
if (initiator == NL80211_REGDOM_SET_BY_CORE && if (initiator == NL80211_REGDOM_SET_BY_CORE &&
wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) { wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) {
REG_DBG_PRINT("cfg80211: Ignoring regulatory request %s " REG_DBG_PRINT("Ignoring regulatory request %s "
"since the driver uses its own custom " "since the driver uses its own custom "
"regulatory domain ", "regulatory domain ",
reg_initiator_name(initiator)); reg_initiator_name(initiator));
...@@ -900,7 +899,7 @@ static bool ignore_reg_update(struct wiphy *wiphy, ...@@ -900,7 +899,7 @@ static bool ignore_reg_update(struct wiphy *wiphy,
if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd && if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd &&
initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
!is_world_regdom(last_request->alpha2)) { !is_world_regdom(last_request->alpha2)) {
REG_DBG_PRINT("cfg80211: Ignoring regulatory request %s " REG_DBG_PRINT("Ignoring regulatory request %s "
"since the driver requires its own regulaotry " "since the driver requires its own regulaotry "
"domain to be set first", "domain to be set first",
reg_initiator_name(initiator)); reg_initiator_name(initiator));
...@@ -1162,7 +1161,7 @@ static void handle_channel_custom(struct wiphy *wiphy, ...@@ -1162,7 +1161,7 @@ static void handle_channel_custom(struct wiphy *wiphy,
regd); regd);
if (r) { if (r) {
REG_DBG_PRINT("cfg80211: Disabling freq %d MHz as custom " REG_DBG_PRINT("Disabling freq %d MHz as custom "
"regd has no rule that fits a %d MHz " "regd has no rule that fits a %d MHz "
"wide channel\n", "wide channel\n",
chan->center_freq, chan->center_freq,
...@@ -1662,7 +1661,7 @@ static void restore_alpha2(char *alpha2, bool reset_user) ...@@ -1662,7 +1661,7 @@ static void restore_alpha2(char *alpha2, bool reset_user)
if (is_user_regdom_saved()) { if (is_user_regdom_saved()) {
/* Unless we're asked to ignore it and reset it */ /* Unless we're asked to ignore it and reset it */
if (reset_user) { if (reset_user) {
REG_DBG_PRINT("cfg80211: Restoring regulatory settings " REG_DBG_PRINT("Restoring regulatory settings "
"including user preference\n"); "including user preference\n");
user_alpha2[0] = '9'; user_alpha2[0] = '9';
user_alpha2[1] = '7'; user_alpha2[1] = '7';
...@@ -1673,7 +1672,7 @@ static void restore_alpha2(char *alpha2, bool reset_user) ...@@ -1673,7 +1672,7 @@ static void restore_alpha2(char *alpha2, bool reset_user)
* back as they were for a full restore. * back as they were for a full restore.
*/ */
if (!is_world_regdom(ieee80211_regdom)) { if (!is_world_regdom(ieee80211_regdom)) {
REG_DBG_PRINT("cfg80211: Keeping preference on " REG_DBG_PRINT("Keeping preference on "
"module parameter ieee80211_regdom: %c%c\n", "module parameter ieee80211_regdom: %c%c\n",
ieee80211_regdom[0], ieee80211_regdom[0],
ieee80211_regdom[1]); ieee80211_regdom[1]);
...@@ -1681,7 +1680,7 @@ static void restore_alpha2(char *alpha2, bool reset_user) ...@@ -1681,7 +1680,7 @@ static void restore_alpha2(char *alpha2, bool reset_user)
alpha2[1] = ieee80211_regdom[1]; alpha2[1] = ieee80211_regdom[1];
} }
} else { } else {
REG_DBG_PRINT("cfg80211: Restoring regulatory settings " REG_DBG_PRINT("Restoring regulatory settings "
"while preserving user preference for: %c%c\n", "while preserving user preference for: %c%c\n",
user_alpha2[0], user_alpha2[0],
user_alpha2[1]); user_alpha2[1]);
...@@ -1689,14 +1688,14 @@ static void restore_alpha2(char *alpha2, bool reset_user) ...@@ -1689,14 +1688,14 @@ static void restore_alpha2(char *alpha2, bool reset_user)
alpha2[1] = user_alpha2[1]; alpha2[1] = user_alpha2[1];
} }
} else if (!is_world_regdom(ieee80211_regdom)) { } else if (!is_world_regdom(ieee80211_regdom)) {
REG_DBG_PRINT("cfg80211: Keeping preference on " REG_DBG_PRINT("Keeping preference on "
"module parameter ieee80211_regdom: %c%c\n", "module parameter ieee80211_regdom: %c%c\n",
ieee80211_regdom[0], ieee80211_regdom[0],
ieee80211_regdom[1]); ieee80211_regdom[1]);
alpha2[0] = ieee80211_regdom[0]; alpha2[0] = ieee80211_regdom[0];
alpha2[1] = ieee80211_regdom[1]; alpha2[1] = ieee80211_regdom[1];
} else } else
REG_DBG_PRINT("cfg80211: Restoring regulatory settings\n"); REG_DBG_PRINT("Restoring regulatory settings\n");
} }
/* /*
...@@ -1764,7 +1763,7 @@ static void restore_regulatory_settings(bool reset_user) ...@@ -1764,7 +1763,7 @@ static void restore_regulatory_settings(bool reset_user)
void regulatory_hint_disconnect(void) void regulatory_hint_disconnect(void)
{ {
REG_DBG_PRINT("cfg80211: All devices are disconnected, going to " REG_DBG_PRINT("All devices are disconnected, going to "
"restore regulatory settings\n"); "restore regulatory settings\n");
restore_regulatory_settings(false); restore_regulatory_settings(false);
} }
...@@ -1794,7 +1793,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy, ...@@ -1794,7 +1793,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy,
if (!reg_beacon) if (!reg_beacon)
return -ENOMEM; return -ENOMEM;
REG_DBG_PRINT("cfg80211: Found new beacon on " REG_DBG_PRINT("Found new beacon on "
"frequency: %d MHz (Ch %d) on %s\n", "frequency: %d MHz (Ch %d) on %s\n",
beacon_chan->center_freq, beacon_chan->center_freq,
ieee80211_frequency_to_channel(beacon_chan->center_freq), ieee80211_frequency_to_channel(beacon_chan->center_freq),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册