Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183546
b: refs/heads/master
c: 4113f75
h: refs/heads/master
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jan 5, 2010
1 parent a077404 commit 274e08c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6976b665fc2b19900659b964bba3b55de08f264f
refs/heads/master: 4113f75187bfebccc54bf13c0ed09593023b53ca
32 changes: 18 additions & 14 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
#include "regdb.h"
#include "nl80211.h"

#ifdef CONFIG_CFG80211_REG_DEBUG
#define REG_DBG_PRINT(args...) \
do { \
printk(KERN_DEBUG args); \
} while (0)
#else
#define REG_DBG_PRINT(args)
#endif

/* Receipt of information from last regulatory request */
static struct regulatory_request *last_request;

Expand Down Expand Up @@ -972,25 +981,21 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
if (r == -ERANGE &&
last_request->initiator ==
NL80211_REGDOM_SET_BY_COUNTRY_IE) {
#ifdef CONFIG_CFG80211_REG_DEBUG
printk(KERN_DEBUG "cfg80211: Leaving channel %d MHz "
REG_DBG_PRINT("cfg80211: Leaving channel %d MHz "
"intact on %s - no rule found in band on "
"Country IE\n",
chan->center_freq, wiphy_name(wiphy));
#endif
chan->center_freq, wiphy_name(wiphy));
} else {
/*
* In this case we know the country IE has at least one reg rule
* for the band so we respect its band definitions
*/
#ifdef CONFIG_CFG80211_REG_DEBUG
if (last_request->initiator ==
NL80211_REGDOM_SET_BY_COUNTRY_IE)
printk(KERN_DEBUG "cfg80211: Disabling "
REG_DBG_PRINT("cfg80211: Disabling "
"channel %d MHz on %s due to "
"Country IE\n",
chan->center_freq, wiphy_name(wiphy));
#endif
flags |= IEEE80211_CHAN_DISABLED;
chan->flags = flags;
}
Expand Down Expand Up @@ -1870,13 +1875,12 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy,
if (!reg_beacon)
return -ENOMEM;

#ifdef CONFIG_CFG80211_REG_DEBUG
printk(KERN_DEBUG "cfg80211: Found new beacon on "
"frequency: %d MHz (Ch %d) on %s\n",
beacon_chan->center_freq,
ieee80211_frequency_to_channel(beacon_chan->center_freq),
wiphy_name(wiphy));
#endif
REG_DBG_PRINT("cfg80211: Found new beacon on "
"frequency: %d MHz (Ch %d) on %s\n",
beacon_chan->center_freq,
ieee80211_frequency_to_channel(beacon_chan->center_freq),
wiphy_name(wiphy));

memcpy(&reg_beacon->chan, beacon_chan,
sizeof(struct ieee80211_channel));

Expand Down

0 comments on commit 274e08c

Please sign in to comment.