cfg80211: send regulatory beacon hint events to userspace
This informs userspace when a change has occured on a world roaming wiphy's channel which has lifted some restrictions due to a regulatory beacon hint. Because this is now sent to userspace through the regulatory multicast group we remove the debug prints we used to use as they are no longer necessary. Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
5dab3b8a68
commit
6bad876662
@@ -1049,18 +1049,10 @@ static void handle_reg_beacon(struct wiphy *wiphy,
|
||||
unsigned int chan_idx,
|
||||
struct reg_beacon *reg_beacon)
|
||||
{
|
||||
#ifdef CONFIG_CFG80211_REG_DEBUG
|
||||
#define REG_DEBUG_BEACON_FLAG(desc) \
|
||||
printk(KERN_DEBUG "cfg80211: Enabling " desc " on " \
|
||||
"frequency: %d MHz (Ch %d) on %s\n", \
|
||||
reg_beacon->chan.center_freq, \
|
||||
ieee80211_frequency_to_channel(reg_beacon->chan.center_freq), \
|
||||
wiphy_name(wiphy));
|
||||
#else
|
||||
#define REG_DEBUG_BEACON_FLAG(desc) do {} while (0)
|
||||
#endif
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_channel *chan;
|
||||
bool channel_changed = false;
|
||||
struct ieee80211_channel chan_before;
|
||||
|
||||
assert_cfg80211_lock();
|
||||
|
||||
@@ -1070,20 +1062,28 @@ static void handle_reg_beacon(struct wiphy *wiphy,
|
||||
if (likely(chan->center_freq != reg_beacon->chan.center_freq))
|
||||
return;
|
||||
|
||||
if (chan->beacon_found)
|
||||
return;
|
||||
|
||||
chan->beacon_found = true;
|
||||
|
||||
chan_before.center_freq = chan->center_freq;
|
||||
chan_before.flags = chan->flags;
|
||||
|
||||
if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) &&
|
||||
!(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
|
||||
chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
|
||||
REG_DEBUG_BEACON_FLAG("active scanning");
|
||||
channel_changed = true;
|
||||
}
|
||||
|
||||
if ((chan->flags & IEEE80211_CHAN_NO_IBSS) &&
|
||||
!(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) {
|
||||
chan->flags &= ~IEEE80211_CHAN_NO_IBSS;
|
||||
REG_DEBUG_BEACON_FLAG("beaconing");
|
||||
channel_changed = true;
|
||||
}
|
||||
|
||||
chan->beacon_found = true;
|
||||
#undef REG_DEBUG_BEACON_FLAG
|
||||
if (channel_changed)
|
||||
nl80211_send_beacon_hint_event(wiphy, &chan_before, chan);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user